PhysicsEventData

lumin. PhysicsEventData

Extends

Methods

getCollisionForces() → {Array.<vec3>}

Returns collision forces, in Newtons (kg-m/s^2)

Returns:
Type
Array.<vec3>

getCollisionPoints() → {Array.<vec3>}

Returns collision points, in prism-space

Returns:
Type
Array.<vec3>

getCollisionType() → {lumin.physics.CollisionType}

Returns the type of collision event being reported.

Returns:
Type
lumin.physics.CollisionType

getPrismId() → {number}

Inherited From:

Returns the Prism ID of the target Prism.

Returns:

the Prism ID of the target Prism.

Type
number

getRigidBody1() → {number}

Returns id of the 1st colliding rigid body.
If this is a trigger event, this will be the trigger body.
If this body is the world mesh, the id will be 0.

Returns:
Type
number

getRigidBody2() → {number}

Returns id of the 2nd colliding rigid body.
If this body is the world mesh, the id will be 0.

Returns:
Type
number

isInputEventType() → {boolean}

Inherited From:

Returns true if this is an input event (a subclass of InputEventData).

Returns:

true if this is an input event

Type
boolean

toString() → {string}

Inherited From:

Returns a string representation of this event for debug purposes.

Returns:
Type
string