Fixed Collision2D using wrong entities for rigidbodies

This commit is contained in:
Simon Lübeß
2024-01-25 23:36:29 +01:00
parent 4538c38fd7
commit 2399196a3a
+2 -2
View File
@@ -29,10 +29,10 @@ public struct Collision2D
/// Gets the rigidbody whose Collider takes part in the collision.
/// This Rigidbody is either a component of the entity whose script instance received the event or a parent of it.
/// </summary>
public Rigidbody2D Rigidbody => new() { _uuid = _entity };
public Rigidbody2D Rigidbody => new() { _uuid = _rigidbody };
/// <summary>
/// Gets the other rigidbody whose Collider takes part in the collision.
/// </summary>
public Rigidbody2D OtherRigidbody => new() { _uuid = _otherEntity };
public Rigidbody2D OtherRigidbody => new() { _uuid = _otherRigidbody };
}