3D mouse control ?!
Ah, okay, this is going to be a real noob question. But can anyone tell me how to implement a mouse control in a 3D environment ? Possibly with using quaternions ?
I am trying to do this by using SDL at the moment and find myself stuck for I just don´t find a good way to start off.
So if anyone did this with SDL I would be happy for help.
Thanks.
Twist
These guys kinda get heavy into the mathematics, so i hope that you passed trig :-D
http://www.gametutorials.com/Tutorials/OpenGL/OpenGL_Pg1.htm
they create a nice camera class over a series of several tutorials, and i must say it works very nicely. The first few tutorials set up the framework, then they get into handling mouse events. You could probably set the code up to work for quaternions too if you'd like
EDIT: oops, wrote down the answer too quickly :-D if your using OpenGL, i'm assuming you can port the GameTutorials code to SDL, (tuts writtin in C++) the mathematics of the code is what your really looking for. You might have to do some picking apart, but i'm sure you can figure it out :-D
[edited by - BriW111 on November 25, 2003 10:55:17 AM]
http://www.gametutorials.com/Tutorials/OpenGL/OpenGL_Pg1.htm
they create a nice camera class over a series of several tutorials, and i must say it works very nicely. The first few tutorials set up the framework, then they get into handling mouse events. You could probably set the code up to work for quaternions too if you'd like
EDIT: oops, wrote down the answer too quickly :-D if your using OpenGL, i'm assuming you can port the GameTutorials code to SDL, (tuts writtin in C++) the mathematics of the code is what your really looking for. You might have to do some picking apart, but i'm sure you can figure it out :-D
[edited by - BriW111 on November 25, 2003 10:55:17 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement