Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!






Workable FPS Camera System template

Posted by TheVegarian, 26 January 2011 · 439 views

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




PARTNERS