Add persistent global mouse sensitivity setting with slider
MouseSensitivity is a static, PlayerPrefs-backed multiplier (default 1, clamped 0.1-4.0) that scales the mouse-look delta in the FreeCam, FirstPerson and ThirdPerson controllers. Writes flush immediately so the value survives a hard build exit. MouseSensitivitySlider binds the Settings-panel slider to it (range read from the inspector) and mirrors the value into its label, syncing on panel open via OnEnable. Main.unity now contains the session-manager canvas directly (the Online Session Manager prefab was unpacked) and wires the slider binder. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
0df37b8e4a
commit
2a6fc163b1
10 files changed
+3097
-2543
No files matched your search
@@ -109,7 +109,7 @@ public class FreeCamController : MonoBehaviour
|
||||
|
||||
void LookTick()
|
||||
{
|
||||
Vector2 delta = ReadMouseDelta();
|
||||
Vector2 delta = ReadMouseDelta() * MouseSensitivity.Multiplier;
|
||||
_yaw += delta.x * horizontalSensitivity;
|
||||
float vs = verticalSensitivity * (invertY ? 1f : -1f);
|
||||
_pitch = Mathf.Clamp(_pitch + delta.y * vs, -maxPitch, maxPitch);
|
||||
|
||||
Reference in new issue
Block a user