Skip to content
ofxFPSCamera creates a camera object that behaves like the camera in a first-person shooter, controlled by either the W, A, S, D keys (or the arrow keys) and the mouse.
C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example_ofxFPSCamera added enableStrafe() and disableStrafe() Apr 4, 2014
src Clean up and starting to add clipping function Apr 13, 2014
.gitignore added target() and getTarget(), updated example Apr 4, 2014
README.md first commit Apr 2, 2014
ofxaddons_thumbnail.png first commit Apr 2, 2014

README.md

#ofxFPSCamera#

ofxFPSCamera creates a camera object that behaves like the camera in a first-person shooter, controlled by either the W, A, S, D keys (or the arrow keys) and the mouse.

It is derived from ofxGameCamera by James George and initially it was a fork of that project, but I think its intent is different enough that it should be a standalone addon.

The major differences between ofxFPSCamera and ofxGameCamera are that ofxFPSCamera:

  • Defaults to using the mouse (you do not need to click)
  • Got rid of ability to rotate on camera Z-axis
  • ALWAYS maintain UP direction relative to world coordinates (camera will always maintain a level horizon)
  • Got rid of direct control of boom up/down (camera height can be set by your app via a method, but cannot be directly controlled by the user pressing a key)
  • Limits up/down look range. (Defaults to +/- 30deg)
  • "Infinite mouse" lets user keep looking left or right forever (has not been tested on Windows)

See included example for complete list of methods and variables.


Requires ofxXmlSettings to make use of the original ofxGameCamera save/load capability.

You can’t perform that action at this time.