Camera crouching in First Person

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
MessiahAndrw
Posts: 2
Joined: Wed Aug 16, 2006 8:00 am

Camera crouching in First Person

Post 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..
MessiahAndrw
Posts: 2
Joined: Wed Aug 16, 2006 8:00 am

Post 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.
Locked