Class LightweightRVO Extends MonoBehaviour

Public

Lightweight example script for simulating rvo agents.

This script, compared to using lots of RVOController components shows the real power of the RVO simulator when little other overhead (e.g GameObjects and pathfinding) is present.

With this script, I can simulate 30 000 agents at over 60 fps on my, admittedly quite beefy, machine (in a standalone build, with the local avoidance simulation running at a fixed 60 fps and using up to 14 cores of my machine). This is significantly more than one can simulate when using GameObjects for each agent.

This script will render the agents by generating a square for each agent combined into a single mesh with appropriate UV.

A few GUI buttons will be drawn by this script with which the user can change the number of agents.

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

Some agent data used in the lightweight rvo example scene.

Lightweight example system for controlling and rendering RVO agents.

Lightweight example system for moving agents.

System to render RVO agents on a mesh.

Public Methods

CreateAgents (num)

Create a number of agents in circle and restart simulation.

Public
OnGUI ()
Public
Start ()
Public
Update ()
Public

Public Variables

agentCount

Number of agents created at start.

Public
agentTimeHorizon

How far in the future too look for agents.

Public
debug

Bitmas of debugging options to enable for the agents.

Public
exampleScale

How large is the area in which the agents are distributed when starting the simulation.

Public
material
Public
maxNeighbours

Max number of neighbour agents to take into account.

Public
maxSpeed

Max speed for an agent.

Public
obstacleTimeHorizon

How far in the future too look for obstacles.

Public
radius

Agent radius.

Public
renderingOffset

Offset from the agent position the actual drawn postition.

Public
type

How the agents are distributed when starting the simulation.

Public

Public Enums

RVOExampleType
Public

Private/Protected Members

CreateAgent (archetype, buffer, position, destination, color, priority=0.5f)

Create a single agent entity.

Private
OnBeginFrameRendering (ctx, cameras)
Private
OnDestroy ()
Private
PreCull (camera)
Private
uniformDistance (radius)
Private