local function h(h)dampCam.Goal=-h.CFrame:vectorToObjectSpace(h.RotVelocity)*.1 local o=dampCam:Update()local W=dampRot:Update()W=CFrame.Angles(0,W.X,0)*CFrame.Angles(W.Y,0,0)return(CFrame.Angles(0,0,0)*W)*CFrame.Angles(o.X,o.Y,o.Z)end local function o(h,o)return((h*PIVOT)*o)*OFFSET end

local function GetCameraRotation(root)
	-- Relative rotational velocity:
	dampCam.Goal = -root.CFrame:vectorToObjectSpace(root.RotVelocity) * 0.1
	local relRotVel = dampCam:Update()
	
	-- User view rotation:
	local viewRotation = dampRot:Update()
	viewRotation = CFrame.Angles(0, viewRotation.X, 0) * CFrame.Angles(viewRotation.Y, 0, 0)
	
	return CFrame.Angles(0, 0, 0) * viewRotation * CFrame.Angles(relRotVel.X, relRotVel.Y, relRotVel.Z)
end -- GetCameraRotation

local function GetViewCFrame(view, rotation)
	return view * PIVOT * rotation * OFFSET
end -- GetViewCFrame
