Class: Collision

Collision

Collision contains all data to describe a collision of 2 RigidBody components.


new Collision()

Properties:
Name Type Description
rigidBody

The RigidBody that collided with the collision message emitter.

entity

The Entity that collided with the collision message emitter.

Author:
  • derschmale <http://www.derschmale.com>

Members


contactNormal

The contact normal of the collision, pointing out of the rigid body broadcasting the collision message.


contactPoint

The world-space contact point of the collision for the rigid body broadcasting the collision message.


entity

The entity that collided with the rigid body broadcasting the collision message.


relativeVelocity

The relative velocity between the two collisions (broadcaster.velocity - other.velocity)


rigidBody

The RigidBody that collided with the rigid body broadcasting the collision message.