Vixen
dd8b0a81
csharp
public readonly record struct TransformSample

Where something was, at a tick.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ The counter used to be written, quantised, sent, decoded — and dropped here. The buffer inferred a teleport from the distance between two samples instead, which is the inference the counter exists to replace: at a 20 Hz snapshot rate the shipped five-metre threshold is a hundred metres a second, so a projectile, a launched vehicle or a fast lift was snapped as though it had teleported, and a two-metre teleport was smoothed across the jump. Carrying the counter on the sample is what lets the buffer be told rather than guess.

Optional so that the three-argument form still compiles: a game sampling something that has no counter — a camera path, a replay — leaves it at zero, and a value that never changes never triggers a snap.

Fields and properties (4)

  • public Tick Tick

    The tick the server stamped on it.

  • public Vector3 Position

    Where it was.

  • public Quaternion Rotation

    Which way it faced.

  • public byte TeleportCount

    NetworkTransform.TeleportCount as it stood when this sample was taken. A change between two consecutive samples means the object was put at the second one rather than having moved there, so nothing may interpolate or extrapolate across the pair.

Methods (1)

  • public TransformSample(Tick Tick, Vector3 Position, Quaternion Rotation, byte TeleportCount = 0)

    Where something was, at a tick.

Used by (4)

  • GameClientMultiplayer
  • MotionTestsVixen.Net.Tests
  • NetworkTransformInterpolateSystemVixen.Net.Engine
  • SnapshotBufferVixen.Net