Description
The Self
property of the PhysicsIntersectionEnd
struct represents one of the two targets involved in a physics intersection event. This property is of type PhysicsContact.Target
and provides access to the target that is considered the "self" in the context of the intersection.
Usage
Use the Self
property to retrieve or set the target that is considered the "self" in a physics intersection scenario. This is typically used in collision detection and response systems where you need to identify the involved entities.
Example
// Example of accessing the Self property
PhysicsIntersectionEnd intersectionEnd = new PhysicsIntersectionEnd();
PhysicsContact.Target selfTarget = intersectionEnd.Self;
// Example of using the Deconstruct method to get both targets
intersectionEnd.Deconstruct(out PhysicsContact.Target self, out PhysicsContact.Target other);
// Now you can use 'self' and 'other' to handle the intersection logic