Overview
Extracts the direction of travel (the tangent direction) at a position t on
a path. Pair it with path_sample (position) to create natural trajectory
animation—arrows, fish, cars, and other objects that face the direction they move.
Usage tips
- The go-to pair sends the same
tto bothpath_sample(→ translation) and Path Tangent (→transformrotation). The trick is to use one source to drivet. angleis in degrees (0–360) and connects directly totransformrotation.- If the object moves backward, place
path_reverseupstream or add 180 toangle.
Related nodes
path_sample— position counterpart (almost always used together)transform— apply the rotationpath_reverse— reverse the direction of travelmath_op— adjust the angle offsetVersion: 1
Behavior
- Gets the tangent vector at
twithsample_path_tangent(). - Normalizes the vector (converts it to length 1).
- Calculates the angle with
atan2and wraps it to 0–360°. - With no path connected, returns
direction=(1,0),angle=0°.
Examples
Rotation animation along a path
[Bezier Path] → path → [Path Tangent] → angle → [Transform(rotation)] → [Preview]
↑ t ↑
[Time Source → Remap] [Path Sample → x,y]
Promote t to an input pin 📌, connect the Time Source → Remap output, and combine
it with Path Sample to animate movement along the path while rotating to face the
direction of travel.
The sub_path_index slider limit follows the current input. A saved value that is
temporarily out of range is preserved with a warning and becomes active again when
the subpath count returns.