Nebula
Core

RemoteInterpolator

Tick-indexed transform buffer for copies of an entity this process does not simulate: ghosts on a worker and remote entities on a client.

generated from the sources
public sealed class RemoteInterpolator : MonoBehaviour

Tick-indexed transform buffer for copies of an entity this process does not simulate: ghosts on a worker and remote entities on a client. The consumer decides at which (fractional) tick to sample.

Properties

LatestTick

public uint LatestTick { get; }

HasSamples

public bool HasSamples { get; }

LatestVelocity

public Vector3 LatestVelocity { get; }

LatestPosition

public Vector3 LatestPosition { get; }

LatestRotation

public Quaternion LatestRotation { get; } = Quaternion.identity;

Methods

Push

public void Push(uint tick, Vector3 position, Quaternion rotation, Vector3 velocity);

Shift

public void Shift(Vector3 delta);

The floating origin moved: every buffered position follows.

Clear

public void Clear();

Sample

public bool Sample(double renderTick, out Vector3 position, out Quaternion rotation);

Interpolated pose at renderTick. Falls back to extrapolating from the newest sample by its velocity (capped) when asked for a time we have not received yet.

On this page