Function shapeCast
-
Parameters
- world: PhysicsWorld
The physics world to query.
- query: ShapeCastQuery
Swept shape, orientation, and start/end positions.
Returns ShapeCastResult
The cast result;
hasHitisfalsewhen the sweep clears every body. - world: PhysicsWorld
Sweep a shape from
startPositiontoendPosition(orientation fixed) and return the first body it hits.hitPointis the world-space contact point on the hit body;fractionis where along the sweep contact first occurs. Run at least one physics step first so the broadphase exists.