summaryrefslogtreecommitdiff
path: root/platformer/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--platformer/src/config.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/platformer/src/config.h b/platformer/src/config.h
index ba2cdf1..807a6be 100644
--- a/platformer/src/config.h
+++ b/platformer/src/config.h
@@ -75,6 +75,12 @@
* 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_AUTO_PITCH_DELAY 3.0f s without touching the camera before it tilts
+ * to its preferred angle on its own
+ * CAMERA_AUTO_PITCH_DEG 25.0f degrees; the preferred look-down angle
+ * CAMERA_AUTO_PITCH_SPEED 0.06f rad/s; top speed of that tilt
+ * CAMERA_AUTO_PITCH_ACCEL 0.05f rad/s^2; how gently the tilt speeds up
+ * and slows down (ease in/out)
* CAMERA_FOV_DEG 60.0f vertical field of view
* CAMERA_NEAR 0.1f
* CAMERA_FAR 500.0f
@@ -84,8 +90,9 @@
* GRID_SPACING 1.0f m between grid lines
* GRID_MAJOR_EVERY 10 every Nth line drawn brighter
*
- * CONVENTIONS: 1 unit = 1 meter, seconds, radians (degrees only for the FOV,
- * converted where it's used). Include guard: CONFIG_H.
+ * CONVENTIONS: 1 unit = 1 meter, seconds, radians (degrees only for names
+ * ending in _DEG, which are easier to tune by eye; converted where
+ * they're used). Include guard: CONFIG_H.
*
* NOT IN SCOPE: Runtime config files, command-line parsing, hot-reload.
*
@@ -149,6 +156,10 @@
#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_AUTO_PITCH_DELAY 3.0f /* s hands-off before the camera tilts to CAMERA_AUTO_PITCH_DEG on its own */
+#define CAMERA_AUTO_PITCH_DEG 25.0f /* degrees above horizontal the camera prefers to look down at the player */
+#define CAMERA_AUTO_PITCH_SPEED 0.06f /* rad/s top tilt speed toward that angle; lower = slower, subtler tilt */
+#define CAMERA_AUTO_PITCH_ACCEL 0.05f /* rad/s^2 ease in/out of the tilt; lower = softer start and stop */
#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) */