I’m using the third person example where the camera is focusing the pawn and the camera is controllable with the mouse. Now I want to unpossess the pawn, so that the AIController can do a specific job (run to a point for example) but while he is doing this, I want to continue controlling the camera like before.
Currently, I’m telling the Player Controller to “Set View Target with Blend” on the pawn as soon as I unpossess the pawn, but then I cannot control the camera anymore; it just stays behind my pawn while he is doing his job.
Do you have any solutions, how I can control the camera like before?
I’m relatively new to unreal, but from my understanding it seems like you’ll need a second camera. You would use Set target view with blend to move to the camera, and whatever interval you have, delay by that amount and then also possess the camera. This camera will have to have it’s own blueprint controls. There will be two seperate parts to those controls: 1 - mouse movement affecting camera pan/tilt, and keyboard controls controlling the other pawn’s (third person character’s) movement.
The part I’m not sure about is how to make this camera spawn at a location behind the player when you go to change cameras. You can probably use teleport and get the third person characters position as the first step on the camera change.
Thank you solve the problem I have, I’ve added 0.1 seconds delay after everything is all right, without delay, the code will be into the GetAutoActivateCameraForPlayer () and returns null