Quote: Original post by by
Hmm hmm hmm. I want enemies to move straigt forward to player. But i also want them to split and go around player. That's it. The game concept is very simple already. I don't know if i can be more clear for my English blocks me :)
Alright, lets go steering behavior side.
First, always have a pursue steering, for all agents, toward the player.
Second, as long as they are far enough from the player, use a clustering algorithm such as k-mean to divide them into groups. Add a cohesion steering force for each agent, but only with agents of the same group. Add a separation steering force with agents of other groups.
When they are close enough to the player, remove the cohesion steering force and set the separation one to separate from all other agents.
pursue + separation should make them surround the player.