Hi !
Thanks for the answers and advice!
Spanish Sailing! It's complicated for me. I'm looking for a solution for :)
3d to go up the stairs, and so on… 2d, as you can see in the video, I solved it on the principle of simple attraction-repulsion. You snatch the enemy X closest to me from the crowd and draw them around a circle around me. The rest is free. But! if any of the free comes within the circle, it is repulsive. When the ideal direction vector of each enemy is ready, I solve the following logic so that they do not go to each other, avoid the wall, avoid each other and go side by side:
ideal angle +0 degrees! is there a wall or another enemy? Then -10 degrees, test..if there is an obstacle: +10… and so on… -20, + 20, -30, + 30, -40, + 40. this addition is valid for one cycle only. everyone stepped to where it was most favorable. and again 0, -10, + 10… and so on. Thus, the phenomenon is as if I consciously avoid each other or go by the wall.
Thanks Petr, that's how I did the attraction repulsion.
And the enemies attracted at a certain distance from me can attack in different ways..pl there will be 1 or two no matter, it will be proportionate to the difficulty, who will come to me completely with a sword. whoever is farther away shoots the arrow, whoever is farther away, say, throws a stone… so the number of enemies placed at distances from me will simply be the level, proportional to the difficulty.
Lpy, I don't know what's wrong, I'm editing with 1.3, but I should start with what this is or above.
I'm looking for something that moves in 3d.
I colored the track with 2d moving and stationary elements.