Workable FPS Camera System template

Published January 27, 2011
Advertisement
I was sitting in my common room and came up with an idea for a workable camera system controlled by the mouse and WASD keys. I know that this is probably a basic technique used in all FPS games but I just want to put this down.

Step 1:

Create a method to poll the X and Y coordinates of the mouse

Step 2:

Reset the Mouse to the center screen position every frame

Step 3:

Poll the offset of the X and Y mouse coordinates from the center of the screen

Step 4:

create a rotation matrix and rotate the lookAt matrix

Step 5:

Create a translation matrix and translate the cameraPosition matrix
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement