I'm trying to invert the depth of the camera (multiplying the camera's CFrame by (0,0,0, -1,0,0,0,1,0,0,0,1). To my knowledge, the only way I can implement this is by setting the camera type to scriptable. Doing this, however, completely removes the player's ability to manipulate the camera, whether it be via mouse or arrow keys. I saw a video where someone inverted the camera while still having camera controls, but as of now they haven't responded to my question- how they did it. Is there a better way to do this? Am I missing something that's very clearly a fix?
I've tried using other camera types - custom, track, and follow- no difference.
--- LocalScript in StarterGui ---
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
local char = game.Players.LocalPlayer.Character
local RunService = game:GetService("RunService")
RunService.Heartbeat:Connect(function()
if math.random(1,50)==50 then -- This is just for randomly inverting the camera.
workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame*CFrame.new(0,0,0,-1,0,0,0,1,0,0,0,1) -- r00, or the 4th number, is the one that inverts the depth.
end
end
)
local myCamera = workspace.CurrentCameraand then make it scriptable:myCamera.CameraType = Enum.CameraType.Scriptable(2) Do the invert code part once, and immediately convert back to the type with "player's ability to manipulate the camera". I did not find such a specificCameraTypein the docs.. source 1 and source 2. PS: check this: google.com/search?q=roblox+dynamically+change+camera+type