Vixen
02b45cc4
csharp
public sealed class NetworkAnimatorApplySystem

Drives an animator from what arrived.

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

As a system

Phase
PreRender

Remarks

The parameters are written and the animator is left to run. That is the whole point of sending inputs: the receiving animator evaluates its own transitions, blends its own layers and produces its own pose, so everything the animation system does locally keeps working — events fire, root motion is computed, IK runs.

The state is a correction, not a command, and only when it disagrees. Calling Play every tick would restart the state every tick and nothing would ever animate. So the state is applied only when the receiver's machine is somewhere else — which is a late joiner, a client that missed a parameter edge, or a genuine divergence — and it is applied with a short crossfade rather than a cut, because a correction the player can see is worse than a correction that takes a tenth of a second.

Fields and properties (6)

  • public const float CorrectionCrossfade

    How long a corrected state takes to blend in.

  • public SystemAccess Access

    What this system reads and writes.

  • public NetworkRulesRegistry? Rules

    Who decides what, and who this peer is. Null is server-authoritative.

  • public PlayerId Local

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

  • public long AppliedCount

    How many animators have been driven from the wire.

  • public long CorrectedCount

    How many were somewhere else and had their state corrected.

Methods (3)

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

    Runs the system.

  • public void Apply(World world)

    Drives every networked animator this peer does not decide.

  • public bool IsAuthority(NetworkId id)

    Whether this peer decides how an object animates.

Used by (1)

  • NetworkAnimatorTestsVixen.Net.Animation.Tests