-
Notifications
You must be signed in to change notification settings - Fork 14
Sensitivity conversions
Antimundo edited this page Mar 17, 2024
·
1 revision
Players should be able to play with the same sensitivity they use in other games.
If you play a Source game (like CS2 and CSGO) with a game sensitivity of 1 and a mouse with 1000 DPI, it would take 16.36 inches to rotate 360º.
Which means: 1000 DPI * 16.36 inches = 16360 "dots" needed to make a full 360 turn. 16360 / 360 = 0.022 which is the conversion rate.
So, in Godot if you use this code to rotate the FPS controller, you will have the same sensitivity as in those games:
func _input(event) -> void:
if event is InputEventMouseMotion:
rotate_y(deg_to_rad(-event.relative.x * 0.022))