Class CastShapeSettingsInterface

Hierarchy (view full)

Properties

backFaceModeConvex: number

Sets whether to ignore backfaces of convex shapes. See backFaceModeTriangles for available options.

Default Value

BFM_IGNORE_BACK_FACES
backFaceModeTriangles: number

Sets whether to ignore triangle backfaces. Following options available:

BFM_IGNORE_BACK_FACES
BFM_COLLIDE_BACK_FACES

Default Value

BFM_IGNORE_BACK_FACES
bpFilterLayer: number

Broadphase layer number for filtering.

Default Value

BP_LAYER_MOVING (1)
calculateNormal: boolean

If true, will calculate and add to results a contact normal at contact point.

Default Value

false
firstOnly: boolean

Whether to return only the first contact.

Default Value

true
ignoreSensors: boolean

If true, the ray will ignore sensors.

Default Value

false
objFilterLayer: number

Object layer number for filtering.

Default Value

OBJ_LAYER_MOVING (1)
offset: Vec3

All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer since floats are most accurate near the origin.

Default Value

Vec3(0, 0, 0)
returnDeepestPoint: boolean

When true, and the shape is intersecting at the beginning of the cast (fraction = 0) then this will calculate the deepest penetration point (costing additional CPU time).

Default Value

false
scale: Vec3

Scales the shape used during a cast. Allows to re-use existing shapes, if only scale is different.

Default Value

Vec3(1, 1, 1)
useShrunkenShapeAndConvexRadius: boolean

Indicates if we want to shrink the shape by the convex radius and then expand it again. This speeds up collision detection and gives a more accurate normal at the cost of a more "rounded" shape.

Default Value

false