Camera Dragging disabling whilst Following Character [Mobile]

I am trying to attain the out-zoomed position of the character’s fictional camera position and calculate a new CFrame from it to the head.

The purpose of this script is to work for mobile players, so we can disable their camera dragging whilst having the camera still follow the character.

It is essentially working, however, I want the regular camera frame before I open the inventory and we are unsure how to grab that information. I am openly looking for suggestions & help.

Script:

culocal fixedOrientation = CFrame.new(Vector3.new(0, 0, 0), Vector3.new(0, 0,1)) -- Adjust as needed
function UpdateCamera()
    Camera.CFrame = CFrame.new(Character.HumanoidRootPart.Position) * fixedOrientation
end

Videographic Demonstration:

2 Likes