Class SimulatorBurst

Public

Local Avoidance Simulator.

This class handles local avoidance simulation for a number of agents using Reciprocal Velocity Obstacles (RVO) and Optimal Reciprocal Collision Avoidance (ORCA).

This class will handle calculation of velocities from desired velocities supplied by a script. It is, however, not responsible for moving any objects in a Unity Scene. For that there are other scripts (see below).

Agents be added and removed at any time.

You will most likely mostly use the wrapper class RVOSimulator.

A* Pro Feature:

This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited.
The Pro version can be bought here

Inner Types

Holds internal agent data for the local avoidance simulation.

Holds internal obstacle data for the local avoidance simulation.

Public Methods

AddAgent (position)

Add an agent at the specified position.

Public
AddAgentBurst (position)

Add an agent at the specified position.

Public
AgentExists (agent)
Public
BlockUntilSimulationStepDone ()
Public
ClearAgents ()

Removes all agents from the simulation.

Public
LockSimulationDataReadOnly (dependencies)
Public
OnDestroy ()

Frees all used memory.

Public
RemoveAgent (agent)

Removes a specified agent from this simulation.

Public
RemoveAgent (agent)
Public
SimulatorBurst (movementPlane)

Create a new simulator.

Public
Update (dependency, dt, drawGizmos, allocator)

Should be called once per frame.

Public

Public Variables

AgentBounds
Public
AgentCount

Number of agents in the simulation.

Public
DesiredDeltaTime

Time in seconds between each simulation step.

Public
HardCollisions

Use hard collisions.

Public
MovementPlane
Public
SymmetryBreakingBias

Bias agents to pass each other on the right side.

Public
drawQuadtree
Public
movementPlane

Determines if the XY (2D) or XZ (3D) plane is used for movement.

Public Readonly
obstacleData

Internal obstacle data.

Public
outputData

Internal simulation data.

Public
quadtree

Quadtree for this simulation.

Public
simulationData

Internal simulation data.

Public

Public Static Variables

MaxBlockingAgentCount
Public Static
MaxNeighbourCount
Public Static
MaxObstacleVertices
Public Static

Private/Protected Members

AllocateAgentSpace ()
Private
PreCalculation ()
Private
UpdateInternal<T> (dependency, deltaTime, drawGizmos, allocator)
Private
agentPreCalculationCallbacks
Private
debugDrawingScope

Scope for drawing gizmos even on frames during which the simulation is not running.

Private
desiredDeltaTime

Inverse desired simulation fps.

Private
freeAgentIndices
Private
horizonAgentData
Private
lastJob

Job handle for the last update.

Private
numAgents

Number of agents in this simulation.

Private
temporaryAgentData
Private

Deprecated Members

AddAgent (position, elevationCoordinate)

Add an agent at the specified position.

Public
AddAgent (agent)
Public