Jump to content
  • Advertisement
Sign in to follow this  
ProblemBaby

3D Problem

This topic is 3942 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 don't know exactly how I should explain what I want to do, but I will do my best ... I want to rotate a point in three axis using the arrow keys! So... if its pointing straight up! (0, 1, 0) if I press UP or DOWN the point should be rotated around the X-axis If I press LEFT or RIGHT the point should be rotated around the Z-axis if its pointing straight forward! (0, 0, 1) if I press UP or DOWN the point should be rotated around the X-axis If I press LEFT or RIGHT the point should be rotated around the Y-axis if its pointing straight to the right! (1, 0, 0) if I press UP or DOWN the point should be rotated around the Y-axis If I press LEFT or RIGHT the point should be rotated around the Z-axis I hope you undertand! I've spent a few hours and I can't really figure out how I should set this up! Thanks in Advance

Share this post


Link to post
Share on other sites
Advertisement
You are talking about the object's local axes. I'm not sure which API you are using, but local transformations are usually achieved by composing the matrices on the 'other side' of the vector.

Under D3DX you could use the ID3DXMatrixStack's RotateAxisLocal (as opposed to RotateAxis), for example.

Admiral

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!