Holds information about a collision event. Includes a list of contact points and the colliders involved

Properties

contacts: ContactPoint[]

The contact points of this collision. Contains information about positions, normals, distance, friction, impulse...

me: IGameObject

the gameobject this collision event belongs to (e.g. if onCollisionEnter is called then me is the same as this.gameObject)

Accessors

  • get collider(): ICollider
  • the other collider the collision happened with

    Returns ICollider

  • get gameObject(): IGameObject
  • the other object the collision happened with

    Returns IGameObject

  • get rigidBody(): IRigidbody
  • the other rigidbody we hit, null if none attached

    Returns IRigidbody

Generated using TypeDoc