WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-06-2009, 01:05 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Me gusta el code. Porque yo tengo code similar, pero esto code es mas fácil.

También, Penguin usted puede utilizar un objeto Link para esto, si no te gusta hierarchical.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #2  
Old 05-06-2009, 01:16 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Vous êtes fou mec. J'ai comme vous, mais vous êtes fou.
Reply With Quote
  #3  
Old 05-11-2009, 09:54 AM
Penguin Penguin is offline
Member
 
Join Date: Mar 2009
Posts: 14
Thank you, the code works best for me! I only did some minor changes: translating to origin before rotating:

Code:
euler = viz.Matrix.euler(0,0,roll)
m1 = object1.getMatrix()
m2 = object2.getMatrix()

m1.setTrans(0,0,0)
m2.setTrans(0,0,0)

diff = m1 * m2.inverse()
	
m2new = euler * m2
object2.setQuat(m2new.getQuat())
m1new = diff * m2new
m1new.setTrans(object1.getPosition(viz.ABS_GLOBAL))
object1.setMatrix(m1new)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
retrieve Object names Geoffrey Vizard 11 12-11-2009 05:26 AM
how to pick up the object, move and rotate using mouse nasr Vizard 5 05-05-2009 04:11 AM
reseting an object durf Vizard 3 03-18-2009 12:48 AM
Child Object Rotation paulgoldberg Vizard 5 09-05-2006 12:33 PM
rotate to object jargon Vizard 1 08-08-2005 01:20 PM


All times are GMT -7. The time now is 06:28 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC