Add configuration option for ghost reset distance. Improve documentation.

This commit is contained in:
2025-12-20 17:12:58 -05:00
parent faf3f239d8
commit 7a3705d342
25 changed files with 132 additions and 28 deletions

View File

@@ -3,6 +3,8 @@
#include <glm/glm.hpp>
// Ghost encapsulates AI state for a single floating enemy constrained to an
// axis-aligned bounding box inside the maze.
class Ghost {
public:
Ghost(float xmin, float xmax, float zmin, float zmax);
@@ -17,14 +19,14 @@ class Ghost {
bool first_frame;
glm::vec3 moved;
glm::vec3 pos;
float yawr;
float yawr; // facing direction used while wandering
float xmin;
float xmax;
float zmin;
float zmax;
float y_offset;
float prev_move_time;
float direction_persist;
float direction_persist; // blends rotation over time so ghosts don't jitter
};
float rand_float(float rmin, float rmax);