Small World Engine API Reference - v0.46.1
    Preparing search index...

    Class PathFollowerBehavior

    Moves an object along a 3D curve (e.g., CatmullRomSpline) over time. Optionally orients the object to face the direction of travel.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • curve: Curve3D

        The mathematical path to follow.

      • duration: number = 5.0

        Time in seconds to complete the path.

      • lookForward: boolean = true

        If true, aligns the object's rotation with the path's tangent (forward direction).

      • pingPong: boolean = false

        If true, the object reverses direction at the ends of the path. Otherwise it loops back to 0.

      Returns PathFollowerBehavior

    Properties

    curve: Curve3D
    duration: number
    isActive: boolean = true
    lookForward: boolean
    pingPong: boolean
    target: CameraInterfaceData | Object3D | undefined = undefined

    The object this behavior is attached to. Set automatically.

    uuid: string = ...
    inspector?: Record<string, InspectorField>

    Methods