How to "Get" and then later "Set" First Person Camera Rotation? Or Prevent "Possess" from Snapping Camera?
I have a simple Blueprint setup which allows the Player Character to pick up Camera BP Pickups throughout the map and place them as they wish. You can then go to a Camera Viewer BP to look through the cameras with input to cycle through the cameras with a 1 second blend time. You can look around with each camera and use the mouse wheel to zoom in and out. All of this is functioning correctly.
My issue is that when you exit the Camera Viewer and the camera blends back to the First Person Character, it first returns to the original view you were looking at when you entered the the Camera Viewer, but then as soon as the "Possess" node triggers, it snaps the view to a perfectly centered view.
It's quite jarring and I'd like to prevent it by either finding a way to disable the snap that is happening or to save the orientation of the player camera just before and set it again right after (hopefully with no visible 1 frame pop). Does anyone have any suggestions on how I could set this up? Basically I want the player's POV to be exactly as it was when they entered the Camera Viewer rather than snapping back to a centered view.
My setup is basically: Remove All Widgets (to return the Camera Viewer UI) ---> Disable Input ---> Set View Target With Blend (This blend correctly to the POV I would like the code to result in) ---> Delay (To Prevent any Input for duration of Camera Blend) ---> Possess the Character again (When this fires the camera snaps to a 0,0,0 orientation - I'd like to prevent this) ---> Enable Input
Everything works correctly I'm just trying to remove the awkward Camera Snap that happens. Any help is appreciated! Thanks!
asked Jul 28 '17 at 06:16 PM in Blueprint Scripting
Well... just solved my own question...
Inside the FirstPersonCharacter BP if you go to "Class Defaults" under the "Pawn" section there are a 3 check boxes for Use Controller Pitch, Yaw, and Roll. Turning all of these on (only Yaw was on by default) solved the issue! Hope this helps anyone else with similar issues.
Without these on UE4 was ignoring the orientation of the player controller and just snapping those rotation axis back to defaults.
Follow this question
Once you sign in you will be able to subscribe for any updates here