Original Post
🔒 Locked
mouse camera
Advertisement
Take a look at Vic Hollis' Quaternion Camera Class tutorial at NeHe. While it uses OpenGL, the math and basic principles should be the same for other libraries.
Well, if you are already rotating with your keyboard, the only thing you have to do is process mouse input. Mouse input is not as transparent (like in what is exactly happenning when you are moving the mouse) as keyboard movement - so you could try to sort out rotation (use quaternions or if you are on OpenGL you can use GluLookAt()) with the keyboard first, and later simply change the input processing code to use the mouse movement [smile]
The more important question would then be - what are you using to process input - SDL, DirectInput, ... ?
The more important question would then be - what are you using to process input - SDL, DirectInput, ... ?
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement