From 5d078ec17b27afd159f8b9a8c1298fcac15d695d Mon Sep 17 00:00:00 2001 From: Schark Date: Thu, 24 Sep 2026 00:06:00 -0400 Subject: Fix recentering, default button --- platformer/src/config.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'platformer/src/config.h') diff --git a/platformer/src/config.h b/platformer/src/config.h index 5f1e3db..b615c4c 100644 --- a/platformer/src/config.h +++ b/platformer/src/config.h @@ -59,7 +59,15 @@ * 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_FOLLOW_RATE 8.0f 1/s; higher = camera catches up faster + * 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 the resting zone sits + * inside the thirds lines + * CAMERA_SETTLE_RATE 3.0f 1/s; how fast the camera re-frames a player + * who stopped outside the resting zone + * CAMERA_RECENTER_RATE 6.0f 1/s; how fast the recenter button swings + * behind the player and centers them + * CAMERA_MIN_HEIGHT 0.5f m; lowest the eye may go above the player's feet * CAMERA_FOV_DEG 60.0f vertical field of view * CAMERA_NEAR 0.1f * CAMERA_FAR 500.0f @@ -125,7 +133,11 @@ #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_FOLLOW_RATE 8.0f /* 1/s; higher = camera catches up to the player faster */ +#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 the resting zone sits inside the thirds lines; higher = tighter zone */ +#define CAMERA_SETTLE_RATE 3.0f /* 1/s; re-framing after stopping outside the zone; lower = lazier, more cinematic */ +#define CAMERA_RECENTER_RATE 6.0f /* 1/s; how fast recenter swings behind the player and centers them */ +#define CAMERA_MIN_HEIGHT 0.5f /* m; lowest the eye may sit above the player's feet (keeps it out of the floor) */ #define CAMERA_FOV_DEG 60.0f /* vertical field of view, degrees; higher = wider, faster-feeling view */ #define CAMERA_NEAR 0.1f /* m; near clip plane */ #define CAMERA_FAR 500.0f /* m; far clip plane (must reach past the world edge) */ -- cgit v1.2.3-18-g5258