I am developing a RTS game. One of the features of RTS game is the group walk - when you select many characters and tell them to go somewhere and instead of walking alone separately, they group together and walk to their destination together and they can avoid obstacles
I am trying to think about this group walk algorithm and I can not think of a proper one. First I thought that I should bring the characters together and tell them to walk to their new destination (I find each one of the new positions at the destination) but when I have tried that each one of the characters walks in small difference speed and it is can be noticed for a far distance. Also this algorithm does not work well when there are obstacles blocking the way because of the turns that the character have to do.
The right algorithm need to make each character know about each other so they will keep the right distance all the time and know what to do on turns, what each character do to turn and keep the order of the group. Is there any UE4 function that I can use which can help me? How can I accomplish this properly?