Go Down

Topic: Serial Graphic LCD (Read 10641 times) previous topic - next topic


The camera is looking in the Z direction so that's why it seems to be rotating on its own axis, it's still in line with the camera Z axis. The order everything gets multiplied is very specific so apply all rotations first, then the translation. Usually the order will seem backwards to what you actually want to do.


Dec 15, 2010, 10:27 am Last Edit: Dec 15, 2010, 10:27 am by logical1 Reason: 1
Yes I agree if I translate the object before I rotate it, it ends up rotating about the center 0,0,0 like the moon around the earth instead of rotating along the axes...probably useful for something...but i just want to be able to rotate the object about its own axes.

I think I am going to have to just keep track of the orientation of the cube, and just add in angular increments to rotate the object from its current position...then store it again and so on...because if I try to calculate the rotation from 3 "finished" angles, then the order in which the rotations occur affects the outcome...so if I calculate x,y, then z and say they all rotated by 90 I would end up in a completely different orientation then if I calculated them z,y,x...accept for a few special cases of course.

I just can't think of a good way to determine the axes of rotation once the cube has been rotated already...I mean I can keep track of the new vertices of the rotated cube, but then I have to figure out how to rotate about the new angles that the axes are currently aligned with....

Go Up