Skip to main content

ContactPointStructure

A struct in Root.Township, Alta.Impact.

A copy of one collision contact (point, normal, colliders, separation) plus the impact detector that saw it. Passed around the impact system.

Constructors​

MemberWhat it is
ContactPointStructure(Vector3 normal, Vector3 point, Collider thisCollider, Collider otherCollider, float separation, ImpactDetector detector = null)Creates a ContactPointStructure from contactPoint and detector.
ContactPointStructure(ContactPoint contactPoint, ImpactDetector detector = null)Creates a ContactPointStructure from contactPoint and detector.

Properties​

MemberWhat it is
ImpactDetector Detector { get; private set; }The impact detector that recorded the contact, or null.
Vector3 Normal { get; private set; }Contact normal.
Collider OtherCollider { get; private set; }The other collider in the contact.
Vector3 Point { get; private set; }Contact point in world space.
float Separation { get; private set; }Distance between the colliders at the contact.
Collider ThisCollider { get; private set; }This side's collider.

Used in​

Members of other types that take, return or hold a ContactPointStructure: