Back to Node List

Path Tangent

path_tangent

Get the tangent direction at a position on a bezier path

Draft
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=終点)

概要

  • バージョン: 1

動作

  1. sample_path_tangent() で t 位置の接線ベクトルを取得
  2. ベクトルを正規化(長さ1に変換)
  3. atan2 で角度を計算し、0〜360° にラップ
  4. パス未接続時は direction=(1,0), angle=0° を返す

使用例

パスに沿った回転アニメーション

[BezierPath] → path → [PathTangent] → angle → [Transform(rotation)] → [Preview]
                            ↑ t                           ↑
                    [TimeSource → Remap]            [PathSample → x,y]

t を📌入力ピン化して TimeSource → Remap の出力を接続し、PathSample と組み合わせることで、パスに沿って移動しながら進行方向に回転するアニメーションが実現できます。

Back to Node List