Camera crouching in First Person
Posted: Wed Aug 16, 2006 8:03 am
I'm having trouble with camera "crouching" on the floor. I'm using the default FPS camera. Here is my changeCamera function:
The problem is - it does nothing..
Code: Select all
public void changeCamera(bool bCrouch)
{
camera.RemoveAnimators();
if (bCrouch)
{
anim = smgr.CreateCollisionResponseAnimator(
selector, camera, new Vector3D(10, 0.5f, 10),
new Vector3D(0, -1, 0), new Vector3D(0, 50, 0), 0);
camera.AddAnimator(anim);
}
else
{
anim = smgr.CreateCollisionResponseAnimator(
selector, camera, new Vector3D(10, 1, 10),
new Vector3D(0, -1, 0), new Vector3D(0, 50, 0), 0);
camera.AddAnimator(anim);
}
}