Adding a FPS Camera to a Model
Adding a FPS Camera to a Model
Hello all, I am trying to figure out how to attach a FPS camera to a model centered in its head, then I wanted to control the camera and the model with a event receiver instead of a KeyMap. Can anyone help me with this?
DayStar
-
- Posts: 42
- Joined: Sun Nov 16, 2008 11:23 pm
- Location: Melbourne, Australia
- Contact:
Actually, assuming you have a mesh and a camera with a collision response animator, it would be best to just attach the mesh to the camera though you will probably have to adjust the rotation manually. To do this is quite simple:
Then you'll have to figure out how to get the rotation right (I don't think it is updated for fps cameras, but you may be lucky).
However, none of this would work as well as if you used a real physics engine and a custom camera class - but I don't know if that's a possibility for you.
Code: Select all
character->setParent( camera ) ;
However, none of this would work as well as if you used a real physics engine and a custom camera class - but I don't know if that's a possibility for you.