The Roll ability allows the character to play a rolling animation. A rolling animation can also play if the character falls from a tall object. While in first person view the camera can roll with the character, stay in an upright rotation, or switch to a third person perspective.
Roll supports two entry paths: an explicit ability start and an automatic landing response after a sufficiently long fall. Both use the same roll action, but the automatic path depends on the measured fall height and the ability’s position relative to Fall in the ability list.
Setup
- Position Roll above the Fall ability so the character will keep rolling even while in the air.
- Set the Roll Fall Height if the character should start to roll after falling from a large distance.
Key settings
| Inspector field | Purpose |
|---|---|
| Start Cast Distance | Specifies the cast distance to ensure there is enough space for the character to roll. |
| Roll Fall Height | Start the roll ability if the character falls from a height greater than the specified value. Set to -1 to disable the falling roll. |
| Switch To Third Person | Should the roll ability switch to a third person view if the character is in a first person view? |
Clearance and landing behavior
Start Cast Distance prevents a roll when the space ahead is too short for the action. Tune it against the gameplay displacement of the animation, including the character collider at the final pose. Test low walls, angled corners, and moving obstacles rather than only a flat open floor.
Set Roll Fall Height to -1 when landing rolls are not part of the design. Otherwise, choose a value above ordinary steps and jumps but below the falls that should trigger recovery. Test falls just below and above the threshold; the transition should not alternate because of small variations in takeoff height.
First-person presentation
Use Switch To Third Person when the full body motion is important and a temporary perspective change is acceptable. If the view remains first person, decide whether the camera follows the body’s roll or stays upright through the camera state used during the ability. Verify the return transition as carefully as the start so the camera does not keep an ability-specific state.
If manual rolls work but landing rolls do not, check Roll Fall Height and verify Roll can take priority over Fall. If the roll starts into an obstacle, increase the cast distance or correct the cast layers; changing only animation speed does not make the destination clear.