Sign in to follow this  

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

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

This topic is 4206 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this