Found a weird bug and after days of debugging got nowhere so I figured I would ask for some pointers.
In my (multiplayer) game players can possess monsters (Characters controlled by AIController) and then unpossess them, returning control back to the AI controller.
Whenever client unpossesses Character and returns AI controller, that character gets teleported to location where the character was possessed. Better explained with video - Possession Bug - YouTube (Ball is character1, and the green monster is character2 - AI controller just jumps every 3 seconds)
In my code (did both blueprint and c++ with same results).
- Client asks server to use his controller to possess specific Monster. (Server does that)
- During unpossess, server remembers what AI controller was character using
- Client asks server to possess different character, (server does that) and possesses now empty character with original AI controller during Event Unpossess
I have tried eliminating options and if I possess character for short period of time, bug does not occur. I have tried spawning a new controller instead of using the old one, same issue. The blueprint is has parent vanilla “Paper Character” class with no special movement what so ever.
Absolutely clueless so any pointer would be appreciated!