For the complete documentation index, see llms.txt. This page is also available as Markdown.

🌠Fall

Configure automatic falling, landing, air control, and fall damage.

Overview

State ID: 3

The Fall state takes over when the character has no ground beneath it. This includes leaving an edge, reaching a jump apex, or losing a platform.

Fall measures distance, blends soft and hard fall animations, keeps air control, and selects a landing animation. It can also apply fall damage to a Stat.

Fall is automatic. No input is required.

Creating the Fall state

Create a Fall state in either way:

  • Select + in the character's States list. Then select Air → Fall.

  • Duplicate an existing Fall state asset. Add it to the character's States list.

Almost every character needs a Fall state.

Priority

Set Fall just above Idle and Locomotion.

Set it below airborne and action states. These include Jump, Climb, Fly, Swim, and Death. This lets Fall take over when airborne, while higher-priority states can interrupt it.

Requirements

Fall requires no extra components. It uses the character's Fall Ray, a SphereCast along the gravity direction.

Set the character's Ground Layer correctly on the MAnimal. The Fall Ray only detects colliders on this layer.

Activation

Fall activates automatically. Input, Zones, and Reactions do not activate it.

  1. The state casts a Fall Ray from a look-ahead pivot ahead of the character.

  2. The SphereCast follows the gravity direction toward the ground.

  3. Fall activates if no ground is within reach.

  4. It also activates when the ground exceeds the Slope Limit.

Enable the optional front check to cast a line forward first. If it finds a wall or obstacle, Fall does not activate. This prevents false falls while pushing against geometry.

If the Fall Ray (Pink) does not hit any Collider with the Ground Layer Mask it will activate.

Exit conditions

Fall exits in any of these cases:

  • The Fall Ray finds ground within the character's Height.

  • A higher-priority state activates, such as Ledge Grab or Fly.

  • MAnimal.State_AllowExit() is called.

On touchdown, the ground must not be a steep slope. Ground tagged as Debris also counts as a landing surface.

Fall sets Exit Status from the fall distance. The Animator then plays the matching landing animation. Fall damage is applied when configured.

General settings

Enter Input: None. Fall activates automatically.

Speed Set: None. Fall builds its internal FallSpeed modifier when it enters the core animation. Set Speed Sets has no effect on this state.

Use these general properties:

Property
Value

Root Motion

False

Additive Position

True

Additive Rotation

True

Grounded

False

Sprint

False

Orient To Ground

False

Gravity

True

Custom Rotation

False

Gravity accelerates the character downward. Root motion stays disabled, so physics and inertia drive the fall.

Animator

Create an animation state with the transition condition State = Fall ID and StateOn.

Use a blend tree driven by State Float. Blend between soft and hard fall animations.

Exit Status selects the landing animation. Its value comes from the fall distance.

Air control parameters

Control the character while it is airborne.

Property
Default
Description

Air Control

True

Allows steering while falling. When disabled, the character keeps its entry movement.

Air Rotation

10

Rotation speed while falling.

Air Movement

0

Maximum movement speed while falling.

Air Smooth

2

Lerp value used to reach Air Movement.

Fall Ray parameters

Control the ground-detection SphereCast.

Property
Default
Description

Offset

0

Forward position offset for the Fall Ray.

Move Multiplier

0.1

Extra forward offset while moving. Higher speed checks further ahead.

Check Front Obstacle

True

Checks for an obstacle ahead before falling. Shown only when Move Multiplier exceeds 0.

Length Multiplier

1

Multiplier for the Fall Ray length. The base length is character Height.

Ray Hits

6

Maximum hits for the non-allocating Fall SphereCast.

Fall blend

Property
Default
Description

Blend Fall

Distance Normalized

Calculates State Float using normalized distance, raw distance, or vertical velocity.

Lower Blend Distance

0.1

Distance where the blend returns toward zero before landing.

Use Distance Normalized to map the full fall from 0 to 1. Use Distance for raw accumulated distance. Use Vertical Velocity for signed vertical speed.

Fall damage

Apply landing damage to a Stat based on fall distance.

Property
Default
Description

Affect Stat

StatID to reduce on landing, such as Health. Leave empty to disable damage.

Fall Min Distance

5

Minimum distance that applies damage.

Fall Max Distance

15

Distance where damage reaches 100%. Falls at or above this value fully reduce the Stat.

Land Status

Vector2 array: X is fall distance; Y is Exit Status.

Damage uses Reduce By Percent. It scales between Fall Min Distance and Fall Max Distance. Damage only applies after a grounded landing.

Use Land Status to select soft, hard, or roll landings.

Stuck recovery

Experimental recovery can nudge a character free when it becomes stuck mid-fall.

Property
Default
Description

Stuck Animal

True

Detects stuck falling and nudges the character free.

Push Forward

2

Forward impulse applied during recovery.

Experimental

Property
Default
Description

Keep Inertia On Platforms

True

Preserves moving-platform momentum when the character falls off.

Last updated