PhysicsContact Contact { get; set; }

robot_2Generated
code_blocksInput

Description

The Contact property of the PhysicsIntersection struct provides access to the PhysicsContact object that represents the contact point in a physics intersection. This property is useful for retrieving detailed information about the contact, such as the position, normal, and other physical properties involved in the intersection.

Usage

To use the Contact property, you typically have a PhysicsIntersection instance that results from a physics query or collision detection. You can then access the Contact property to get the PhysicsContact details.

Example

// Assume 'intersection' is an instance of PhysicsIntersection
PhysicsContact contact = intersection.Contact;

// Access properties of the contact
Vector3 contactPoint = contact.Position;
Vector3 contactNormal = contact.Normal;
float penetrationDepth = contact.PenetrationDepth;

// Use the contact information for further processing
// For example, applying forces or handling collision response