group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
physics::GroundProbeResult Struct Reference

Result of a downward ground probe — what's directly under a character's feet, classified for walkability. More...

#include <SweptCollision.hpp>

Public Attributes

bool hit {false}
 True if any surface was found within the probe range.
bool walkable {false}
 True if the surface normal makes it standable per k_floorAngleCos.
float distance {1e30f}
 Foot-to-surface signed distance along the probe axis.
glm::vec3 point {0.0f}
 World-space contact point on the surface.
glm::vec3 normal {0.0f, 1.0f, 0.0f}
 Outward-pointing surface normal (toward free space).
SurfaceType surfaceType {SurfaceType::Concrete}
 Material at the hit surface.

Detailed Description

Result of a downward ground probe — what's directly under a character's feet, classified for walkability.

Returned by probeGround(). distance is signed:

  • > 0 → feet are this far above the ground surface (snap downward to settle)
  • = 0 → exactly touching (after pushback)
  • < 0 → feet are below the ground (penetrating — depen needs to recover)

Member Data Documentation

◆ distance

float physics::GroundProbeResult::distance {1e30f}

Foot-to-surface signed distance along the probe axis.

◆ hit

bool physics::GroundProbeResult::hit {false}

True if any surface was found within the probe range.

◆ normal

glm::vec3 physics::GroundProbeResult::normal {0.0f, 1.0f, 0.0f}

Outward-pointing surface normal (toward free space).

◆ point

glm::vec3 physics::GroundProbeResult::point {0.0f}

World-space contact point on the surface.

◆ surfaceType

SurfaceType physics::GroundProbeResult::surfaceType {SurfaceType::Concrete}

Material at the hit surface.

◆ walkable

bool physics::GroundProbeResult::walkable {false}

True if the surface normal makes it standable per k_floorAngleCos.


The documentation for this struct was generated from the following file: