fix: colliders broken after previous commit

This commit is contained in:
2025-04-09 12:25:56 +03:00
parent 26a80452bc
commit e3845a2f5c
2 changed files with 5 additions and 6 deletions

View File

@@ -16,15 +16,14 @@ public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2
}
}
private Shape2D _shapeWorld = Shape2D.Square;
private Shape2D _shapeWorld = Shape2D.Square.CreateCopy();
private Shape2D _shapeLocal = Shape2D.Square;
public override void CalculateCollider() => ShapeLocal.Transform(Transform, ref _shapeWorld);
public override void CalculateCollider() => Transform.Transform(ShapeLocal, ref _shapeWorld);
public Collider2DShapeBehaviour() { }
public Collider2DShapeBehaviour(Shape2D shape)
{
ShapeLocal = shape;
ShapeWorld.CreateCopy();
}
}