summaryrefslogtreecommitdiff
path: root/platformer/src/camera.h
diff options
context:
space:
mode:
Diffstat (limited to 'platformer/src/camera.h')
-rw-r--r--platformer/src/camera.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/platformer/src/camera.h b/platformer/src/camera.h
index 84897d7..60134ed 100644
--- a/platformer/src/camera.h
+++ b/platformer/src/camera.h
@@ -27,6 +27,11 @@
* as of last tick, to detect whether they moved
* bool recentering; true during the recenter glide
* float recenter_yaw; where the glide is headed: behind the player
+ * float hands_off_time; seconds since the camera was last moved by hand
+ * (right stick or recenter), capped at
+ * CAMERA_AUTO_PITCH_DELAY; drives the auto-pitch
+ * float auto_pitch_speed; current auto-pitch speed, rad/s (>= 0), so the
+ * tilt can ease in and out instead of moving linearly
* } Camera;
*
* void camera_init(Camera *c, Vec3 follow_point);
@@ -78,6 +83,8 @@ typedef struct Camera {
Vec3 subject; /* last tick's framed point (feet + target height) */
bool recentering; /* gliding to "centered, behind the player" */
float recenter_yaw; /* the yaw that glide is headed for */
+ float hands_off_time; /* s since the camera was last moved by hand (capped) */
+ float auto_pitch_speed; /* current auto-pitch speed, rad/s (>= 0), for easing */
} Camera;
void camera_init(Camera *c, Vec3 follow_point);