Sign in to follow this  

Boids using the Unigine Component System

Recommended Posts

Posted (edited)

I implemented the agent-based flocking algorithm "Boids" in the Unigine component system for fun. See

It's an incomplete implementation, don't expect too much. But it does make for a nice organic-feeling movement pattern.

To get started with the attached code, make a new project making sure to tick the "Component System" box Unpack the .ZIP attached C++ files over the defaults. In the editor, make a bunch of ObjectMeshDynamic cubes (Create->Primitive->Cube) and scatter them around. I used 14, but you can use any number. Scale them down to 0.1. If you click-drag you can clone them or select some in the "world" tab and right-click for "clone". So long as they're called "Cuboid<something>" (hard coded, see source) they'll be animated.



Action shot with rule-vector debugging on.


Edited by angus
  • Like 3

Share this post

Link to post
Sign in to follow this