I’m trying to implement a simple lean feature in my game and all I want to do is find wherever the camera rotation is calculated and add a little angular offset to the roll factor.
I’m working off of the SampleShooter project from the Marketplace. The first thing I tried was going into the PlayerController’s CalcCamera function but it never seems to be called, which I’m assuming is because it’s letting the PlayerCameraManager take over (or something? I’m not sure, this is one of many examples of the API documentation being a bit vague or detached from what actually is taking place in the engine.)
So all I’m asking is what the proper way is to modify the active camera’s location/angles. Thanks!
Just give it some more time, I’m sure someone will come along to answer. I also really wanted to say that I absolutely love your avatar picture, what is that from?
The rotation and location are returned through the FMinimalViewInfo structure to the calling method. You can overwrite and or use this code as you see fit.
Also, If you take the liberty of reading the documentation from Epic, you will see the responsibility chain for modifying the camera positioning and orientation. That should help you identify your issue. You may also find looking at the shooter and or strategy game samples useful, as they are both making modifications to the camera and its positioning.
Thanks for the reply. I’ve read the camera responsibility chain few times over before posting this, my issues are that my PlayerController is never calling CalcCamera and I cannot locate a CameraComponent anywhere.
I’ve searched in the PlayerController, the Character/Pawn and the PlayerCameraManager and haven’t been able to figure out where the CameraComponent is actually held, if you could tell me that I would greatly appreciate it!
Thanks, this answer helped me figure it out, I overrode the UpdateViewTarget method of the PlayerCameraManager and that gave me the intended result. Thanks to reefG and Bob_Gneu for the help.