Guide

Make an entity follow a path

A PathFollow's waypoints are placed on the viewport rather than typed as numbers.

Waypoints placed on the viewport

Steps

  1. Add a PathFollow component to the entity.
  2. Click Select Waypoints in its Inspector section. The viewport becomes a click-to-place surface.
  3. Edit the path with the mouse, then click End Selection to commit and leave the mode.
InputEffect
ClickAppend a waypoint at the cursor's world position.
Drag a pointMove it (a fixed screen-pixel pick radius, so it is grabbable at any zoom).
Right-click a pointRemove it.
EscDiscard everything placed this session, restoring what was there before.
End SelectionCommit and exit the mode.
The Catmull-Rom spline overlay

Waypoints stay visible as pin markers after selection ends. Outside edit mode, a real Catmull-Rom curve, the same interpolation PathFollowingSystem uses at runtime, overlays the straight point-to-point lines, sampled at the component's own Resolution, so it previews the path the entity will actually follow.

Previous: Animate a sprite.