Vixen
02b45cc4
csharp
public sealed class NetworkRigidBodyCaptureSystem

Publishes a body's motion, on the peer that owns the simulation.

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

As a system

Phase
FixedUpdate

Remarks

Runs after physics has written its results back, and before the replication capture reads them. That ordering is the whole job — a tick out of place here publishes last tick's motion, which is a systematic one-tick lag that nothing reports and that lag compensation would then faithfully rewind to.

It also translates PhysicsTeleport into NetworkTeleport, so a body the simulation moved discontinuously is one the receiver refuses to interpolate across. Two tags rather than one because the physics package cannot know about the network one, and this is the package that knows about both.

Fields and properties (6)

  • public const float RestSpeed

    Below this speed a body is called stopped and its velocity stops being sent.

  • public NetworkRulesRegistry? Rules

    Who decides what, and who this peer is.

  • public PlayerId Local

    Which player this peer is, or None for a server.

  • public SystemAccess Access

    What this system reads and writes.

  • public long PublishedCount

    How many bodies have been published.

  • public long RestingCount

    How many were at rest and therefore cost nothing.

Methods (3)

  • public override JobHandle Update(in SystemContext context, JobHandle dependency)

    Runs the system.

  • public void Publish(World world)

    Publishes every networked body's motion.

  • public bool IsAuthority(NetworkId id)

    Whether this peer is the one that decides where a body is.

Used by (1)

  • NetworkRigidBodyTestsVixen.Net.Physics.Tests