hi, I have this problem for days and it is that when the run script detects everything and works correctly but the only one that does not work is the inputObject.delta, when I fixed it I saved and went to sleep but when I open the place where I am working for some reason way the inputObject.delta doesn’t work.
and I put the camera in scriptable before making the function work.
function mouseMove(name, state, inputObject)
x = x + (-inputObject.Delta.x*config.Sens/100)
y = y + (-inputObject.Delta.y*config.Sens/100)
if (y > config.snap) then
y = config.snap
elseif (y < -config.snap) then
y = -config.snap
end
end
game:GetService("ContextActionService"):BindActionToInputTypes("MouseMove", mouseMove, false, Enum.UserInputType.MouseMovement)
I didn’t know, that’s why it seems strange to me that the mouse only worked when I put it in the center, but what I need is for the mouse to work normally, that is, you can drag the camera and it rotates around the player but it doesn’t rotate, I press I right click and move the mouse and the camera doesn’t rotate
You can lock the cursor to it’s current position if you want to lock the mouse in place without moving it to the center. Locking it in place also updates delta.