UnitySteer 2.0 – multiple agents example
Most UnitySteer webplayer examples on the site are by now a year old, so with the release of UnitySteer 2.0 I thought it was time we came up with a new one. Previously it was more difficult for me to show what was going on in the agents’ brain, but Ryan Scott was kind enough to contribute a GL-based debug visualization library which helps display it in the actual game scene.
Without much further ado, here’s a demo of 77 animated agents wandering around, avoiding each other and obstacles.
Some notes:
- This demo uses mainly three behaviors: SteerForWander, SteerForSphericalObstacleAvoidance, SteerForNeighborAvoidance. It also uses SteerForTether to avoid them wandering too far.
- Pressing 1 will load the default scene, with only 77 agents. Pressing 2 will load a scene with 154, for which rendering is significantly heavier.
- The initial randomizing function is dead dumb, so it’s perfectly possible you’ll start in geometry. He’ll find his way out soon enough.
The demo is a bit rendering heavy, and I’m curious what kind of performance people are getting. Enjoy!











I don’t understand how so many Unity-related websites don’t realize that the web player doesn’t work –
Unity’s hosted version of UnityObject.js has a syntax error, and doesn’t work on any web page I’ve visited with an embedded Web Player, in either Firefox or Internet Explorer.
I has a sad
Very odd, I’d never seen it before. I’ve mentioned it to some folks at Unity, but nobody has reported it. It might be a good idea to shoot them an e-mail with your browser details.
Thanks for posting this!
Here are the details on my performance:
* Scene with 77 agents: Min: 14, Max: 55, Avg: 30.199
* Scene with 154 agents: Min 7, Max: 21, Avg: 14.453
The minimums are from the scene start, once the player walks around the FPS sticks to the average.
System specs: 2x ATI HD 4890 / AMD Phenom II X4 955 (3,2GHz) / 4GB DDR3 PC3-10666 1333MHz
Excellent work! I am a noob to Unity but excited to learn. Is there any chance you can make this ‘multiple agents example’ demo available? I know it’s based on the standard 3rd Person demo available to the Unity Community, but I would like to learn how this is applied in this particular case. I believe people can learn some important things from this. Thank you very much!
Hello CM,
It uses the stage, model and walk animation from the 3rd person demo, but that’s it. I might make it available at some point, but it depends on a library I cannot make available (the one I use for drawing the debug arrows) and would require a bit of documentation on the the choices I made for the parameters, and I’m afraid right now I can’t spare the time. Do download the other examples and experiment, you’ll likely be up to speed in no time. Enjoy!