Stay and Move in Structure

Hi, I’m try to run Pawn in some structure - like Greek Phalanx, so question - how to SPAWN and MOVE of front of player actor?



Theoretical approach:

Create a ‘group’ class that has attributes of a Mesh, a pawn, and two integers, X and Y. Might also be worth having a forward unit vector as well and a ‘root’ position. Assuming your player actor is the ‘root’, spawn a pawn along the forward vector and inverse the forward vector (in front and behind) as well as left and right of the root pawn. Have these zombie pawns take input from the group class (or another class if you roll that way) which mirrors any input from the root pawn.

Alternatively, when you spawn each ‘zombie pawn’, have it remember its offset from the root pawn, and constantly give it input to try and move to that position.