How do I…
i have a swarm of enemies (all the same object) that use pathfinder to follow to the player. I dont want them to be able to overlap, however. I have tried 2 things to solve this, the first one is just to add pathfinder obstacle to each object but this resulted in the objects barely moving and not working. I also did the seperate objects condition, which worked better but kept teleporting them around different locations in the swarm, and it didnt seperate them half the time. I dont want them to be able to overlap, how do i do this?
I’ve read a lot of questions like this and it’s not simple and sometimes not practical. Can you post a pic or 2 of your game so we can get an idea of what it looks like? I’m assuming it’s top-down but IDK for sure and most of my suggestions would probably not apply.
Is there a player or a group that the player controls? Where do they come from? Where are they going? What happens when they get where they’re going? The more details the better.
This is a common problem but I don’t know if there’s a simple solution but the more info the better the chance.
the player is under all the guys in the center, they use pathfinding to always follow the player but if you circle them a ton then you can all get em in one group the size of one enemy, but has actually a ton of them stacked i just want it so they can never overlap, they spawn near the player and when they get to the player they stop moving
IDK if you tried the boids movement extension. That works best with swarms. It’s a but too chaotic for me but then I never tried all of the different settings.
https://wiki.gdevelop.io/gdevelop5/extensions/boids-movement/
I’ve never had much luck with keeping large numbers of instances separated. Maybe someone can help.
Hey, it turns out the pathfinding behavior is finicky with the seperate objects action, but i switched from pathfinding to instant forces and seperate objects worked fine. They dont overlap anymore
1 Like
Can you post a screen grab of your solution? I’m curious. It’ll help me and others.
FYI: once set in motion, objects using the pathfinder follow the set path. No matter what you do, it keeps going back to it’s path. Even if you disable the behavior, it will continue when reenabled. The best way to stop the object seems to be having the object go to another position or the current position.