Traversal
Chooser Table
What are Chooser Tables?
Chooser Tables enable dynamic selection of the appropriate animation based on traversal type (e.g., climbing, jumping) and obstacle dimensions (height, length). This ensures that the character's movements are contextually accurate and visually seamless.
How Chooser Tables Work
Chooser Tables function by mapping each traversal type and obstacle dimension to specific animation montages. During gameplay, when a traversal action is triggered, the plugin references the Chooser Table to select the correct animation. This dynamic selection ensures that the character performs the appropriate animation for each traversal type and obstacle size, enhancing the realism and fluidity of character movements.
Nested Choosers for each Traversal Type
Chooser for the Hurdle type.
Each animation is associated with specific properties.
Motion Warping
Motion Warping is a feature where you can dynamically adjust a character's root motion to align to targets. This document will show you how to create the Motion Warping logic in your character blueprint, assign Motion Warping windows within animation montages, and link them to named positions.
You can read about it more . We use motion warping to align the character to the obstacles they’re trying to traverse which allows dynamic traversal of any obstacle.
Interaction Bone
Animation Example with authored Interaction bone
The UE5 Mannequin by default has an interaction bone which isn’t set against the mesh. Each animation used animates the position of this bone to where the nearest edge of the obstacle would be (Apex Near).
Motion Warping adjusts the character so that its interaction bone is aligned to the edge of the obstacle, which allows for smooth traversal without clipping.
If we weren’t to use this bone, the motion warping would try to align the root of the character to the edge, which would make mesh clip with the obstacle.
Urgent Traversal
When we don’t use motion matching, we encounter a problem that would force us to crop most animations, since they have run/walk cycles at the beginning of the animations. This means that the character would play the animation, which makes them run into the obstacle before traversing it.
While a simple solution could be to crop the animation, that early animation data is useful for users who prefer Motion Matching. Thus, we instead opted for Montage sections.
Sections of a traversal montage
We add an “Urgent” section in the montage right before the action starts (right before the Motion Warping notify). This allows us to skip right to the action of the animation when we need to.
This is especially useful when the character’s falling and wants to climb an obstacle on the way.
Early Blend Out Notifies
The traversal animation montages include an anim notify state at the end to handle early blend outs based on the chosen blend out condition: Forced, With Movement Input, or If Falling.
This feature ensures that the animation transitions smoothly and appropriately according to the character's state.
If the blend out condition is Forced, the animation will end immediately. With Movement Input allows the animation to blend out early if the character is moving, ideal for transitions back to walk/run cycles. If Falling ensures the animation completes naturally unless the character is in a falling state, providing a seamless finish when there's no movement input.
Traversal Animation with Early Blend Out AnimNotify state at the end