Skip to main content

Query Line

This example shows how to raycast a line in the world and get the hits. The example will log the hits to the console.

const hits = await this.world.queryLine(
vec3.fromValues(0, 0.5, 0),
vec3.fromValues(15, 0.5, 0),
{ collisionClasses: ['Solid'] },
);