OK, a little off topic from my own code, but I overheard people talking about “sticking” behavior and their troubles with it. I was personally thinking about creating a schooling behavior for my fish and had run into a wall.
I’m rather proud of this code, but I need to figure out how to make it work on non-collision so I can apply it to schooling behavior. This introduces a changing variable to distance and multiple counts of many “leader” agents, but it seems like a fun problem to tackle.
April 2, 2017 at 3:18 pm
cool
but fish schools don’t have a leader – just set heading to heading of nearest fish and they should school (or set them with a decent random probability of heading towards the nearest fish)
you could have them always be “grouped” – isn’t that how fish work?
April 4, 2017 at 2:25 pm
Would that cause them to constantly circle one another? Doesn’t at least 1 fish need to move independent of the group, so the group moves?