Free camera - local multiplayer

Dear community, hello !

I’m trying to make a car game with 4 local players and a free camera wich move independently from my pawns.
I’m using only C++ for the moment, not Blueprint. I’m able to get the 4 players move with 4 gamepads at the moment, with no split screen (i’ve subclassed the AGameViewportClient UpdateActiveSplitScreenType method).

Related to this thread:

you need to make a player controller class, and in the constructor of player controller class you can write:

 AYourGamePlayerController::AYourGamePlayerController(const class ...& PCIP) : Super(PCIP)
    {
    PlayerCameraClass = AYourCamera::StaticClass();
    }

And after reading the APlayerController class in the API documentation, i didnt see any references to the PlayerCameraClass property, to make my PlayerController class use my custom Camera Class.

I’ve made a custom CameraManager and apply it to the PlayerController class, but wasn’t able to do something with the camera, even subclassing the DoUpdateCamera(float DeltaTime) method.
I see in the example (link above) that i can make the character class (as seen in the Third Person Tutorial) to use a custom camera with FollowCamera and CameraBoom but cannot make it work on my custom APawn subclass.

Questions:

  1. How can i use a custom camera on my custom APawn?
  2. May i use a Character class, even if i want to simulate a car, not a character?

Any advice, tips or example would be greatly appreciated.

Many thanks to the Epic Games crew and the community.

PS: Please be indulgent with my bad english language, wich is not as fluent as yours

I’d suggest taking a look at how the strategy game example handles the camera, especially if you intend the camera to look at all four pawns at once and update its position as required.

Thanks for the answer Kris. I’ve take a look at the StrategyGame example, and didnt see any piece of code on the Content or Source folder of this project. The only thing I find on the documentation is to Subclass the function CalcCamera. I’ll give it a try, and inform you when i find a solution.
Thank you !