XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : rotation problem

02-20-2006, 10:20 AM

i'm trying to rotate object by 10 degrees in X,Y and Z at the same time. after first rotation, everything is OK, but after second is not. thanks for your help, here's the code :)

a = eulerangles 10 10 10
(eulerAngles 10 10 10)

rotate $ a

inverse $.rotation as eulerangles
(eulerAngles 10 10 10) -- this is OK

rotate $ a

inverse $.rotation as eulerangles
(eulerAngles 22.0451 17.9134 22.0451) -- this is what ??

02-21-2006, 03:37 PM
You're probably encountering translation rounding error between eulerAngles and quaternions. Have you tried your code applying the rotations as quaternions?

02-21-2006, 03:51 PM
yes, same result with quat rotation

02-21-2006, 05:11 PM
I think, the result you are getting is the multiplication of the two rotations. If you want to have your selected object with a given rotation you have to use:

$.rotation.controller.value = a

Using "rotate $ a" you add the given rotation to the one the object already has...

But maybe I haven't understood what you wanted to do... which result were you expecting Max to return you??


02-21-2006, 05:49 PM
thanks a lot, cyberluigi2k. your way is working ok, for me

CGTalk Moderation
02-21-2006, 05:49 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.