My scene is identical to the first “Getting Started” tutorial, except that my cylinder/character is using AIPath to move. I have set it up so that new objects are periodically spawned, by instantiating new clones of a template object. Their target is then set to be a sphere that follows the mouse around.
It works perfectly until a certain number of objects are spawned, after which the objects begin moving in circles and back and forth instead of following the mouse. The problem would seem to be memory related, because the threshold after which the objects start freaking out is lower if I have other programs open, even just my web browser. (Though performance shouldn’t be a problem. I have an Intel i7 x980 @ 3.33 GHz and 18 GB RAM).
It does however seem to be a hard threshold (the change happens after 1 or two extra objects are instantiated) and the problem is repeatable. Also, the paths are redrawn fairly quickly and normally (with a repath rate of about 2), until the freak out happens, after which they take much longer to be redrawn and and sometimes do not appear to be correct at all.
I would just like to know if I am doing something incorrectly, or else how this could be addressed? Is there a recommended/best practice way for creating large (200+) hordes of AIs that will follow a character around, but move individually rather than as units?