View Full Version : Rotate object on absolute axes, the order matters
03-20-2012, 02:02 PM
I need to rotate a cube on fixed axes (x and z). The order of the rotations does matter for me. So rotations: x90,x90,z90,x90 != x270, z90. Should i use quaternions for this?
03-21-2012, 02:00 AM
What's wrong with Euler angles for this task? You sure don't need smooth interpolation for such a simple animation.
03-21-2012, 10:47 AM
if i rotate on one axis the other axes turn too, so after the first rotation i have to determine the new axes.
if i rotate on one axis the other axes turn too, so after the first rotation i have to determine the new axes. Correct. Sounds like what you want are object space rotations.
Check out the code below. It does both object and screen space rotations.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.