The Crawl ability will play a crawling animation with the character moving on all four limbs. If the crawling ability is started by a trigger the ability will not stop until after the character has left the trigger. The Crawl ability is a subclass of the Height Change ability.

Crawl can be used as a voluntary stance or as a level-controlled traversal. In both cases it combines an animation state with a shorter collision profile. Trigger-controlled crawling additionally prevents the stance from ending while the character is still inside a tunnel that requires it.

Setup

  1. Position Crawl near the top of the ability list so it can override lower-priority locomotion abilities.
  2. Set the State name to "Crawl" and add the crawl states to other objects that should change values when Crawl is active. In the demo scene the Character IK and Third Person Object objects have a Crawl state added to them.
  3. If the Crawl ability will not be started with a trigger the Max Trigger Object Count field should be set to 0.
  4. Optionally set the First End Cap Target field on the Capsule Collider’s Capsule Collider Positioner component to the character’s reference bone. This will allow the collider to move with the reference bone so the collider will cover the character’s feet when crawling. This reference bone follows the movement created within the crawl animations. Crawl collider positioned to cover the character’s feet.

Key settings

Inspector field Purpose
Crawl Active State Name The name of the state that should activate when crawl is active. Crawl will not be active when the ability is playing the stop animation.
Max Trigger Object Count The maximum number of valid triggers that the ability can detect. Set to 0 to prevent the ability from starting with a trigger.
Trigger Layer Mask The LayerMask of the trigger that should be detected.
Trigger Object ID The unique ID value of the trigger’s Object Identifier component. A value of -1 indicates that this ID should not be used.

Choose a start mode

For a player-controlled crawl, set Max Trigger Object Count to 0 and start or stop the ability through the project’s normal ability input. The inherited Height Change checks should prevent standing when the full-height collider would overlap an obstruction.

For a tunnel or vent, add one or more valid triggers and allow a positive Max Trigger Object Count. Extend the trigger far enough beyond the low ceiling that the standing collider is clear before the ability may stop. Overlapping triggers are useful around bends, but the maximum count must accommodate the greatest number that can overlap at once.

Coordinate the collider and state

The Crawl Active State Name can remain active for the low-profile portion while the start or stop animation is playing a different state. Apply the Crawl state to components that must change with the posture, such as Character IK, first-person objects, or the Capsule Collider Positioner.

Set the Capsule Collider Positioner’s end-cap target only when the animation-driven reference bone should influence the collider. Test the resulting capsule at the most compressed and extended frames of the crawl cycle, not just in the idle pose.

If Crawl stops inside a low ceiling, lengthen the trigger exit or verify the inherited Height Change obstruction test. If it will not stop in open space, inspect the current trigger count and confirm no large or duplicated trigger still contains the character. If the feet leave the collider, review the end-cap target and the Crawl state on the positioner.