Studio Yotsuba
Back to Node List

Path Sample

path_sample

Sample a path by legacy parameter, travel fraction, or pixel distance

Reviewed
Guide available

Input Ports

NameTypeDescription
Path
path
Path
Required
Bezier path to sample

Output Ports

NameTypeDescription
Position
position
Vec2
Position on the path at t
X
x
Float
X coordinate
Y
y
Float
Y coordinate
Tangent
tangent
Vec2
Unit direction of travel at the sampled point
Angle
angle
Float
Travel angle in degrees; 0 points right and 90 points down

Parameters

NameTypeDefaultRangeDescription / Options
Sampling Mode
sampling_mode
Enum
Parameter—

Choose how the sample position is measured

  • ParameterParameter
    Keep the original segment-based behavior for existing projects
  • ArcFractionArcFraction
    Use a true travel fraction so 0.5 is halfway by distance
  • DistanceDistance
    Use a pixel distance from the start
Sub-path
sub_path_index
Int
00–255

Index of the sub-path to sample (0 = first)

Position
t
Float
00–1 / step 0.01

Position on the path (0 = start, 1 = end)

Distance
distance
Float
00–4096 / step 0.5

Travel distance from the start in pixels; values past the end stop at the endpoint

Overview

Extracts coordinates at a position on a path (t = 0–1). It is an entry point for treating a path as a motion trajectory and the core of curved animation such as jumps, projectiles, and floating motion.

Usage tips

  • The golden pattern for trajectory animation is: promote t to an input pin 📌 → connect time_source + ease_in_out → send x / y to a transform translation. Editing the path shape then changes the motion.
  • t is the progress through the entire path. Constant-rate movement may appear to change speed in highly curved sections because segments are divided evenly. Adjust with easing when necessary.
  • It also works for static placement: set t manually to place an ornament at a specific position on the path.

Related nodes

  • path_tangent — when you need direction as well as position

  • transform — a destination for the coordinates

  • ease_in_out / time_source — drive t

  • path_reverse — travel in the opposite direction

  • Version: 1

Behavior

Sampling with normalized t

t is a normalized parameter across the entire path:

  • t = 0.0 → start of the path (p0 of the first segment)
  • t = 1.0 → end of the path (p3 of the last segment)
  • With multiple segments, t is distributed evenly among them

For example, with t = 0.5 on a three-segment path:

  • 0.5 × 3 = 1.5 → local_t = 0.5 on the second segment (index 1)

With no path connected

All coordinates return (0.0, 0.0).

Examples

Path animation (jump trajectory)

[Bezier Path] → path → [Path Sample] → x, y → [Transform] → [Preview]
                            ↑ t
[Time Source] → [Ease In/Out] → t

Promote the t parameter to an input pin 📌 and connect the Ease In/Out output to create path animation with easing.

Draw a trail along a path

[Bezier Path] → path → [Path Sample] → x, y → [Transform(move target image)]
                            ↑ t                         ↓
                       [Remap(0–1)]                [Blend] → [Preview]

Static position reference

Set t manually to obtain the coordinates of a specific point on the path. Use it to place a character or as the origin of an effect.

Notes

  • t is normalized across the entire path, not within one segment.
  • promotable: true on t allows promotion to an input pin for animation control.
  • The position (Vec2) and x, y (Float) outputs provide the same coordinates in different types.
Back to Node List