Jump to content

April 2017 »

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30       
- - - - -

Workable FPS Camera System template



4: Adsense

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

Note: GameDev.net moderates comments.