I am making a Bomberman clone in UE4 (entirely in C++). I have one camera actor that needs to stay in the same place. Right now I am working on controlling a single pawn, but when I call PlayerController::SetPawn(), the camera changes from my static camera which I had previously set with PlayerController::SetViewTarget(). The camera becomes attached to the pawn that is being controlled (and the pawn doesn’t even have a camera component). If I reset the ViewTarget to my static camera, it doesn’t work and the camera stays where the pawn is.
There is a private variable bAutoManageActiveCameraTarget that seems to be causing this behaviour but how can I change this without changing the engine source code?
Calling AutoManageActiveCameraTarget() with my static camera doesn’t work either.