Shape Queries

Query Filtering

The options argument may also directly contain a layer, an array of layers or a numeric mask. A struct is needed to combine filtering with rotation and ignore. Filters affect this query only; they do not change the world's collision matrix.

APIContract
layersOne JoltLayer or an array of layers in the same world.
maskNumeric user-layer mask; takes precedence over layers. Zero means all layers, not none.
ignoreOne live managed JoltBody from the same world; not an arbitrary array.
rotationQuaternion {x,y,z,w}; identity by default.
rotation_euler{x,y,z} in degrees, XYZ order; overrides a valid quaternion when both are supplied.
GML
// body and obstacles are previously validated managed objects.
var r = jolt_overlap_box(0, 0, 2, 1, 2, 1, {
    layers: obstacles,
    ignore: body,
    rotation_euler: {x: 0, y: 0, z: 45}
});
if (r.error_code != 0) show_debug_message(r.error_message);