#Flocking

1 messages · Page 1 of 1 (latest)

pale wren
#

I've been working on a few projects messing around and one project I am working on is a flocking type game the idea is a bunch of minions will move towards a center object I am using vector2.movetowards for all the movement and using vector2.distance to stop them when they get too close to the center object but when there is multiple minions they push eachother into the player causing the player to be pushed when not wanted I have been googling this problem for a few hours and somehow havnt found anything regarding this what could I do to stop them from pushing eachother? obviously I can show all my code If needed which I presume it would be

rain jolt
#

What if you just disable collisions between them?

pale wren
#

I don’t want to disable collisions cause I don’t want them to be inside of each other I want them to be separated

#

I will send a video

pale wren
#

in this video they are just pushing around the character instead of stopping with it

rain jolt