Page 1 of 1

Camera crouching in First Person

Posted: Wed Aug 16, 2006 8:03 am
by MessiahAndrw
I'm having trouble with camera "crouching" on the floor. I'm using the default FPS camera. Here is my changeCamera function:

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);
            }
        }
The problem is - it does nothing..

Posted: Wed Aug 16, 2006 8:06 am
by MessiahAndrw
Nevermind.. 0.5f and 1 were to close to notice a difference. I scaled up the map, and use 2 for walking and 1 for crouching.