Hi, I’m using 4.27.2 (source build).
This “bug” has been an ongoing one for years and I have not ever been able to fix it, even when diving into the source code, even when using UE5, the issue persists.
Firstly, my game is an 8 player shared screen local/online multiplayer party game that supports drop in/drop out connection during gameplay in combination with couch vs couch (other party games like this do not support this feature due to the complications it presents, especially in regards to online multiplayer.).
The issue I have is whenever I use the “Create Player” function, which typically happens when someone connects a gamepad, or an existing gamepad hits the START button to join, the PlayerCameraManager automatically swaps the camera to the floor where the new character spawns, and if I don’t actually spawn a player, but simply use the “Create Player” function, the camera switches, but to a different location.
I have turned off “Auto Manage Active Camera” within the player controller class.
I have also turned off “Find Camera Component When View Target” on the player controller, the player character, and the custom Player Camera Manager.
“Auto Receive Input” is also turned off on all classes since this is handled manually.
The camera’s within the character have “Auto Activate” set to false, and “auto receive input” set to false too.
It’s as if the Camera Manager is completely ignoring the “Auto Manage Active Camera” boolean.
I have gone into the PlayerController.cpp and ensured the default value for bAutoManageActiveCameraTarget is FALSE.
I thought that perhaps it was being overridden somewhere, but have put a UELOG in the PlayerController.cpp to check this, and it remains set to FALSE.
The issue seems to occur when “Create Player” function is called, the camera will change, then once a character has been possessed, the camera moves to the floor position of that player.
I have spent several days sifting through GameInstance.cpp, GameViewPortClient.cpp, PlayerController.cpp and LocalPlayer.cpp to try and figure out exactly where the camera change is occuring, but I cannot quite find it or stop it from automatically changing when a new player is created…
The current work-around is that I have a main camera class that is used for almost everything, and whenever it is set as the view target, the Game State stores the camera as the current camera. Whenever a player is created, the camera automatically switches back to the one stored on the Game State, but this is really jarring and I have other camera classes that are not the same type of camera (for cinematics etc), so that doesn’t really work well for me, plus the camera visibly flickers when a player joins, which doesn’t look good.
I cannot find any solutions to this, just work-arounds being to store the previous view target, then switch to that view target just after creating a player, but this is not a fix, nor is it elegant.
Is there something simple I am overlooking here? I’ve run out of ideas, and the work-around isn’t viable, there should simply be the ability to disable this automatic camera switching so that camera control is 100% manually controlled.
Here is a link to another person having the issue from years ago too.
Any help would be greatly appreciated.
Thanks.