Shape cast
Also called: shape sweep
Related terms: sphere cast, capsule cast, raycast, continuous collision detection
A collision query that sweeps a shape along a path and reports what it would touch. A ray has no width; a sphere, capsule or box cast includes the space occupied by the object. A centerline can miss a pillar that the character’s shoulder would hit.
Use shape casts to test movement clearance, find ground under a character or check a wide beam. The query detects contact; gameplay code decides what to do with it. Sweeping a volume generally costs more than a ray, so choose a shape and distance that fit the question.
- Further reading
- Godot: shape casting