how to make distance between spawned enimes

hi guys do you know how to keep distance between enimes when they attack me in unreal

Enemies can periodically check their distance to the player:

Or have a component that can overlap the player when they get close enough. The first example here:

Demonstrates how the enemies could keep distance.


how to keep distance between enimes when they attack me

Or do you mean that the enemies clump up too much? They get too close to one another?

@Everynone is correct. This would be a viable way to calculate this. Due to how you phrased it, it is hard to tell what you mean. But if you do want them to spread out more, you can probably use a blackboard and some moderate logic to enforce distancing between your enemies.

yea i meant that they get too close and i want to have some space between them