Movement Paths - rmfandyplayz/UnityUIAnimationTools GitHub Wiki

By default, a step moves in a straight line to its To. A Custom Path makes it travel through points on the way instead: an arc for a card flying into a hand, a swoop, a zig-zag.

To                    Absolute   X 250    Y 150
Custom Path           Curved
Point 1               Absolute   X -50    Y 200    [-]
Point 2               Absolute   X 150    Y -100   [-]
                      [ Add Point ]  [ Edit Path in Scene ]

Set Custom Path (under To) to:

Custom Path Meaning
Disabled A straight line. The default.
Curved A smooth curve through every point
Linear Straight lines between the points, with a sharp corner at each

Then Add Point for each point along the way.

Paths and easing

The path is where it goes. The ease is still how fast. An Out Quad step still slows down as it reaches To, just along the curve. Apart from the ease, speed along the path is steady, so short and long stretches are covered at the same pace.

Points use To's mode

The points follow whatever mode To uses, shown beside each point:

  • Absolute: exactly as typed.
  • Baseline: offsets from the resting position.
  • Current: offsets from wherever the step starts. This makes a path you can reuse from anywhere: the same swoop works wherever the object happens to be.

The path starts from From if the step has one, otherwise from wherever the object is when the step begins.

Which steps can use a path

Anchored Position, Local Position, Size Delta, Offset Min, Offset Max and Scale. Not Rotation, and not punch or shake.

A path through Size Delta or Scale works (grow wide, then tall), it just can't be drawn in the Scene view.

With a shape chosen but no points, the step still moves in a straight line. Setting it back to Disabled keeps your points, so you can switch the path off to compare.

Editing a path in the Scene view

On a position step, Edit Path in Scene draws the path where the object will actually travel, with handles:

Do Get
Drag a numbered point Moves it
Drag To (green ring), or From (grey ring, if the step has one) Moves that end
Click a small + on a line Adds a point there
Ctrl+click (Cmd on Mac) a numbered point Removes it. It turns red while Ctrl is held over it
Esc, Done, or the button again Stops editing

Every drag can be undone. While editing, the move tool is hidden and clicking empty space does nothing, like Unity's own Edit Collider, so a missed handle can't move or deselect anything.

  • The path is drawn from where the step really starts. A step without a From starts wherever the steps before it leave the object, and that's where the path is drawn from. It also stays put while a preview plays.
  • It can't know where a different animation left things, so a step relying on that is drawn as if played from rest.
  • Only position steps, only on a player (not in an Animation Set), and not in play mode. The button greys out and says why.
  • Selecting something else, entering play mode or recompiling ends the edit.
Under the hood
  • Paths use DOTween's generic PathPlugin through DOTween.To, which is what lets one path drive anchoredPosition, sizeDelta or localScale. Curved is DOTween's Catmull-Rom path.
  • Rotation is excluded because DOTween rotates through a quaternion, not through the Euler values a path would pass through.
  • Speed is constant along the path (DOTween's constant-speed path percentage), with the ease applied on top.
  • Points move in the canvas plane, so a drag can't push one off the canvas in depth, even in a perspective Scene view. Drags go through Undo and mark prefab overrides exactly as typing into the Inspector would.
  • The Scene-view curve reproduces DOTween's own path maths, including its unusual end conventions, and was checked against a real path tween: the object stays within 0.001 units of the drawn line.
  • In code the dropdown is two fields, UseCustomPath and PathShape.
⚠️ **GitHub.com Fallback** ⚠️