PhysicsRapierWrapper class
Wrapper for the physics engine, currently using Rapier3D
This is the type of the Physics variable in the scripting API
Signature:
export default class PhysicsRapierWrapper extends Object3D
Extends: Object3D
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the PhysicsRapierWrapper
class.
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
boolean |
Returns true if the physics engine is active | ||
EventQueue | |||
|
number | ||
NarrowPhase | |||
(ray: { origin: { x: number; y: number; z: number; }; direction: { x: number; y: number; z: number; }; maxDistance?: number; ignoreRigidbody?: any; filterFlags?: QueryFilterFlags; shouldRaycast?: (collider: RCollider) => boolean; }) => { point: { x: any; y: any; z: any; }; distance: number; triangle: { meshName: any; }; raw: RAPIER.RayColliderToi; hit: unknown; } |
Performs a raycast in the physics world and returns information about the hit, if any. | ||
(dt: number, time: number) => void | |||
World |
Current Rapier world instance; cf Rapier docs (opens in a new tab) for more info |