Class LightweightRVO Extends MonoBehaviour
Lightweight RVO Circle Example.
Lightweight script for simulating agents in a circle trying to reach their antipodal positions. This script, compared to using lots of RVOAgents shows the real power of the RVO simulator when little other overhead (e.g GameObjects) is present.
For example with this script, I can simulate 5000 agents at around 50 fps on my laptop (with desired simulation fps = 10 and interpolation, 2 threads) however when using prefabs, only instantiating the 5000 agents takes 10 seconds and it runs at around 5 fps.
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.
Public Methods
Create a number of agents in circle and restart simulation.
Public Variables
Number of agents created at start.
How far in the future too look for agents.
Enable the debug flag for all agents.
How large is the area where agents are placed.
Max number of neighbour agents to take into account.
Max speed for an agent.
How far in the future too look for obstacles.
Agent radius.
Offset from the agent position the actual drawn postition.
Public Enums
Private/Protected Members
All agents handled by this script.
Color for each agent.
Goals for each agent.
Mesh for rendering.
Reference to the simulator in the scene.