castShape

abstract fun castShape(shape: Shape, shapePos: DIso3, shapeDir: DVec3, maxDistance: Double, settings: PhysicsQuery.ShapeCastSettings, filter: PhysicsQuery.Filter): PhysicsQuery.ShapeCast?

Gets the first collider whose shape intersects a swept version of the provided shape. The swept shape starts at shapePos and travels in shapeDir up to a distance of maxDistance.

This is the cheapest shape cast method, which does not take rotational velocity into account.

Parameters

shape

The shape to cast.

shapePos

The position the shape starts at.

shapeDir

The direction which the shape moves in.

maxDistance

How far the shape will move in the shapeDir direction.

settings

Settings on how the shape cast will behave.

filter

The filter for determining which colliders are tested against.