Is there a way to make the player be able to move the camera without needing to maintain the RMB pressed down?

I’m trying to imitate some AAA game’s camera system by sort of having the cursor stay in the centre of the screen but still be able to move the camera without having to press RMB while staying out of shitlock. Any way to do this?

2 Likes

You can lock the mouse to the center of the screen with:

local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
RunService:BindToRenderStep("MouseLock", Enum.RenderPriority.Last.Value+1, function()
    UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
end)

This causes the default camera to use panning like you’re referring to.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.