How to control camera after character is possessed by AIController

hello. I had same issue and found answer to this problem. To Possess Ai Controller and in the same time Player controller to same character while keeping camera in the place and to control player with the two controllers you can just plug … it like this:

and ai is getting spawned like this:

it ofc can be done differently but i just spawn it as actor. As you see AI Controller variable alvays holds refrence to current ai controller of this character. I Just possess character to both player and ai controllers.