Quick Start
Get one attack warping onto a target. Four steps: a montage window, a profile, a component, and one node.
ACharacter with a Gameplay Ability that plays an attack montage, and a montage whose Enable Root Motion is ticked. Something must supply a target: the plugin asks the avatar for an ICrimsonWarpTargetProvider. If nothing on your pawn implements it, pass a target explicitly - see How-To: Get the Building Blocks.1. Add the warp window to your montage
Open the attack montage. Drag a Motion Warping notify state onto the notify track, covering only the frames where the character actually travels. Set its Root Motion Modifier to Skew Warp, and type a Warp Target Name - AttackTarget is a good default. You will type this exact name once more, on the profile.
has essentially no authored root motion, your notify is over frames where the character does not move - drag it onto the travelling frames.2. Create a warp profile
In the Content Browser, create a Data Asset and pick CrimsonWarpProfile as its class. Set Warp Target Name to the exact string you typed on the notify. Leave everything else at its default - the defaults are a working melee lunge.
Warp Target Name of None is an error, because nothing could ever address the window.3. Add the component to your character
Open the character Blueprint and add a Crimson Motion Warping component. It finds the engine's UMotionWarpingComponent on your character, or creates and registers one if there is none - you do not need to add both.
LogCrimsonMotionWarping errors. If it says the owner is not an ACharacter, the component is on the wrong actor.4. Resolve the warp in the ability
In the attack ability, run Crimson Warp To Target before playing the montage, and drive the montage from its On Resolved pin. The node decides where the character should land; it does not play anything itself.
Event ActivateAbility -> Crimson Warp To Target (Profile = your profile asset, Montage = your attack montage) -> On Resolved -> Play Montage and Wait (Montage In = the same montage).
Wire On Failed to whatever should happen when there is nothing to warp toward. Playing the montage anyway is a perfectly good answer - the attack simply swings where the character is already facing.
Now run Play As Client with 2 players and Run Dedicated Server, and attack on a client. The character must not rubber-band, and the other client must see the same movement. A listen server will not exercise this - the host is both authority and locally controlled, so it never takes the interesting path.
See also
- How-To: Get the Building Blocks - supplying targets, and every prerequisite the other pages assume
- How-To: Diagnose a Warp - when the first attack does not do what you expect
- Concept: How Reach Is Derived - what the defaults actually mean