The Vault ability will allow the character to traverse over a vertical object. When the Vault ability begins the AbilityFloatData Animator parameter will specify the forward velocity of the character. This can be used within a blend tree to play different vaulting animations based on the speed. The AbilityIntData parameter specifies the height of the vaulting object. This allows different vault animations to play based on the vault height. Because AbilityIntData is an int the height value is multiplied by 1000 to allow for a high precision while still being stored within an int parameter. For example, if the vault height is 1.53 units tall then the AbilityIntData will be 1530.
Vault is a committed pass-over traversal. It measures the obstacle, chooses an animation through the ability data, aligns the start position, and carries the character to the far side. It is not intended for an obstacle whose top should become a persistent climbing surface.
Setup
- Position Vault near the top of the ability list so it can override lower-priority locomotion abilities.
- Set up the objects that the character can vault over. If an object is detected by a cast, place it on a layer included in the Vault ability’s Detect Layers field. For ID-based detection, add the Object Identifier component and match its ID to the Vault ability’s Object ID field.
- Ensure the Object Detection field is set to the correct detection method. If a cast is used the Angle Threshold should also be set. This value indicates the angle at which the vault ability can start and a good value for vault is under 30.
Key settings
Max Height
The maximum height of the object that the character can climb over.
Start Location Depth Offset
Adds to the vault object’s offset.z value to allow the ability to play sooner when the character is running versus walking. The x value represents the character’s z velocity while the y represents the amount to add the Ability Start Location’s depth offset value by.
Author vaultable geometry
A good vault obstacle has a detectable front face, a stable top height, and clear space on the far side. Put only gameplay-relevant colliders in Detect Layers or identify them with the matching Object Identifier. Thin decorative children can change the measured top or cause the cast to hit a surface that the animation cannot cross.
The Angle Threshold rejects approaches that are too oblique. Keeping it below approximately 30 degrees makes the character approach near the obstacle normal; widen it only if the animation and far-side clearance work at diagonal entries.
Drive the animation
Use AbilityFloatData to blend by incoming forward speed. Use AbilityIntData / 1000f when interpreting the measured obstacle height as a float in custom animation logic. Build animation ranges that stay below Max Height, and test around every blend or transition boundary.
Start Location Depth Offset lets faster approaches begin farther from the object. The x component represents forward velocity and the y component represents the extra depth offset. Tune it after the base start pose works at low speed, then test the fastest allowed run so the start transition does not occur inside the obstacle.
Diagnose a vault
- Never starts: verify the detection method, filter, approach angle, and Max Height.
- Chooses the wrong animation: inspect the measured height and incoming forward velocity at the start frame.
- Snaps at takeoff: correct the ability start pose and depth mapping before changing the animation playback speed.
- Lands inside geometry: clear or exclude the far-side collider and confirm that the animation supports the obstacle depth.
- Short Climb starts instead: resolve the overlapping filters or put the preferred ability earlier in the list.