I’m attempting to a make a dungeon crawler similar to Gauntlet where there are loads of enemies on the screen at one time that the player has to eliminate before getting to the end of the level. My problem is the enemies constantly stack on top of each other but I need to keep them separate. I’ve used the “Keep separate” event and that works mostly but when multiple of them are spawning from a spawn point or of they start following the player, they will bump and stack on top each other or start jittering like crazy. See attached screenshot for my movement events.
I have reviewed multiple forum posts and looked over some tutorials but can’t seem to find a good answer to this. I looked over the Path Finding behavior but that doesn’t seem to answer my question.
One way to do it would be to check that their path is clear before moving. I would use an invisible object with the same size hitbox, when each enemy tries to move you would first place the invisible box at the destination. If they move by tiles then you can just check if the box is in collision or not, if not then the space is free. If they move by smaller steps, you’ll need to check if the box is colliding with another monster besides the one trying to move. For example, check if the box is colliding with more than 1 monster. If it is only colliding with 1, you know that is the mover and not someone else blocking (since the step size should not be more than a full width of a monster hitbox)