How do you detect camera movement relatively?

Since you are in first person, theres a user input for camera movement.
Enum.UserInputType.MouseMovement

to tell me the delta x/y i would just do this

local context = game:GetService("ContextActionService")

context:BindAction("CameraMovement", function(_,_,input)
    print("x is: "..tostring(input.Delta.X), "y is: "..tostring(input.Delta.Y))
end, false, Enum.UserInputType.MouseMovement)

(Untested but should work)

12 Likes