Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Camera Tilt (Up/Dwn) and how to Make it smoother?

Asked by 9 years ago

This is what I'm currently using but I'm curious if there are any other ways of stopping the camera from being tilted up and down. Why? Constantly CFraming the camera back down/up causes it to constantly shudder.

local x,y,z,m0,m1,m2,m10,m11,m12,m20,m21,m22 = 
workspace.CurrentCamera.CoordinateFrame:components()
CurrentAngle = math.atan2(m2, m22)
if default then target = game.Workspace.CurrentCamera.LocalParts.TeleCam else
target = game.Workspace[script.Parent.Variables.Camera.Location.Value].Camera end

--This bit >
if m2 == 0 then game.Workspace.CurrentCamera.CoordinateFrame = CFrame.new(target.Position)*CFrame.Angles(0,angle,0)*CFrame.new(0,0,30) end

Answer this question