feat: added CollisionDetectionInformation.ContactPoint
This commit is contained in:
@@ -7,14 +7,16 @@ public readonly struct CollisionDetectionInformation
|
||||
(
|
||||
ICollider2D Detector,
|
||||
ICollider2D Detected,
|
||||
Vector2D ContactPoint,
|
||||
Vector2D Normal,
|
||||
float Penetration
|
||||
)
|
||||
{
|
||||
public ICollider2D Detector { get; init; } = Detector;
|
||||
public ICollider2D Detected { get; init; } = Detected;
|
||||
public Vector2D ContactPoint { get; init; } = ContactPoint;
|
||||
public Vector2D Normal { get; init; } = Normal;
|
||||
public float Penetration { get; init; } = Penetration;
|
||||
|
||||
public CollisionDetectionInformation Reverse() => new(Detected, Detector, -Normal, Penetration);
|
||||
public CollisionDetectionInformation Reverse() => new(Detected, Detector, ContactPoint, -Normal, Penetration);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user