API

Interface ShapeCastQuery

Query parameters for shapeCast.

interface ShapeCastQuery {
    endPosition: Vec3;
    ignoreBody?: PhysicsBody;
    rotation: Quat;
    shape: PhysicsShape;
    shouldHitTriggers?: boolean;
    startPosition: Vec3;
}
Index
endPosition: Vec3

World-space sweep end position.

ignoreBody?: PhysicsBody

Body to exclude, such as the body whose own shape is being swept.

rotation: Quat

World-space orientation held constant during the sweep.

Shape to sweep through the world.

shouldHitTriggers?: boolean

Whether trigger volumes count as hits. Default false.

startPosition: Vec3

World-space sweep start position.