PathFollow2D
Position and orientation along the parent Path2D Curve.
Make PathFollow2D a child of a Path2D with a nonempty Curve. Progress is local baked-path distance; ProgressRatio is a length fraction. Advance Progress by speed × delta for local units per second.
Rotates points local +X along the path. Loop repeats distance without closing open geometry. Path2D scale affects world speed. This follows a route rather than moving a collision-aware physics body.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
PathFollow2DConstructor
public PathFollow2D();Creates an Entity2D follower. Make it a direct child of Path2D with a nonzero-length Curve2D, and place the moving visual object under the follower. Supply timing/speed in code. Performs no physical collision resolution.
Properties7
CubicInterpProperty
public bool CubicInterp { get; set; }Cubic interpolation of the baked cache, true by default. Neither exact Bezier sampling nor a physics setting; sparse-cache positions can differ from linear distance sampling. Setter changes the flag without immediately recalculating transform. Configure before changing Progress; in 3D reassigning identical Progress also does not refresh transform.
HOffsetProperty
public float HOffset { get; set; }With Rotates=true, offsets along the tangent (path-frame +X), not necessarily screen-right. false adds to Path2D local X. Applied when updating position; parent scale affects the world offset.
LoopProperty
public bool Loop { get; set; }Wraps distance at the route boundary. Does not automatically connect an open Curve endpoint or tangent.
ProgressProperty
public float Progress { get; set; }Local-unit distance along the parent Path2D baked Curve. Advance by speed × delta; path scale changes world speed.
ProgressRatioProperty
public float ProgressRatio { get; set; }Fraction of current baked length: setter passes ratio×length to Progress. Requires a direct Path parent inside the tree, a Curve and nonzero length. Values outside 0..1 follow Loop/clamp rather than separate clamping. Getter returns 0 without a usable path, not proof of arrival at the start. A length change preserves distance rather than the old ratio.
RotatesProperty
public bool Rotates { get; set; }Points local +X along the tangent. false updates position while preserving your manual rotation. Toggling immediately updates the transform and changes the HOffset/VOffset frame. Defines neither angular speed nor smoothing.
VOffsetProperty
public float VOffset { get; set; }With Rotates=true, offsets along path-frame side (+Y); false uses Path2D local Y. Neither Z depth nor guaranteed world vertical.
Methods14
GetCubicInterpolationbool
public bool GetCubicInterpolation();Reads CubicInterp. Cubic interpolation of the baked cache, true by default. Neither exact Bezier sampling nor a physics setting; sparse-cache positions can differ from linear distance sampling. Setter changes the flag without immediately recalculating transform. Configure before changing Progress; in 3D reassigning identical Progress also does not refresh transform.
boolStored method setting, not a movement/readiness signal.
GetHOffsetfloat
public float GetHOffset();Reads HOffset. With Rotates=true, offsets along the tangent (path-frame +X), not necessarily screen-right. false adds to Path2D local X. Applied when updating position; parent scale affects the world offset.
floatStored method setting, not a movement/readiness signal.
GetProgressfloat
public float GetProgress();Reads Progress. Local-unit distance along the parent Path baked curve, not seconds. Advance Progress by speed×delta yourself; no automatic motion occurs. With an active path the setter applies Loop/clamp. A value assigned before tree entry can remain out of range: initialize after attaching Path/Curve. Parent scale changes world speed.
floatStored local distance, not seconds or percent.
GetProgressRatiofloat
public float GetProgressRatio();Reads ProgressRatio. Fraction of current baked length: setter passes ratio×length to Progress. Requires a direct Path parent inside the tree, a Curve and nonzero length. Values outside 0..1 follow Loop/clamp rather than separate clamping. Getter returns 0 without a usable path, not proof of arrival at the start. A length change preserves distance rather than the old ratio.
floatProgress / current length, or 0 without a usable path; not an arrival event.
GetVOffsetfloat
public float GetVOffset();Reads VOffset. With Rotates=true, offsets along path-frame side (+Y); false uses Path2D local Y. Neither Z depth nor guaranteed world vertical.
floatStored method setting, not a movement/readiness signal.
HasLoopbool
public bool HasLoop();Reads Loop. On Progress assignment, wraps distance by path length; false clamps to 0..length. A nonzero length multiple is retained at the endpoint rather than necessarily zero. Joins neither endpoints nor tangents of open geometry and starts no motion. Toggling the flag does not normalize an already stored distance.
boolStored method setting, not a movement/readiness signal.
IsRotatingbool
public bool IsRotating();Reads Rotates. Points local +X along the tangent. false updates position while preserving your manual rotation. Toggling immediately updates the transform and changes the HOffset/VOffset frame. Defines neither angular speed nor smoothing.
boolStored method setting, not a movement/readiness signal.
SetCubicInterpolationvoid
public void SetCubicInterpolation(bool enabled);Sets CubicInterp. Cubic interpolation of the baked cache, true by default. Neither exact Bezier sampling nor a physics setting; sparse-cache positions can differ from linear distance sampling. Setter changes the flag without immediately recalculating transform. Configure before changing Progress; in 3D reassigning identical Progress also does not refresh transform.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledNew flag value; see the method description for scope and update timing.
SetHOffsetvoid
public void SetHOffset(float hOffset);Sets HOffset. With Rotates=true, offsets along the tangent (path-frame +X), not necessarily screen-right. false adds to Path2D local X. Applied when updating position; parent scale affects the world offset.
| Name | Type | Default |
|---|---|---|
hOffset | float | — |
hOffsetFinite offset in the local frame determined by orientation mode.
SetLoopvoid
public void SetLoop(bool loop);Sets Loop. On Progress assignment, wraps distance by path length; false clamps to 0..length. A nonzero length multiple is retained at the endpoint rather than necessarily zero. Joins neither endpoints nor tangents of open geometry and starts no motion. Toggling the flag does not normalize an already stored distance.
| Name | Type | Default |
|---|---|---|
loop | bool | — |
loopEnables wrapping on subsequent Progress assignments; does not close geometry.
SetProgressvoid
public void SetProgress(float progress);Sets Progress. Local-unit distance along the parent Path baked curve, not seconds. Advance Progress by speed×delta yourself; no automatic motion occurs. With an active path the setter applies Loop/clamp. A value assigned before tree entry can remain out of range: initialize after attaching Path/Curve. Parent scale changes world speed.
| Name | Type | Default |
|---|---|---|
progress | float | — |
progressFinite local distance, not time; Loop/clamp require a usable parent path.
SetProgressRatiovoid
public void SetProgressRatio(float ratio);Sets ProgressRatio. Fraction of current baked length: setter passes ratio×length to Progress. Requires a direct Path parent inside the tree, a Curve and nonzero length. Values outside 0..1 follow Loop/clamp rather than separate clamping. Getter returns 0 without a usable path, not proof of arrival at the start. A length change preserves distance rather than the old ratio.
| Name | Type | Default |
|---|---|---|
ratio | float | — |
ratioFinite baked-length fraction; values outside 0..1 follow Loop.
SetRotatesvoid
public void SetRotates(bool enabled);Sets Rotates. Points local +X along the tangent. false updates position while preserving your manual rotation. Toggling immediately updates the transform and changes the HOffset/VOffset frame. Defines neither angular speed nor smoothing.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledNew flag value; see the method description for scope and update timing.
SetVOffsetvoid
public void SetVOffset(float vOffset);Sets VOffset. With Rotates=true, offsets along path-frame side (+Y); false uses Path2D local Y. Neither Z depth nor guaranteed world vertical.
| Name | Type | Default |
|---|---|---|
vOffset | float | — |
vOffsetFinite offset in the local frame determined by orientation mode.