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.
Get the rapier body for a Needle component
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
filterOptional
filterReturn false to ignore this collider
Optional
maxOptional
queryOptional
solid?: booleanTrue if you want to also hit objects when the raycast starts from inside a collider
Optional
useWhen 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
filterOptional
filterReturn false to ignore this collider
Optional
maxOptional
queryOptional
solid?: booleanTrue if you want to also hit objects when the raycast starts from inside a collider
Optional
useWhen 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
Enable to render collider shapes