[This is preliminary documentation and is subject to change.]
Assembly: cai-nav (in cai-nav.dll) Version: 0.4.0.0 (0.4.0.0)
XNA Framework Only
.NET Compact Framework Only
Adds an agent to the manager.
The number of agents being managed.
|Create(Int32, Single, Navmesh)|
Creates a new crowd manager.
Gets the shared avoidance configuration for a specified index.
The extents used by the manager when it performs queries against the navigation mesh.
Gets the velocity sample count.
True if the object has been disposed and should no longer be used.(Overrides ManagedObject..::..IsDisposed.)
The agent from the agent buffer.
The maximum allowed agent radius supported by the object.
The maximum number agents that can be managed by the object.
The maximum number of avoidance configurations that can be associated with the manager.
The navigation mesh used by the object.
Gets the proximity grid.
The navmesh query used by the manager.
The query filter used by the manager.
Removes an agent from the manager.
Immediately frees all unmanaged resources allocated by the object.(Overrides ManagedObject..::..RequestDisposal()()()().)
Sets the shared avoidance configuration for a specified index.
Updates the steering and positions for all agents.
This is the core class for all crowd features.
The standard method for setting up the crowd is as follows:
- Construct the crowd object.
- Set the avoidance configurations using SetAvoidanceConfig(Int32, CrowdAvoidanceParams).
- Add agents using AddAgent(Vector3, CrowdAgentParams) and make an initial movement request using RequestMoveTarget(NavmeshPoint).
The standard process for managing the crowd is as follows:
- Call Update(Single) to allow the crowd to manage its agents.
- Use the CrowdAgent objects to retreive state, such as position.
- Make movement requests using RequestMoveTarget(NavmeshPoint) and AdjustMoveTarget(NavmeshPoint).
- Repeat every frame.
Some agent configuration settings can be updated using SetConfig(CrowdAgentParams). But the crowd owns the agent position and velocity. If agent position must be fed back into the crowd, the agent must be removed and re-added.
- Path related information is available for newly added agents only after an Update(Single) has been performed.
- This class is meant to provide 'local' movement. There is a limit of 256 polygons in the path corridor. So the crowd can't provide pathfinding services over long distances.
Behavior is undefined if used after disposal.