reckfellENGINE

PathFollow3D

Code-driven position and orientation along a parent Path3D Curve.

On this page
class PathFollow3DReckfellSharpInherits Entity3D

Make PathFollow3D a direct child of Path3D with a usable Curve3D and put the moving object under the follower. Assign Progress or ProgressRatio after tree entry. Motion is not automatic: for local speed, advance Progress += speed * (float)delta in your chosen processing loop. This follows transforms; handle physical collisions separately.

Progress is distance; ratio is its fraction of current baked length. Loop wraps distance without joining open geometry. Parent scale changes world speed. Progress assigned before tree entry may not normalize on entry, and reassigning identical 3D Progress does not refresh the transform.

RotationMode=None resets rotation on update; other modes correct the path frame. UseModelFront switches +Z/−Z and the HOffset axis. Tilt applies after axis correction and can add roll even with Y mode. Offset and scale are separate operations. Without a Curve the old transform can remain while ratio becomes 0; this is not arrival at the start.

Small nondegenerate paths and direct transform changes were tested in Windows headless. Physics movement, animation timing, vertical/degenerate orientation cases, gizmos and graphics were not accepted.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

PathFollow3DConstructor
# PathFollow3D
C#
public PathFollow3D();

Creates an Entity3D follower with Loop/CubicInterp/TiltEnabled=true, RotationMode=Xyz and UseModelFront=false. Requires a direct in-tree Path3D parent with a usable Curve3D. Advance Progress yourself; this changes transforms without physical collision solving.

Properties9

CubicInterpProperty
# CubicInterp
C#
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
# HOffset
C#
public float HOffset { get; set; }

Offset along final path-frame local X after RotationMode/UseModelFront/tilt. UseModelFront flips X and therefore this offset direction. Applied before restoring the follower own Scale; Path3D scale still affects world position.

LoopProperty
# Loop
C#
public bool Loop { get; set; }

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.

ProgressProperty
# Progress
C#
public float Progress { get; set; }

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.

ProgressRatioProperty
# ProgressRatio
C#
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.

RotationModeProperty
# RotationMode
C#
public PathFollow3D.RotationModeEnum RotationMode { get; set; }

Corrects the basis: None resets rotation on update, Y retains only Euler Y, Xy removes Z roll, Xyz retains all axes; calculations use YXZ order. Oriented rebuilds from the tangent with Y-up rather than retaining input roll. TiltEnabled applies AFTER correction and can restore tilt with Y/Xy. For Oriented heed the Curve.UpVectorEnabled warning; degenerate/vertical cases were not accepted here.

TiltEnabledProperty
# TiltEnabled
C#
public bool TiltEnabled { get; set; }

Applies Curve3D tilt radians after RotationMode and UseModelFront. Thus Y-only does not guarantee no roll when tilt is enabled. Skipped for RotationMode=None. Does not create curve tilt data.

UseModelFrontProperty
# UseModelFront
C#
public bool UseModelFront { get; set; }

With orientation enabled, uses model +Z rather than −Z front by flipping basis X/Z. Also changes HOffset direction. Changes neither Curve geometry nor length and has no effect with RotationMode=None.

VOffsetProperty
# VOffset
C#
public float VOffset { get; set; }

Offset along final path-frame local Y, not necessarily world-up. Curve tilt rotates it too; supply finite local-unit values.

Methods19

CorrectPostureTransform3D
# CorrectPosture
C#
public static Transform3D CorrectPosture(Transform3D transform, PathFollow3D.RotationModeEnum rotationMode);

Statically corrects an input Transform3D Basis by RotationMode while preserving Origin. None sets identity Basis; Y/Xy/Xyz rebuild from normalized YXZ Euler; Oriented builds tangent Y-up from −Basis.Z. Samples no curve and applies neither UseModelFront nor tilt; arbitrary input Basis scale is not a promised preserved contract. Returns a value without editing an Entity.

Parameters
NameTypeDefault
transformTransform3D—
rotationModePathFollow3D.RotationModeEnum—
transform

Transform3D with a usable direction/basis; use the returned result explicitly.

rotationMode

None, Y, Xy, Xyz or Oriented; see the description for axes and tilt.

Returns Transform3D

New Transform3D retaining Origin with a corrected Basis.

GetCubicInterpolationbool
# GetCubicInterpolation
C#
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.

Returns bool

Stored method setting, not a movement/readiness signal.

GetHOffsetfloat
# GetHOffset
C#
public float GetHOffset();

Reads HOffset. Offset along final path-frame local X after RotationMode/UseModelFront/tilt. UseModelFront flips X and therefore this offset direction. Applied before restoring the follower own Scale; Path3D scale still affects world position.

Returns float

Stored method setting, not a movement/readiness signal.

GetProgressfloat
# GetProgress
C#
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.

Returns float

Stored local distance, not seconds or percent.

GetProgressRatiofloat
# GetProgressRatio
C#
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.

Returns float

Progress / current length, or 0 without a usable path; not an arrival event.

GetRotationModePathFollow3D.RotationModeEnum
# GetRotationMode
C#
public PathFollow3D.RotationModeEnum GetRotationMode();

Reads RotationMode. Corrects the basis: None resets rotation on update, Y retains only Euler Y, Xy removes Z roll, Xyz retains all axes; calculations use YXZ order. Oriented rebuilds from the tangent with Y-up rather than retaining input roll. TiltEnabled applies AFTER correction and can restore tilt with Y/Xy. For Oriented heed the Curve.UpVectorEnabled warning; degenerate/vertical cases were not accepted here.

Returns PathFollow3D.RotationModeEnum

Stored method setting, not a movement/readiness signal.

