Locking the mouse movement to the camera?

Hey, I’m needing help with this.
I am trying to get a solution to locking the mouse movement to the camera.
For example, when you hold right-click, and move your mouse, the camera moves. How can I do this with just the mouse movement and not right-click?

Any help would be appreciated, thanks.

Isn’t this just ShiftLock, or am I not understanding correctly? ShiftLockSwitch allows you to move the camera, just by moving your mouse, and does not require any buttons to be pressed to orientate the camera.


You’re probably not understanding correctly

What Galaxy is looking to do is, when you hold out an item you can rotate your camera around the player as if you’re holding right click,I believe this is for a gun system.

1 Like

If this is the case, here is a Tool that demonstrates the toggling of a ShiftLock like camera, without using EnableMouseLockOption.

To make it smooth and lower the sensitivity, you could lower UserInputService.

Finally, to make the camera zoom in a bit, you could try adjusting the Humanoid.CameraOffset to offset the camera inwards.

I’m sure there are many ways to accomplish a third person scope like this, but this is what I would try first.

1 Like

Nice, I will use this when I need to test a new game

1 Like

Thanks a lot, I’ll give this a try

1 Like

Alright so, one problem solved now another. What I originally intended with this topic is to lock the move movement to the camera, so without holding down right-click you could rotate your camera around the player. How would I do this?

Did you look through the example file I linked? I believe it demonstrates how to do this, in the form of a tool being equipped. It could easily be modified to be toggle-able through means other than equipping a tool.

If that example doesn’t end up working out for you, it might also be worth taking a look at this custom ShiftLock controller module.