Skip to main content

Crate collide_mesh

Crate collide_mesh 

Source
Expand description

Triangle mesh collision for character controllers.

This crate is deliberately 3D-only and uses ga3::Vector<f32> directly: triangle meshes have no meaningful N-dimensional generalization, and the ground semantics (walkable slopes, ground height) are inherently three-dimensional gameplay concepts. The up direction is a caller-supplied unit vector, not fixed to an axis: CollisionWorld::collide_capsule’s ground classification, height bookkeeping and capsule alignment all follow it, so a world that isn’t Y-up needs no conversion at this boundary.

Structs§

Aabb
An axis-aligned bounding box in 3D space.
CollisionResult
The combined result of resolving a capsule against a CollisionWorld.
CollisionWorld
A set of triangle meshes behind a bounding volume hierarchy.
Ground
Walkable ground supporting a capsule.
TriangleHit
The result of resolving a capsule against a single mesh.
TriangleMesh
A static triangle mesh prepared for capsule collision and raycasts.

Enums§

Motion
Whether a capsule is moving along up or against it.