How is the Roblox's camera sensitivity applied on the camera's CFrame?

Hello, I’m creating my own camera system and I’m running into an issue where I need to set the sensitivity accordingly with the player’s UserSettings’s sensitivity, but I do not know how to apply the UserSetting on my script.

This is the important part of my script:

ry = (ry + MouseDelta.X  * Sensitivity)
rx = math.clamp(rx + MouseDelta.Y  * Sensitivity, -math.rad(80), math.rad(45))

So MouseDelta is a Vector2 where X and Y are the change in the Mouse’s position in X and Y obviously. ‘rx’ and ‘ry’ are then applied on the Camera’s CFrame as CFrame.Angles(ry, rx, 0).

As for the sensitivity, all I do is MouseDelta * Sensitivity, but this sensitivity number at the moment of testing is 0.0075 which is really low and doesn’t match up with Roblox’s sensitivity.

I can get the Player’s camera sensitivity by doing this:

UserSettings().GameSettings.MouseSensitivity

This number is between 0 and 10 or something like that. And when I use this as the Sensitivity in my script, it rotates extraordinarily fast.

So I’m asking how I can accurately recreate Roblox’s camera sensitivity system so I can do this:

ry = (ry + MouseDelta.X * UserSettings().GameSettings.MouseSensitivity)

I’ve tried looking into the PlayerModule.CameraModule, but I couldn’t derive any useful information out of it nor could I find the part where it does it.

Thanks for the help anyway!

1 Like

Bumping this since I’d like to know an answer to it too.

Multiplying the MouseDelta by GameSettings.MouseSensitivity does not bring the expected result and instead the camera moves slower than its supposed to.

1 Like

You could probably find out by checking out the PlayerModule by Roblox. I haven’t done anything related to this in a bit, so you will have to check that out yourself.

I did. I couldn’t find any use of the MouseSensitivity value in those scripts.