Back to Node List

Path Tangent

path_tangent

Get the tangent direction at a position on a bezier path

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
パス
path
Path
Required
接線をサンプリングするベジェパス

Output Ports

NameTypeDescription
方向
direction
Vec2
正規化された接線方向ベクトル
角度
angle
Float
接線の角度(0〜360°)

Parameters

NameTypeDefaultRangeDescription / Options
サブパス
sub_path_index
Int
00–255

接線サンプリング対象のサブパス番号(0 = 最初)

位置
t
Float
00–1 / step 0.01

パス上の位置(0=始点、1=終点)

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 t to both path_sample (→ translation) and Path Tangent (→ transform rotation). The trick is to use one source to drive t.
  • angle is in degrees (0–360) and connects directly to transform rotation.
  • If the object moves backward, place path_reverse upstream or add 180 to angle.

Related nodes

  • path_sample — position counterpart (almost always used together)

  • transform — apply the rotation

  • path_reverse — reverse the direction of travel

  • math_op — adjust the angle offset

  • Version: 1

Behavior

  1. Gets the tangent vector at t with sample_path_tangent().
  2. Normalizes the vector (converts it to length 1).
  3. Calculates the angle with atan2 and wraps it to 0–360°.
  4. 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.

Back to Node List