Concept: How Reach Is Derived

The plugin never hands the engine the target's location. It hands over a point computed so that the engine's own scale ratio already sits inside a band you authored. Skew warp keeps doing exactly what it does today - it simply never receives a target outside the animation's intent.

The two distances are not the same

The mistake stock Motion Warping invites is treating distance-to-target as distance-to-travel. They differ by the standoff you need in order not to end up inside the target.

text
MyLoc TargetLoc
| |
|<--------------- DistanceToTarget ----------->|
| |
|<------- GapToClose ------->|<-StopDistance-->|
^
WarpPoint (where the root actually lands)
StopDistance = SelfCapsuleRadius + TargetCapsuleRadius + ContactOffset
GapToClose = max(0, DistanceToTarget - StopDistance)
NaturalTravel = the window's authored travel, read off the montage
RequiredScale = GapToClose / NaturalTravel
AppliedScale = min(RequiredScale, ScaleBand upper bound)
WarpPoint = PredictedStart + DirectionToTarget * (NaturalTravel * AppliedScale)

Worked example

A 500cm lunge, two 40cm capsules, no contact offset - so a standoff of 80cm and a usable gap of 150 to 650cm.

Target atGap to closeRequired scaleResult
900cm820cm1.64xClamped: travels 650cm, falls short by 170cm
250cm170cm0.34xTravels 170cm - not 500, and not 250
100cm20cm0.04xCompressed: effectively swings in place
60cm (overlapping)0cm0No travel; rotation warping still faces the target

The 250cm row is the one worth dwelling on. The character travels neither the animation's authored 500cm - which would sail 250cm past the target - nor the raw 250cm to the target, which would end up inside it. It travels the 170cm gap.

Why reach is a multiplier, not a distance

Expressing the band as a multiple of the animation's own travel buys two properties that a number in centimetres cannot.

  • Swapping the animation re-tunes the attack. Replace a 500cm lunge with a 300cm one and every threshold moves with it. There is no authored distance left to drift out of sync.
  • One profile serves every enemy size. The standoff comes from both capsule radii at runtime, so the same asset stops correctly against a rat and against a boss with no per-enemy data.

Measured from where you will be, not where you are

The engine captures a warp modifier's starting transform when its window opens, not when the ability activates. On a montage with a wind-up step before the warp window, measuring from the character's current position would measure from an origin it will never occupy. The plugin therefore predicts the window-opening position by adding the montage's pre-window root motion, and every distance above is measured from there.

The predicted start is an estimate
The prediction rotates the pre-window travel by the character's rotation at resolve time, so a player who keeps turning during a long wind-up will shift it. The error is bounded by the size of that lead-in, which is zero on most attack montages. The asset validator warns when a montage travels more than 50cm before its warp window opens.

Several windows under one name

When a montage has more than one warp window sharing a name, the plugin measures reach across the whole span and plants one target for all of them. The engine, however, scales each window against its own authored travel - so a first window separated from the rest by untracked root motion can stretch further than the band implies. First Window Scale on the result exposes this, and the validator warns when the untracked gap is large.

See also

  • How-To: Tune Reach and Standoff
  • Concept: Multiplayer Authority