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);
}
}