A* Pathfinding Project  3.8
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
RVOSimulator Class Reference

Unity front end for an RVO simulator. More...

Detailed Description

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.

See Also
Pathfinding.RVO.Simulator
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

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.
 

Member Function Documentation

void Awake ( )
private
Simulator GetSimulator ( )

Get the internal simulator.

Will never be null

void OnDestroy ( )
private
void Update ( )
private

Update the simulation.

Member Data Documentation

Pathfinding.RVO.Simulator.SamplingAlgorithm algorithm = Pathfinding.RVO.Simulator.SamplingAlgorithm.GradientDecent
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.

See Also
Pathfinding.RVO.Simulator.DoubleBuffering
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]

Pathfinding.RVO.Simulator simulator
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.


The documentation for this class was generated from the following file: