Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

IceGod

Rotation about arbitrary axis?

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

I''m trying to get it so I can rotate my camera around so that I can look at my world. So, what I first tried doing was rotating the camera around the world x and y axis. I found out this didn''t work, because the rotations need to occur around the cameras own x and y axis for it to be correct. So I need some way to create rotation matrices about an arbitrary axis (namely the cameras x and y axis). Does anyone have a formula, or code, or know of a DX8 function that can do this? Thanks, Tom

Share this post


Link to post
Share on other sites
Advertisement
D3DXMatrixRotationAxis
Builds a matrix that rotates around an arbitrary axis.

D3DXMATRIX* D3DXMatrixRotationAxis(
D3DXMATRIX* pOut,
CONST D3DXVECTOR3* pV,
FLOAT Angle
);
Parameters
pOut
[in, out] Pointer to the D3DXMATRIX structure that is the result of the operation.
pV
[in] Pointer to the D3DXVECTOR3 structure that identifies the axis angle.
Angle
[in] Angle of rotation, in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

Microsoft saves the day

Share this post


Link to post
Share on other sites

  • 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!