Character Controller Pro  1.3.8
A 2D/3D character controller asset for the Unity Engine.
Lightbug.Utilities.Contact Struct Reference

Struct that contains the information of the contact, gathered from the collision message ("enter" and "stay"). More...

Public Member Functions

 Contact (bool firstContact, ContactPoint2D contact, Collision2D collision)
 
 Contact (bool firstContact, ContactPoint contact, Collision collision)
 
 Contact (Vector3 point, Vector3 normal, Vector3 pointVelocity, Vector3 relativeVelocity)
 

Public Attributes

readonly bool firstContact
 Flag that indicates if this contact was created in the OnCollisionEnter (2D/3D) message. More...
 
readonly Vector3 point
 The contact point. More...
 
readonly Vector3 normal
 The contact normal. More...
 
readonly Collider2D collider2D
 The 2D collider component associated with the collided object. More...
 
readonly Collider collider3D
 The 3D collider component associated with the collided object. More...
 
readonly bool isRigidbody
 Flag that indicates if the collided object is a rigidbody or not. More...
 
readonly bool isKinematicRigidbody
 Flag that indicates if the collided object is a kinematic rigidbody or not. More...
 
readonly Vector3 relativeVelocity
 The relative velocity of the rigidbody associated. More...
 
readonly Vector3 pointVelocity
 The contact point velocity. This value corresponds to the ground rigidbody velocity. More...
 
readonly GameObject gameObject
 The gameObject representing the collided object. More...
 

Detailed Description

Struct that contains the information of the contact, gathered from the collision message ("enter" and "stay").

Member Data Documentation

◆ collider2D

readonly Collider2D Lightbug.Utilities.Contact.collider2D

The 2D collider component associated with the collided object.

◆ collider3D

readonly Collider Lightbug.Utilities.Contact.collider3D

The 3D collider component associated with the collided object.

◆ firstContact

readonly bool Lightbug.Utilities.Contact.firstContact

Flag that indicates if this contact was created in the OnCollisionEnter (2D/3D) message.

◆ gameObject

readonly GameObject Lightbug.Utilities.Contact.gameObject

The gameObject representing the collided object.

◆ isKinematicRigidbody

readonly bool Lightbug.Utilities.Contact.isKinematicRigidbody

Flag that indicates if the collided object is a kinematic rigidbody or not.

◆ isRigidbody

readonly bool Lightbug.Utilities.Contact.isRigidbody

Flag that indicates if the collided object is a rigidbody or not.

◆ normal

readonly Vector3 Lightbug.Utilities.Contact.normal

The contact normal.

◆ point

readonly Vector3 Lightbug.Utilities.Contact.point

The contact point.

◆ pointVelocity

readonly Vector3 Lightbug.Utilities.Contact.pointVelocity

The contact point velocity. This value corresponds to the ground rigidbody velocity.

◆ relativeVelocity

readonly Vector3 Lightbug.Utilities.Contact.relativeVelocity

The relative velocity of the rigidbody associated.


The documentation for this struct was generated from the following file: