# Animation Traversecraft moves the capsule along a path. What the character looks like while it does is up to you, in one of two ways. ## Let Traversecraft play them Each move has an animation slot in the settings, 24 in all, under **Traversal | Animation**: | Move | Slots | |---|---| | Vault, mantle, climb | **Vault Animation**, **Mantle Animation**, **Climb Animation**, and up to 8 variants of each by height and speed | | Ladder | **Ladder Animation** (a cycle), **Ladder Slide Animation** (looped while sliding down), **Ladder From Top Animation** | | Hanging | **Hang Animation** (a cycle), **Hang Free Animation** (nothing under the feet), **Grab Ledge Animation** (in the air), **Grab Ledge From Ground Animation**, **Drop To Ledge Animation**, **Climb From Hang Animation**, **Hang Corner Animation**, **Hang Jump Up / Left / Right Animation** | | Slide | **Slide Animation** | | Wall run and kick | **Wall Run Left Animation**, **Wall Run Right Animation** (cycles), **Wall Kick Animation** | | Zipline and rope | **Zipline Animation**, **Rope Animation** (cycles, at their Speed) | A slot left empty plays nothing of Traversecraft's own: the character's Animation Blueprint carries on, or, for the moves onto, along and down to a ledge, the hang cycle holds. Each slot has: | Field | What it does | |---|---| | Animation | An animation sequence or montage on your character's skeleton | | Start, End | The stretch of it the move uses, in seconds. End 0 plays to the end | | Speed | Play rate. Faster makes the move shorter | | Slot | The slot in your Animation Blueprint it plays in (DefaultSlot) | | Follow Root Motion | The capsule follows the animation's own root motion, stretched to each obstacle (see below) | | Follow Root Rotation | The character turns as the animation's root turns, instead of turning to the move's end facing | | Turn Share | Share of the move spent turning to its end facing, from its start. 0 keeps the move's own | | Path Timing | A curve: how far along the path the capsule is (Y, 0 to 1) at each share of the move's time (X, 0 to 1) | When a move has an animation, the animation sets how long the move takes: its stretch divided by Speed. Every machine knows that number from the settings alone, so the animation and the path stay together on the owner, the server and everyone watching. The animation's own root motion is switched off while it plays, because the path already moves the capsule. ## Following the animation's root motion An animation made with root motion for one obstacle (the Game Animation Sample's mantle is made for about 1 m) looks wrong on a higher or lower one if the capsule takes straight lines: the hands meet the edge too early or too late. With **Follow Root Motion** on, the path is the animation's own root motion, sampled at 8 points evenly in time and stretched so it starts and ends where the move does and peaks at the obstacle's top. The capsule rises when the animation rises and crosses when it crosses, at any height in the move's range. It is the idea of Motion Warping, worked out as part of the plan: the owner and the server get the same 8 points from the same animation, so it stays predicted, and a correction replays it like any other move. Where the stretched path would hit something, the move keeps the straight one. It works on vault, mantle and climb, on both CMC and Mover. The stretch is anchored where the animation's hands take the edge: the capsule is as far back from the real edge at that moment as the animation's root was from its own, and it goes over the top only once it is up there. Stretched evenly instead, a climb started nearer the wall than the animation's took the capsule up the wall half a second ahead of it. ## Hands on the edge The timing follows the obstacle; the reach, on its own, does not: Epic's 1 m mantle on a 150 cm ledge would put the hands 45 cm under the edge. The **Traversal Hand IK** node puts them on it. It finds, once per animation, when its hands hold still (that is where they hold the edge), then while they hold it moves them onto the real edge: the arms bend for the first 12 cm, the body rises for the rest, which reads as a hop onto a higher ledge. Measured on a course of blocks from 70 to 270 cm with Epic's animations, the wrists at the start of each hold: | Block | Without the node | With it | |---|---|---| | Mantle, 100 to 190 cm (the animation is made for 103) | 14 cm above to 92 cm under the edge | 13 cm under to 4 cm above | | Climb, 230 and 270 cm (made for 258) | 21 to 43 cm short of the wall | within 5 cm of the edge | It only changes the pose, on each machine by itself from the edge in front and the animation's time: nothing is sent and the move is the same. **Set Up for Traversecraft** adds the node to the character's Animation Blueprint, last before the output pose. By hand: Local To Component, **Traversal Hand IK**, Component To Local, before Output Pose. **Hands On Edge** in the settings turns it off for a character, and `Traversecraft.HandIK 0` turns the node off everywhere, to compare. The ladder animation is a climbing cycle. It loops for as long as the character is on the ladder and plays as fast as it climbs: still when the character stops, backward when it goes down. Your Animation Blueprint needs a slot node for the slot you choose. ## Shaping the move Three fields on each animation change the movement itself, not only what plays: - **Follow Root Motion** takes the path from the animation's root translation (see above). - **Follow Root Rotation** takes the facing from the animation's root yaw: a vault authored to land facing 90 degrees to the side lands that way. The yaw is sampled at 8 points over the stretch the move plays and goes with the move to the server, so both turn alike. It needs root motion in the animation; the move's own end facing (a hang facing the wall) is replaced by the animation's. - **Turn Share** sets how soon the character turns to the move's end facing: 0.3 turns in the first third, 1 over the whole move. A drop down to a ledge turns in its first 35% by default (**Drop To Ledge Turn Share**); every other move over the whole move. - **Path Timing** is a float curve from 0 to 1 on both axes. A curve that reaches 0.5 at 0.25 covers half the path in the first quarter of the time and slows down after. Without one the capsule eases in and out, or keeps the animation's own timing with Follow Root Motion. All three are worked out from the settings, which are the same on the owner and the server, so the move stays predicted. ## Variants by height and speed Each of vault, mantle and climb takes up to 8 more animations in **Vault Variants**, **Mantle Variants** and **Climb Variants**. Each variant has a height range (the obstacle above the feet, in cm) and a speed range (the ground speed coming at it, in cm/s); a range left at 0 to 0 takes anything. The first variant that fits plays, and its stretch sets the move's duration, the same way the main animation does. None fitting plays the main one. So a walking vault and a running vault, or a low mantle and a high one, are data, with no Blueprint. The choice is made once, from the same numbers on the owner and the server, and reaches every other machine with the move: in the custom movement mode on the CMC (16 modes per variant, so a vault on its first variant is mode 116) and in the sync state on Mover. `GetTraversalAnimationVariant` says which one plays: 0 the main animation, 1 and up the variants. ## Choosing the animation yourself For a Chooser table or rules of your own, implement **TRC Traversal Variant Chooser** on the character (`ITRCTraversalVariantChooser`). `ChooseTraversalVariant` gets the kind, the obstacle's height and the speed coming at it; returning true with **Variant** set picks the animation (0 the kind's own, 1 and up its variants), false leaves it to the ranges. It is asked on the owner and on the server for the same move, so read the same state on both. The pick reaches everyone else with the move, as a variant does. ## Drive your Animation Blueprint yourself Leave the slots empty and read the state instead: | Read | From | |---|---| | What it is doing | `GetTraversal()`: None, Vault, Mantle, Climb, Ladder, LadderFromTop, Hang, GrabLedge, DropToLedge, ClimbFromHang, HangCorner, Slide, WallRun | | Which animation | `GetTraversalAnimationVariant()`: 0 the main one, 1 and up the variants | | Hanging | `GetHangShimmyRate()`: -1 to 1 along the ledge | | Wall run | `GetWallRunSide()`: 1 wall on the right, -1 on the left | | Ladder speed | `GetLadderClimbRate()`: -1 to 1 | | When it starts and ends | `OnTraversalStarted`, `OnTraversalFinished` (with the kind) | These are on `UTRCCharacterMovementComponent`, on `UTRCCharacterMoverComponent`, and, for your own Mover component, on the **TRC Mover Traversal Events** component. They give the same answer on every machine. On the CMC the kind is also visible in the movement mode itself: Custom, with custom mode 100 (vault), 101 (mantle), 102 (climb) or 103 (ladder), counted from **Traversal Custom Mode**. ## Foot IK after the slot If your Animation Blueprint runs foot IK after the montage slot (the third person template does, with `CR_Mannequin_FootIK`), turn it off while a traversal plays. The IK traces the floor under the feet and pulls them down to it: on a ladder the legs hang off the rungs, and a vault loses its tuck. Drive the IK node's Alpha with `GetTraversal() == None`. The example does it in C++: `UTRCExampleAnimInstance`, the parent of its `ABP_Unarmed`, sets the Control Rig node's Alpha to 0 during any traversal. ## The example's ladder cycle The template mannequin has no ladder animation, so the example makes one, `A_LadderClimb`, a 1 second loop in which the body rises 45 cm. For the hands to stay on the rungs, its **Speed** is `Ladder Speed / 45`. A cycle of your own follows the same rule: Speed = Ladder Speed × cycle length ÷ how far the body rises in one cycle.