Crouch Component

The Crouch Component provides smooth crouching and uncrouching for characters.

It also provides floor & ceiling detection to prevent the capsule from expanding too much when uncrouching, but still allowing for partial uncrouching if the ceiling height allows it. A speed penalty is applied when being crouched.

Configuration

Variable
Description

Is Input Toggle

If true, the input key is used as toggle. This is especially useful for use on gamepads where it is more tiring to hold down a button.

Target Crouch Camera Offset

Camera Offset to add when the player is crouching.

Crouch Speed

Speed that is added to the character when crouched. Should be a negative number to make the character slower.

Capsule Half Height When Crouching

Target capsule half height for crouching.

Do Crouch Speed

Speed multiplier used to calculate the height difference done in a frame when crouching. (Formula is CrouchSpeed * DeltaTime)

Do Uncrouch Speed

Speed multiplier used to calculate the height difference done in a frame when uncrouching. (Formula is CrouchSpeed * DeltaTime)

Overlap Actor Types

Actor Types that are used for collision detection when uncrouching.

Class Exception List For Overlap

Array of Actor classes that are being ignored in ceiling checks.

Show Debug Information

If true, various useful variables will be printed on the screen to help with debugging.