• Advertisement
Sign in to follow this  

Rotation in 3d world XNA

This topic is 2612 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, when I create a project and there make a textured model and rotate it by using the Matrix.CreateRotationY method it works fine because the model is located at (0,0,0). When I locate the model in any other position and want it to rotate around itself the Matrix.CreateRotationY makes the model to rotate around the global axes at (0,0,0) and by that I mean that the model instead of rotating around itself it rotates around default y-Axis.
My question is, how do I fix this and make a model rotate around itself even if it's not located at (0,0,0)?
Thanks

Share this post


Link to post
Share on other sites
Advertisement
Hello DroidFighter,

you need to do the rotation before the translation. With matrix-multiplication order matters.

--GWDev

Share this post


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

  • Advertisement