First of all, english is not my main language. I’m sorry if some part of this post seems clunky or are directly wrong written.
I’m a rookie in Unreal Engine, trying to learn the basis of AI and Navigation systems. I followed some of the wonderful tutorials the community has, and familiarized myself with Behaviour Trees and the movement components, and I think I catched the concepts behind both of them.
I’m trying to create the basis of a movement system for a rol game. Each party can have up to 5 characters in it. The player can determine the formations, establishing characters positions in shapes, and they should maintain it while moving and in combat. This is kind of a strong requirement in this project. It’s not a problem if the shape deforms a little, but they shouldn’t mess it letting, for example, a mage get to the frontline.
Right now, I achieved a coordinated movement between the player-controlled character and the AI ones. The main problem I have is that each one of them moves “in their own”. For example, if there’s an obstacle, which separates the road in 2 paths, some of them will choose the right way, and the others the left one, which breaks the formation. Ideally, I would want them to stick together, if it’s possible. Of course, I know that it won’t be feasible in all the situations, but most of the time it will be.
I’m not sure how I could implement that in Unreal. Writing my own navigation system seems overkill. What I want is to create a constraint on the movement, so each agent could use the position of the characters in the formation to decide which path is the right one.
One idea I had was to implement the movement using flocking algorithms, but I’m not sure how can I integrate that with the UE4 navigation system. I also wonder if it would be possible to invoke the navigation functions for the entire (defining a new actor for the entire shape of the crew), and make corrections in the individual AIs taking consideration of that information.
Are any example I could use as reference to implement it in the UE4 navigation system? Or a paper with algorithms that applies to this type of movement? Or just some abstract ideas I could investigate in?
TL;DR: I want the party of my rol game to move in a coordinated way, without going mad between point A and point B.
TL;DR2: I made a diagram in Paint. Red cross situation happens now. Want green tick instead.