I'm having trouble with making objects not collide with one another.
The base I started with seems smooth enough though it uses angles to move and I wanted something that uses velocity, but even if I try to make the "boids" flee from each other they still clump together(plus their supposed to "herd", the more red they are the more neighbors they have, and follow the closest neighbor).
Since I don't really know what I'm doing with this steering behavior, and I just used trail and error(kind of) to get this far, I just posted the love file.
Each boid has an agent that handles the steering and they can be controlled by functions.
(Note: Main problem here is when and where to use use which different functions)
I listed those I thought important to the cause here(note, target/hunter can be an agent or vector or table with x and y):
Code: Select all
agent:seek(target) agent:flee(hunter) agent:arrive(target) agent:pursuit(hunter, panicDistance) agent:evade(hunter)