Using Mouse To Look Around (Mouse-Controlled Camera)

Does anybody know where i can find a tutoral or something on making a script to control the camera with the mouse, like in an fps (first person shooter)??? i can’t seem to find help anywhere with this. Thank you very much for your help!

I think I’ve answered this question enough times

https://blenderartists.org/forum/viewtopic.php?t=33633
https://blenderartists.org/forum/viewtopic.php?t=32805
http://www.blender3d.org/Education/index_old.php?sub=TutorialWalkthrough

… that ought to be enough, I repeat myself often

you essentially use a mouse movement actuator to get the current position of the cursor. You reset the cursor’s position [usually to the center of the screen] or store the old position in properties to see how the cursor has moved.

Based on these values you change the rotation of the camera. You can use rotation matricies [my script], or multiple objects and property ipo actuators [walkthrough_template]

now, you have to do this because the camera will get all sideways if you rotate it from its current position [if you look down, then left you will be looking sideways and sideways… left of the camera would be the sky, right would be the ground] so you have to store the camera’s rotation

… and that’s about it. using a rotation matrix you can use one object instead of two, but when using two objects you don’t have to deal with the problems that would occur if you rotated the object relative to its current rotation [the camera getting sideways] so you don’t need to store the current rotation.

oh, and it is a good idea to make your script run the same at different logic update rates [or in older version refresh rates]

thanks… i’ve searched and searched, but couldn’t find that…

Please don’t crosspost. I’ve locked the other two copies of this thread.