I am trying to implement a “free cam”, similar to Mount and Blade, where you can hold down a key to freely rotate the camera around your character without modifying the character rotation, and then release to snap back to the fixed third person camera. When the key is released, I want the fixed camera to snap back to the original rotation that was there before.
Currently, I am doing this by storing a “LookRotation” Rotator which is updated alongside the controller rotation (since the control rotation continues to be updated when moving the free cam around). It stops updating when the player is in free cam mode, and then when they release it sets the control rotation back to whatever LookRotation is.
This is fine for basic camera movement, but I am running into problems when the player is shooting while in free cam mode. The fixed camera continues to be updated along with the control rotation during free cam, so traces done using the fixed camera location and rotation will be disrupted by the use of free cam. The camera is on a spring arm, and any attempt to fix the spring arm in place while free cam is active doesn’t seem to work. Setting the rotation and location to absolute, disabling “use pawn control rotation” or setting the inherit pitch/yaw/roll flags to false causes the spring arm to snap back to a default location and rotation.
What I want is for the fixed camera to lock its relative location and rotation and stop updating so that if the player fires while using the free camera, they will continue to aim in the same direction as the fixed camera before they activated free cam. Does anyone know the most efficient way to do this?