First Person Camera Control Schemes

Started by
12 comments, last by SDyer 21 years, 4 months ago
CGP - I''m now getting to implementing some of your code, and I''m stumbling on the same thing that I was looking for originally:

How do I go from an angle (from, say the mouse), to a rotation vector?
Advertisement
*bump*

The last piece I need is how to get from mouse x,y input to a rotation vector, then I can rotate the camera as in the code CGP posted.

I''ve searched high and low and have only found pretty crummy first person camera schemes (like in the Zen book) or partial solutions and equations that I haven''t been able to translate into working code.

Help!
It''s really easy. As the mouse moves to the right, increase Rotation.X. As it moves down, increase or decrease Rotation.Y. There''s nothing to it.

~CGameProgrammer( );
~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Thanks CGP. After many hours over a couple of weeks noodling around with this, I finally have a workable first-person camera scheme. It takes all of 10 lines of code, but I couldn''t have done it without the help.

Now I think I''ll try terrain generation, so I have something to move the camera over.

This topic is closed to new replies.

Advertisement