GetVOffsetfloat
# GetVOffset
C#
public float GetVOffset();

Reads VOffset. Offset along final path-frame local Y, not necessarily world-up. Curve tilt rotates it too; supply finite local-unit values.

Returns float

Stored method setting, not a movement/readiness signal.

HasLoopbool
# HasLoop
C#
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.

Returns bool

Stored method setting, not a movement/readiness signal.

IsTiltEnabledbool
# IsTiltEnabled
C#
public bool IsTiltEnabled();

Reads TiltEnabled. Applies Curve3D tilt radians after RotationMode and UseModelFront. Thus Y-only does not guarantee no roll when tilt is enabled. Skipped for RotationMode=None. Does not create curve tilt data.

Returns bool

Stored method setting, not a movement/readiness signal.

IsUsingModelFrontbool
# IsUsingModelFront
C#
public bool IsUsingModelFront();

Reads UseModelFront. With orientation enabled, uses model +Z rather than −Z front by flipping basis X/Z. Also changes HOffset direction. Changes neither Curve geometry nor length and has no effect with RotationMode=None.

Returns bool

Stored method setting, not a movement/readiness signal.

SetCubicInterpolationvoid
# SetCubicInterpolation
C#
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.

Parameters
NameTypeDefault
enabledbool—
enabled

New flag value; see the method description for scope and update timing.

SetHOffsetvoid
# SetHOffset
C#
public void SetHOffset(float hOffset);

Sets HOffset. Offset along final path-frame local X after RotationMode/UseModelFront/tilt. UseModelFront flips X and therefore this offset direction. Applied before restoring the follower own Scale; Path3D scale still affects world position.

Parameters
NameTypeDefault
hOffsetfloat—
hOffset

Finite offset in the local frame determined by orientation mode.

SetLoopvoid
# SetLoop
C#
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.

Parameters
NameTypeDefault
loopbool—
loop

Enables wrapping on subsequent Progress assignments; does not close geometry.

SetProgressvoid
# SetProgress
C#
public void SetProgress(float progress);

Sets finite local distance and updates the transform with an active Path3D. In 1.0.0 an identical stored value returns BEFORE normalization: reassigning it neither fixes out-of-tree Progress nor forces a transform refresh. Initialize after path readiness and validate bounds.

Parameters
NameTypeDefault
progressfloat—
progress

Finite local distance, not time; Loop/clamp require a usable parent path.

SetProgressRatiovoid
# SetProgressRatio
C#
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.

Parameters
NameTypeDefault
ratiofloat—
ratio

Finite baked-length fraction; values outside 0..1 follow Loop.

SetRotationModevoid
# SetRotationMode
C#
public void SetRotationMode(PathFollow3D.RotationModeEnum rotationMode);

Sets RotationMode. Corrects the basis: None resets rotation on update, Y retains only Euler Y, Xy removes Z roll, Xyz retains all axes; calculations use YXZ order. Oriented rebuilds from the tangent with Y-up rather than retaining input roll. TiltEnabled applies AFTER correction and can restore tilt with Y/Xy. For Oriented heed the Curve.UpVectorEnabled warning; degenerate/vertical cases were not accepted here.

Parameters
NameTypeDefault
rotationModePathFollow3D.RotationModeEnum—
rotationMode

None, Y, Xy, Xyz or Oriented; see the description for axes and tilt.

SetTiltEnabledvoid
# SetTiltEnabled
C#
public void SetTiltEnabled(bool enabled);

Sets TiltEnabled. Applies Curve3D tilt radians after RotationMode and UseModelFront. Thus Y-only does not guarantee no roll when tilt is enabled. Skipped for RotationMode=None. Does not create curve tilt data.

Parameters
NameTypeDefault
enabledbool—
enabled

New flag value; see the method description for scope and update timing.

SetUseModelFrontvoid
# SetUseModelFront
C#
public void SetUseModelFront(bool enabled);

Sets UseModelFront. With orientation enabled, uses model +Z rather than −Z front by flipping basis X/Z. Also changes HOffset direction. Changes neither Curve geometry nor length and has no effect with RotationMode=None.

Parameters
NameTypeDefault
enabledbool—
enabled

New flag value; see the method description for scope and update timing.

SetVOffsetvoid
# SetVOffset
C#
public void SetVOffset(float vOffset);

Sets VOffset. Offset along final path-frame local Y, not necessarily world-up. Curve tilt rotates it too; supply finite local-unit values.

Parameters
NameTypeDefault
vOffsetfloat—
vOffset

Finite offset in the local frame determined by orientation mode.

PathFollow3D.RotationModeEnum

ValueDescription
None = 0

On PathFollow3D updates, resets rotation to identity while preserving own scale separately. Does not retain manual rotation like 2D Rotates=false. UseModelFront and tilt are skipped in this branch.

Oriented = 4

The current CorrectPosture rebuilds from tangent −Basis.Z with Y-up through looking_at rather than retaining the whole input roll/up frame. Keep Curve.UpVectorEnabled as required by the editor warning; this does not promise preservation of all cached up vectors after correction. UseModelFront and tilt may follow. Vertical/degenerate cases were not accepted here.

Xy = 2

During YXZ Euler correction, retains X/Y and zeros Z. Curve tilt is added afterward with TiltEnabled, so the final result need not remain roll-free.

Xyz = 3

Uses all corrected path-frame axes; the PathFollow3D default. Does not preserve arbitrary manual object orientation: the basis comes from Curve, followed by UseModelFront and tilt.

Y = 1

Retains Euler Y during YXZ basis correction. TiltEnabled applies later and can add roll; disable tilt if unwanted. A local path-frame rule rather than a physics rotation constraint.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.