Enable to visualize raycasts in the scene with gizmos
Get access to the rapier world
The joint prevents any relative movement between two rigid-bodies, except for relative rotations along one axis. This is typically used to simulate wheels, fans, etc. They are characterized by one local anchor as well as one local axis on each rigid-body.
clear all possibly cached data (e.g. mesh data when creating scaled mesh colliders)
Get the Needle Engine component for a rapier object
Returns the linear velocity of a rigidbody or the rigidbody of a collider
Fast raycast against physics colliders
Optional
origin: Vec3 | Vec2ray origin in screen or worldspace
Optional
direction: Vec3ray direction in worldspace
Optional
options: {additional options
Optional
filterGroups?: numberOptional
filterPredicate?: (c: ICollider) => booleanReturn false to ignore this collider
Optional
maxDistance?: numberOptional
queryFilterFlags?: QueryFilterFlagsOptional
solid?: booleanTrue if you want to also hit objects when the raycast starts from inside a collider
Optional
useIgnoreRaycastLayer?: booleanWhen enabled the hit object's layer will be tested. If layer 2 is enabled the object will be ignored (Layer 2 == IgnoreRaycast) If not set the raycast will ignore objects in the IgnoreRaycast layer (default: true)
raycast that also gets the normal vector. If you don't need it use raycast()
Optional
origin: Vec3 | Vec2Optional
direction: Vec3Optional
options: {Optional
filterGroups?: numberOptional
filterPredicate?: (c: ICollider) => booleanReturn false to ignore this collider
Optional
maxDistance?: numberOptional
queryFilterFlags?: QueryFilterFlagsOptional
solid?: booleanTrue if you want to also hit objects when the raycast starts from inside a collider
Optional
useIgnoreRaycastLayer?: booleanWhen enabled the hit object's layer will be tested. If layer 2 is enabled the object will be ignored (Layer 2 == IgnoreRaycast) If not set the raycast will ignore objects in the IgnoreRaycast layer (default: true)
Precice sphere overlap detection using rapier against colliders
center of the sphere in worldspace
radius of the sphere
array of colliders that overlap with the sphere. Note: they currently only contain the collider and the gameobject
Optional
dt: number
Enable to render collider shapes