API

Interface PhysicsHitData

Interface for a physics hit data

interface PhysicsHitData {
    contactPoint: Vector3;
    distanceFromOrigin: number;
    force: Vector3;
    instanceIndex?: number;
}
Index
contactPoint: Vector3

The contact point

distanceFromOrigin: number

The distance from the origin to the contact point

force: Vector3

The force applied at the contact point

instanceIndex?: number

For an instanced physics body (mesh with thin instances), the index of the thin instance the hit applies to