From fdc8c951fc72d9dc4c8faa58a21b2b9de0599698 Mon Sep 17 00:00:00 2001 From: Schark Date: Tue, 29 Sep 2026 22:28:37 -0400 Subject: Implemented no-panning zones --- platformer/src/camera.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'platformer/src/camera.h') diff --git a/platformer/src/camera.h b/platformer/src/camera.h index 60134ed..7dc2cc1 100644 --- a/platformer/src/camera.h +++ b/platformer/src/camera.h @@ -36,10 +36,13 @@ * * void camera_init(Camera *c, Vec3 follow_point); * void camera_update(Camera *c, const Input *in, Vec3 follow_point, - * float follow_facing, float aspect, float dt); + * float follow_facing, bool pan_locked, float aspect, float dt); * follow_point = the player's feet position; the camera adds * CAMERA_TARGET_HEIGHT itself. follow_facing = the player's - * facing_yaw, used by recenter to swing behind them. aspect = + * facing_yaw, used by recenter to swing behind them. pan_locked = + * the player is in a locked-pan zone (main.c asks the world): the + * camera doesn't swing toward the back quarter on its own (the + * stick, recenter, framing and auto-tilt all still work). aspect = * framebuffer width/height, needed because the framing zone is * defined in screen space. * float camera_yaw(const Camera *c); @@ -89,7 +92,7 @@ typedef struct Camera { void camera_init(Camera *c, Vec3 follow_point); void camera_update(Camera *c, const Input *in, Vec3 follow_point, float follow_facing, - float aspect, float dt); + bool pan_locked, float aspect, float dt); float camera_yaw(const Camera *c); Mat4 camera_view(const Camera *c); Mat4 camera_projection(const Camera *c, float aspect); -- cgit v1.2.3-18-g5258