# [XNA] rotation question

This topic is 2406 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
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)

##### Share on other sites

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!