public sealed class NetworkRigidBodyReplicatorPuts a networked body's motion on the wire beside its transform.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Its own replicator rather than fields on NetworkTransformReplicator, for the reason the delta encoder rewards: a component is the unit of change, and a body's position changes every tick while its rest flag changes twice in a match. Folding them together would mean the flag's lane paying attention every time the body moved.
Unreliable, like the transform beside it. A velocity that was missed is superseded by the next one a thirtieth of a second later, and the correction spring is what covers the gap — which is precisely what it is for.
Fields and properties (9)
public const int VelocityBitsHow many bits each velocity axis costs.
public static QuantizeRange VelocityRangeThe range a replicated velocity lives in, in metres or radians a second.
public ComponentTypeId ComponentTypeWhich component this replicates.
public uint TypeIdThe id this type has on the wire: a hash of its full name, computed at build time.
public string TypeNameThe name, for diagnostics and for the bandwidth attribution panel.
public Channel ChannelHow to send it.
public int PriorityBelow the transform's. A body whose position arrived without its velocity is drawn in the right place and carried badly for one tick; the other way round it is carried well to the wrong place.
public QueryDescription ChangedQueryA query matching entities with this component, filtered on it having changed.
public ReadOnlySpan<WireLane> LanesThe fixed-width fields Write produces, in the order it produces them.
Methods (3)
public bool Has(World world, Entity entity)Whether an entity has this component at all.
public void Write(World world, Entity entity, ref BitWriter writer)Encodes an entity's component.
public bool Apply(World world, Entity entity, ref BitReader reader)Decodes a component and puts it on an entity, adding it if it is not there.
Used by (1)
- NetworkRigidBodyTestsVixen.Net.Physics.Tests