60 glm::vec3 halfExtents,
61 const WorldGeometry& world,
64 glm::vec3 prevWallNormal = glm::vec3(0.0f));
71 return std::abs(normal.y) < 0.3f;
Swept AABB and sphere collision queries against world geometry.
Pure physics math — no ECS types, no registry.
Definition MapLoader.cpp:51
bool isWallNormal(glm::vec3 normal)
Check if a surface normal represents a wall (not floor/ceiling).
Definition WallDetection.hpp:69
WallDetectionResult detectWalls(glm::vec3 pos, float yaw, glm::vec3 halfExtents, const WorldGeometry &world, float checkDist, float sphereRadius, glm::vec3 prevWallNormal)
Detect walls to the left, right, and front of the player via sphere casts.
Definition WallDetection.cpp:13
Results of wall detection sphere casts.
Definition WallDetection.hpp:20
glm::vec3 frontNormal
Surface normal of the front wall.
Definition WallDetection.hpp:31
glm::vec3 frontPoint
World-space contact point on the front wall.
Definition WallDetection.hpp:32
glm::vec3 rightNormal
Surface normal of the right wall.
Definition WallDetection.hpp:25
glm::vec3 leftPoint
World-space contact point on the left wall.
Definition WallDetection.hpp:26
bool wallRight
True if a wall was detected to the right.
Definition WallDetection.hpp:23
glm::vec3 rightPoint
World-space contact point on the right wall.
Definition WallDetection.hpp:27
bool wallFront
True if a wall was detected in front.
Definition WallDetection.hpp:30
bool wallLeft
True if a wall was detected to the left.
Definition WallDetection.hpp:22
glm::vec3 ledgePoint
World-space point on the ledge surface.
Definition WallDetection.hpp:36
glm::vec3 leftNormal
Surface normal of the left wall.
Definition WallDetection.hpp:24
float groundDistance
Distance to ground below the player (u).
Definition WallDetection.hpp:40
bool ledgeDetected
True if a ledge was detected above the front wall.
Definition WallDetection.hpp:35
glm::vec3 ledgeNormal
Wall normal at the ledge.
Definition WallDetection.hpp:37