Notifications
Clear all

[Closed] Rotation problem

hi,

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
OK
 
inverse $.rotation as eulerangles
(eulerAngles 10 10 10) -- this is OK
 
rotate $ a
OK
 
inverse $.rotation as eulerangles
(eulerAngles 22.0451 17.9134 22.0451) -- this is what ??

4 Replies

You’re probably encountering translation rounding error between eulerAngles and quaternions. Have you tried your code applying the rotations as quaternions?

yes, same result with quat rotation

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??

/Lui

thanks a lot, cyberluigi2k. your way is working ok, for me