tweak sensitivity min/max

This commit is contained in:
Brian Beck 2026-03-14 00:33:45 -07:00
parent d47d3adc27
commit d58ae04cdf
24 changed files with 38 additions and 38 deletions

View file

@ -269,12 +269,12 @@ export function InspectorControls({
id="mouseSensitivityInput"
type="range"
min={1}
max={64}
step={1}
value={Math.round(mouseSensitivity * 8000)}
max={256}
step={2}
value={Math.round(mouseSensitivity * 16000)}
onChange={(event) => {
const value = parseInt(event.target.value);
const sens = value / 8000;
const sens = value / 16000;
setMouseSensitivity(sens);
}}
/>

View file

@ -11,6 +11,13 @@ import {
import { useFogQueryState } from "./useQueryParams";
import { useTouchDevice } from "./useTouchDevice";
export const MIN_SPEED_MULTIPLIER = 0.01;
export const MAX_SPEED_MULTIPLIER = 1;
export const DEFAULT_MOUSE_SENSITIVITY = 32 / 16000; // 0.002
export const MIN_MOUSE_SENSITIVITY = 1 / 16000;
export const MAX_MOUSE_SENSITIVITY = 256 / 16000;
type StateSetter<T> = ReturnType<typeof useState<T>>[1];
export type TouchMode = "dualStick" | "moveLookStick";
@ -57,13 +64,6 @@ type ControlsContext = {
setInvertJoystick: StateSetter<boolean>;
};
export const MIN_SPEED_MULTIPLIER = 0.01;
export const MAX_SPEED_MULTIPLIER = 1;
export const DEFAULT_MOUSE_SENSITIVITY = 16 / 8000; // 0.002
export const MIN_MOUSE_SENSITIVITY = 1 / 8000;
export const MAX_MOUSE_SENSITIVITY = 64 / 8000;
const SettingsContext = createContext<SettingsContext | null>(null);
const DebugContext = createContext<DebugContext | null>(null);
const ControlsContext = createContext<ControlsContext | null>(null);