I have recently begun exploring UE4, going through the basics. I have previous programming experience so handling the C++ is not a big issue.
For my game i need to move a free roaming camera separately from my main pawn (strategy 3d sidescroller, turn-based. Think “Worms” style camera and possesion of pawns). My first thought was to have the camera in the main pawn, but since i want to be able to control several different pawns during gameplay, this felt like the wrong way to go.
Right now i have this:
- Main pawn to be controller by player.
- Pawn for camera
I have setup the playercontroller to recieve input and set the camera pawn as the possesed pawn, delegating the input to move the camera. I then have a blueprint based on my C++ main pawn to configure the parameters from within the editor. I would like to be able to control the main pawn blueprint-instance at the same time as the camera.
My thinking is that I in my playercontroller instantiate an instance of the blueprint of my main pawn and then call appropriate functions on it (without possessing it).
What would be the best way to achieve this? Am i on the right path or is there a better solution to my problem?
(I am using mainly C++ for my game logic and would like to handle this in c++, but with possibilty to adjust certain properties in Blueprint)