From ddbaf66281986ed50133b7eaa92c37ef9dbb5636 Mon Sep 17 00:00:00 2001 From: Schark Date: Thu, 24 Sep 2026 14:16:26 -0400 Subject: Improve left/right visibility, slow pan towards back --- platformer/src/config.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'platformer/src/config.h') diff --git a/platformer/src/config.h b/platformer/src/config.h index c71ae35..ba2cdf1 100644 --- a/platformer/src/config.h +++ b/platformer/src/config.h @@ -70,6 +70,11 @@ * 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_LEAD_RATE 1.0f 1/s; how fast a sideways run carries the player + * to the trailing thirds line (lead room ahead) + * CAMERA_SWING_OFFSET 0.52f rad (~30 deg) off directly-behind that a + * sideways run swings the camera toward + * CAMERA_SWING_SPEED 0.5f rad/s max swing rate on a fully sideways run * CAMERA_FOV_DEG 60.0f vertical field of view * CAMERA_NEAR 0.1f * CAMERA_FAR 500.0f @@ -141,6 +146,9 @@ #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_LEAD_RATE 1.0f /* 1/s; sideways runs push the player to the trailing thirds line; higher = faster lead */ +#define CAMERA_SWING_OFFSET 0.52f /* rad (~30 deg) off directly-behind that sideways runs swing toward; 0 = fully behind */ +#define CAMERA_SWING_SPEED 0.5f /* rad/s swing rate on a fully sideways run; lower = slower, subtler swing */ #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