Jump to content
  • Advertisement
Sign in to follow this  
vaironl

[XNA] rotation question

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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)

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!