Jump to content
  • Advertisement
Sign in to follow this  
jcr83

[MDX] Rotation arround zAxis is not correct please help me.

This topic is 4447 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

width3d = 0.2f; height3d = 0.2f; verts[0] = new PositionTextured(-1 * width3d, -1 * height3d, 0.0f, 1.0f, 1.0f); verts[1] = new PositionTextured(-1 * width3d, height3d, 0.0f, 1.0f, 0.0f); verts[2] = new PositionTextured(width3d, -1 * height3d, 0.0f, 0.0f, 1.0f); verts[3] = new PositionTextured(width3d, height3d, 0.0f, 0.0f, 0.0f); Vertex buffer.. Matrix rotationMatrix = Matrix.RotationZ(90 * ((float)Math.PI / 180f)); device.Direct3DDevice.SetTexture(0, textures[index]); device.Direct3DDevice.Transform.World = rotationMatrix; It rotates but what I want is to keep the original size of the texture. original it is: http://members.home.nl/jcr83/notrotated.JPG afther rotation it becomes: http://members.home.nl/jcr83/rotated.JPG I want it to keep the aspect of the original only rotated. I know that it happens because the screen is 1024x768 but how can i fix it so it keeps the same aspect ratio.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
This is also what I am looking for.. Do you already have a solution?

Kind regards,

Mark

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!