[XNA] rotation question

Started by
1 comment, last by vaironl 12 years, 9 months ago
hello Guys vaironl here. I was doing a rotation part in Riemers XNA tutorial about rotation and it tells me to put this line
Matrix rotMatrix = Matrix.CreateRotationZ(rocketAngle);

and I just don't understand why do we need to create a rotation around the Z axis instead of the X axis.

Reimers Angle to Direction
Advertisement
In the tutorial, the rocket is flying in the X direction.
So, to make the rocket pitch up and down in that direction, you need to rotate AROUND the Z axis.

This little picture might help (Link)
Notice how rotating around the Z axis will make the rocket pitch up or down in the X direction.
If you rotated around the X axis the rocket would just spin! (or something close enough to that for this discussion)

In the tutorial, the rocket is flying in the X direction.
So, to make the rocket pitch up and down in that direction, you need to rotate AROUND the Z axis.

This little picture might help (Link)
Notice how rotating around the Z axis will make the rocket pitch up or down in the X direction.
If you rotated around the X axis the rocket would just spin! (or something close enough to that for this discussion)


Got it I was thinking about that yesterday, since the Z is sticking out of the screen. Thanks!

This topic is closed to new replies.

Advertisement