public sealed class NavigationSystemJoins the entities that have a NavigationAgent to a Crowd, runs it, and puts the results back on the entities.
No guide page documents this yet — the page shows what the code says about itself.
As a system
- Phase
- Update
- Reads
- NavigationDestination
Remarks
The crowd is the simulation and this is the seam. Everything interesting — paths, steering, avoidance — happens in Crowd, which knows nothing about entities and can be used without a world at all; what this adds is that the set of agents is a query rather than a list, so an entity that is spawned joins the crowd and an entity that is destroyed leaves it, without anybody calling anything.
It writes LocalTransform, so an agent should be a root entity. A parented one would have its world-space position written into a local-space field, which the transform pass would then compose with its parent's — the agent would be somewhere else entirely. Characters that walk are roots in practice; the alternative is a full inverse-parent solve for a case that does not arise.
Runs in Update, so the transforms it writes are resolved by the transform pass in PreRender in the same frame.
Fields and properties (2)
public Crowd CrowdThe crowd being driven.
public SystemAccess Access
Methods (3)
public NavigationSystem(Crowd crowd)Creates the system over a crowd.
public override JobHandle Update(in SystemContext context, JobHandle dependency)Runs the system.
public void Step(World world, float deltaTime)Runs one step of the crowd against a world.
Used by (1)
- NavigationSystemTestsVixen.Navigation.Tests