diff options
| author | Schark <jordan@schark.online> | 2026-09-24 14:54:47 -0400 |
|---|---|---|
| committer | Schark <jordan@schark.online> | 2026-09-24 14:54:47 -0400 |
| commit | 4b77316ace7225c801742c2688bd14b7e3c3cb12 (patch) | |
| tree | 82be11e758416eeab882d2b145f3cac25d604e3f /platformer/src/config.h | |
| parent | b47571e7f1b4348b526c23a6ab6b88dbcb49ecf1 (diff) | |
| download | gamedev-4b77316ace7225c801742c2688bd14b7e3c3cb12.tar.gz gamedev-4b77316ace7225c801742c2688bd14b7e3c3cb12.zip | |
Up/down dead zones and sensitivity adjustments
Diffstat (limited to 'platformer/src/config.h')
| -rw-r--r-- | platformer/src/config.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/platformer/src/config.h b/platformer/src/config.h index 8739dbf..c71b330 100644 --- a/platformer/src/config.h +++ b/platformer/src/config.h @@ -30,6 +30,9 @@ * Input * MOVE_DEADZONE 0.20f (radial, left stick) * LOOK_DEADZONE 0.20f (radial, right stick) + * LOOK_AXIS_SNAP_DEG 15.0f (right stick: pushes this close + * to straight up/down/left/right + * become exactly that direction) * * Player: ground movement * PLAYER_MAX_SPEED 9.0f m/s at full stick tilt @@ -58,7 +61,7 @@ * CAMERA_PITCH_MIN 0.05f rad * CAMERA_PITCH_MAX 1.20f rad * CAMERA_YAW_SPEED 2.5f rad/s at full right-stick tilt - * CAMERA_PITCH_SPEED 1.5f rad/s at full right-stick tilt + * CAMERA_PITCH_SPEED 1.125f rad/s at full right-stick tilt * CAMERA_FOLLOW_RATE 8.0f 1/s; how fast the camera's DISTANCE catches up * when the player runs toward/away from it * CAMERA_ZONE_INSET 0.05f fraction of the window between the resting @@ -124,6 +127,7 @@ /* ---- Input ------------------------------------------------------------- */ #define MOVE_DEADZONE 0.20f /* left stick radius ignored; higher = less drift, less fine control */ #define LOOK_DEADZONE 0.20f /* right stick radius ignored; higher = camera harder to nudge */ +#define LOOK_AXIS_SNAP_DEG 15.0f /* right stick pushes this close to an axis become pure up/down/left/right; 0 = off, keep < 45 */ /* ---- Player: ground movement ------------------------------------------- */ #define PLAYER_MAX_SPEED 9.0f /* m/s at full stick tilt; higher = faster top run speed */ @@ -151,7 +155,7 @@ #define CAMERA_PITCH_MIN 0.05f /* rad; lowest the camera can swing (just above the ground) */ #define CAMERA_PITCH_MAX 1.20f /* rad; highest the camera can swing (near top-down) */ #define CAMERA_YAW_SPEED 2.5f /* rad/s orbit at full right-stick tilt; higher = faster spin */ -#define CAMERA_PITCH_SPEED 1.5f /* rad/s tilt at full right-stick tilt */ +#define CAMERA_PITCH_SPEED 1.125f /* rad/s tilt at full right-stick tilt; lower = gentler up/down look */ #define CAMERA_FOLLOW_RATE 8.0f /* 1/s; how fast the distance catches up when running toward/away; lower = more lag */ #define CAMERA_ZONE_INSET 0.05f /* window fraction between resting zone and running bound; higher = tighter zone */ #define CAMERA_ZONE_TOP 0.50f /* resting zone's top edge (0 = bottom, 1 = top); lower = more view ahead of the player */ |
