dacha
    Preparing search index...

    Class Interpolation

    Smooths the drawn movement of an actor that moves in fixedUpdate.

    The transform keeps the real position. The renderer draws the smoothed one.

    Hierarchy (View Summary)

    Index
    actor?: Actor

    The actor that has this component. It is undefined until the component is added to an actor.

    disabled: boolean

    Whether smoothing is turned off. The renderer falls back to Transform.

    How render values are produced. interpolate blends between the last two fixed steps (smooth, adds up to one fixed step of visual latency). extrapolate projects the latest step forward using the rigid body velocity (no added latency, may briefly overshoot on impacts).

    extrapolate uses the world-space rigid body velocity against local-space snapshots, so it is intended for root-level actors.

    renderRotation: number = 0

    Render-facing local-space rotation, written by Interpolator

    renderX: number = 0

    Render-facing local-space position X, written by Interpolator

    renderY: number = 0

    Render-facing local-space position Y, written by Interpolator

    snapThreshold: number

    Maximum distance in world units treated as continuous movement between two fixed steps. Larger jumps snap instead of gliding. 0 disables the automatic snap detection.

    • get initialized(): boolean
      Advanced

      Whether the render-facing values hold a valid snapshot yet. false until the Interpolator takes its first snapshot after the component is (re)enabled.

      Returns boolean

    • Returns the component of the same class on the parent actor.

      Returns Component<object> | undefined

      The component, or undefined if the actor has no parent actor or the parent has no such component.

    • Requests an immediate jump to the Transform instead of smoothing toward it. Call right after teleporting the actor.

      Returns void