A* Pathfinding Project
3.8
The A* Pathfinding Project for Unity 3D
|
Unity front end for an RVO simulator. More...
Unity front end for an RVO simulator.
Attached to any GameObject in a scene, scripts such as the RVOController will use the simulator exposed by this class to handle their movement.
You can have more than one of these, however most script which make use of the RVOSimulator will find it by FindObjectOfType, and thus only one will be used.
This is only a wrapper class for a Pathfinding.RVO.Simulator which simplifies exposing it for a unity scene.
Public Member Functions | |
Simulator | GetSimulator () |
Get the internal simulator. | |
Public Attributes | |
Pathfinding.RVO.Simulator.SamplingAlgorithm | algorithm = Pathfinding.RVO.Simulator.SamplingAlgorithm.GradientDecent |
What sampling algorithm to use. | |
int | desiredSimulationFPS = 20 |
Desired FPS for rvo simulation. | |
float | desiredVelocityWeight = 0.1f |
bool | doubleBuffering |
Calculate local avoidance in between frames. | |
float | incompressibility = 30 |
Higher values will raise the penalty for agent-agent intersection. | |
bool | interpolation = true |
Interpolate positions between simulation timesteps. | |
bool | oversampling |
float | qualityCutoff = 0.05f |
A higher value will result in lower quality local avoidance but faster calculations. | |
float | stepScale = 1.5f |
float | wallThickness = 1 |
ThreadCount | workerThreads = ThreadCount.Two |
Number of RVO worker threads. | |
Private Member Functions | |
void | Awake () |
void | OnDestroy () |
void | Update () |
Update the simulation. | |
Private Attributes | |
Pathfinding.RVO.Simulator | simulator |
Reference to the internal simulator. | |
|
private |
Simulator GetSimulator | ( | ) |
Get the internal simulator.
Will never be null
|
private |
|
private |
Update the simulation.
Pathfinding.RVO.Simulator.SamplingAlgorithm algorithm = Pathfinding.RVO.Simulator.SamplingAlgorithm.GradientDecent |
What sampling algorithm to use.
int desiredSimulationFPS = 20 |
Desired FPS for rvo simulation.
It is usually not necessary to run a crowd simulation at a very high fps. Usually 10-30 fps is enough, but can be increased for better quality. The rvo simulation will never run at a higher fps than the game
float desiredVelocityWeight = 0.1f |
bool doubleBuffering |
Calculate local avoidance in between frames.
If this is enabled and multithreading is used, the local avoidance calculations will continue to run until the next frame instead of waiting for them to be done the same frame. This can increase the performance but it can make the agents seem a little less responsive.
This will only be read at Awake.
float incompressibility = 30 |
Higher values will raise the penalty for agent-agent intersection.
bool interpolation = true |
Interpolate positions between simulation timesteps.
If you are using agents directly, make sure you read from the InterpolatedPosition property.
bool oversampling |
float qualityCutoff = 0.05f |
A higher value will result in lower quality local avoidance but faster calculations.
Valid range is [0...1]
|
private |
Reference to the internal simulator.
float stepScale = 1.5f |
float wallThickness = 1 |
ThreadCount workerThreads = ThreadCount.Two |
Number of RVO worker threads.
If set to None, no multithreading will be used.