• Advertisement
Sign in to follow this  

x/y-axis rotation using MDX Sprite?

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

Hi, I'm trying to rotate sprites around the x/y axis. It can rotate around the Z axis just fine, but whenever I try to set a Yaw or Pitch that is anything but zero, the sprite disappears. Am I doing something wrong here or is it just not possible with the Sprite class in D3D?
            Quaternion rotate = new Quaternion();
            rotate.RotateYawPitchRoll(rotation.X, rotation.Y, rotation.Z);
            Vector3 scale = new Vector3(scaling.X / _w, scaling.Y / _h, 1.0f);
            D3DSprite.Transform = Matrix.Transformation(
                new Vector3(position.X, position.Y, 0), //scales from top left
                new Vector3(position.X + scaling.X / 2, position.Y + scaling.Y / 2, 0.0f), //rotates from center

Share this post

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

  • Advertisement