First-person crouching

NOTE: First-person crouching is included in the "First Person Player Prefab" package on AC's Downloads page.

Crouching in first-person can be implemented in a number of ways, and this script demonstrates one possible method. It allows for animation, slowdown when crouching, and raycasting to prevent standing in walls.

To use it, set your game's Movement method to First Person, and copy the script below into a file named "PlayerCrouch.cs" and attach it to your Player prefab. Then assign the following in its Inspector:
 * The "Crouch Input Button" field entry must be listed in Unity's Input Manager.
 * The "Camera Parent" as a new empty GameObject in between your Player's root object and First Person Camera.  This new object should be positioned where your First Person Camera is (so that the camera Transform has a local position of 0,0,0).
 * The "Normal Collider" and "Crouch Collider" as two separate Collider gameobjects - the first for when standing, the second for when crouching.  The script will enable/disable these automaticaly
 * The "Stand Box Trigger" as a Box Collider that covers the volume that should be free of any other colliders for standing to be possible.  The raycasting will check for layers in the "Stand Layer Mask".
 * Optionally, an Animator can be assigned.  The "Crouch Mecanim Bool Parameter" refers to a boolean parameter on the Animator that will be set to True or False automatically.