Stop third person camera affecting character rotation
I'm trying to set up a third person player with a camera where:
This seems to be possible when the character is standing still in the third person blueprint, but if the player is running forward and rotates the camera at the same time with the right analogue stick, it will affect the direction the character is running.
Does anyone know how I would go about setting something like this up?
I've tried a lot of combinations, but nothing quite seems to work.
I think you'll want to either disable the pawn's User Control Rotation checkbox, or have the right analog stick not control the character but programmatically offset the camera rotation or the rotation of the scene component it is attached to (and make that parented in a way that it is not a child of the pawn, which means probably using AttachTo at runtime on BeginPlay, and changing it so it does not Snap To nor inherit rotation).
The thing is if your camera is a component of an actor, it will inherit the rotation of whatever it's a child component of. The Spring Arm might have a way around this though, so you can look into that. If not, then you may want to consider making the camera part of a separate actor that always follows the character or is, like I described, attached to the character but ignoring the rotation of its attach parent, and do that at BeginPlay.
answered Aug 03 '18 at 05:51 PM
Think I've nailed it! These were the settings I've ended up with:
Then the Blueprint for the camera is as follows:
Camera Reset Blueprint:
Character Movement Updates
Hope this helps!
answered Aug 05 '18 at 04:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here