First Person Camera Physics

40 views
Skip to first unread message

Evan Hissey

unread,
Apr 25, 2012, 1:58:38 AM4/25/12
to G3D Users
I'm looking to use a created .obj file as my bounds for a camera using
the FirstPersonManipulator.

I'm having trouble limiting the input to not translate the camera's y
coordinates, as well as forcing the camera to no enter into certain
bounds. I'm looking for the first person manipulator's source so I can
change how it effects the gcamera element I have, as well as give it
some bounds. Any pointers on how to do this? Thanks for your help!

Morgan McGuire

unread,
Apr 25, 2012, 9:23:15 AM4/25/12
to g3d-...@googlegroups.com
I do this by creating a first person manipulator, reading its frame() every time step, and then extracting what I want from it.  For example, simply overriding the Y value.

If you want 2D movement it is also pretty easy to ignore FirstPersonManpulator and just write your own control scheme in GApp::onUserInput().  FPM is a handy tool, not a requirement for a G3D program.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan
Reply all
Reply to author
Forward
0 new messages