Shape Queries
Choosing a Spatial Query
Use an overlap to ask whether a volume fits at one position. Use a cast to sweep that volume from start to end. Unlike a ray, a shape query accounts for thickness, so it is useful for placement previews, camera clearance and movement probes.
Call jolt_start() first. Queries use the managed default world in right-handed Z-up coordinates. They are read-only: they neither create a temporary body nor move an existing one. Sensors are included unless filtered out.
var placement = jolt_overlap_box(0, 0, 3, 1, 1, 2);
if (placement.error_code != 0) {
show_debug_message(placement.error_message);
} else if (placement.clear) {
show_debug_message("Space is clear");
}