Physicsrapierwrapper

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

PropertyModifiersTypeDescription
activebooleanReturns true if the physics engine is active
eventQueueEventQueue
framereadonlynumber
narrowPhaseNarrowPhase
raycast(ray: { origin: { x: number; y: number; z: number; }; direction: { x: number; y: number; z: number; }; maxDistance?: number; }) => { 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.
worldWorldCurrent Rapier world instance; cf Rapier docs (opens in a new tab) for more info