Vixen
02b45cc4
csharp
public struct NavigationAgent

An entity that walks on the navmesh.

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

Remarks

The authored half is the size and the speed; Handle is the system's, and is how the entity is joined to its agent in the Crowd. It is written once, when the entity is first seen, and read every frame after that.

Adding this component is what puts an entity in the crowd, and removing it or destroying the entity is what takes it out — there is no register call. That is the ECS bargain: the set of things being simulated is a query, not a list somebody has to keep in step.

Fields and properties (7)

  • public float Radius

    How wide the entity is. Should match what the mesh was baked for.

  • public float Height

    How tall it is.

  • public float MaxSpeed

    The fastest it walks.

  • public float MaxAcceleration

    How quickly it can change velocity.

  • public bool AvoidanceEnabled

    Whether it steers around other agents.

  • public CrowdAgentHandle Handle

    Which agent of the crowd this is. Owned by NavigationSystem.

  • public uint AppliedDestination

    The Version the crowd has already been told about. Owned by NavigationSystem.

Methods (1)

  • public static NavigationAgent Default()

    A human-sized walker, not yet joined to a crowd.

Used by (2)

  • NavigationSystemVixen.Navigation
  • NavigationSystemTestsVixen.Navigation.Tests