Jump to content
  • Advertisement


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


Rotating the camera

This topic is 5931 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 am having a few problems implementing a mouse look camera. The problem is that I have moved the camera back z = -50 and when I try to rotate the camera D3DXM rotate X the camera seems to be moving ok but if I do that movement of center at x = 10 the camera seems to spin. Does anyone have the code for rotating the camera with the mouse using the .lX and .lY parameters? /Joachim

Share this post

Link to post
Share on other sites

I''m not sure I understand your problem. Do you mean that your camera spins around its own x-axis fine when the camera is at (0,0,-50) but it doesn''t spin when it''s at (10,0,-50)?

Also, without seeing your camera class, it would be hard to say how to use it properly. Post your camera code (please use source tags) and I''ll take a look at it.


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!