Hello,
I’m trying to make the player camera rotate slowly while the camera still responds to user input as normal,
I have been able to achieve the rotation effect by setting the cameratype to scriptable but this doesn’t allow for user input.
With the code below everything works as intended except, the camera rotation updates only once very second or so.
This only happens when the cameratype isn’t set to scriptable, but again if I set it to scriptable I have no input.
Your help would be appreciated.
Edit: I just found out that the rotation update speed is the same as the task.wait speed, when I change it to 0.1 the rotation is updated every 0.1s.
I don’t understand why this is happening as the updatesubject function itself is only connected to renderstep.
function CamAngle()
local function updateSubject()
-- PlayerCam.CameraType = Enum.CameraType.Scriptable
PlayerCam.CFrame = PlayerCam.CFrame:Lerp(PlayerCam.CFrame*CFrame.Angles(0,0,math.rad(1)),1)
-- PlayerCam.CameraType = Enum.CameraType.Custom
end
RunService:BindToRenderStep("UpdateSubject", Enum.RenderPriority.Camera.Value, updateSubject)
end
while true do
task.wait(1)
CamAngle()
end