From 4a3775a0dedf571c59fc456ebb67624f711fae2a Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sun, 15 Jun 2025 14:34:52 +0300 Subject: [PATCH] perf: double copy in shape collider's world shape field --- Engine.Physics2D/Collider2DShapeBehaviour.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine.Physics2D/Collider2DShapeBehaviour.cs b/Engine.Physics2D/Collider2DShapeBehaviour.cs index 2ba213e..34d17ea 100644 --- a/Engine.Physics2D/Collider2DShapeBehaviour.cs +++ b/Engine.Physics2D/Collider2DShapeBehaviour.cs @@ -15,7 +15,7 @@ public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2 } } - private Shape2D _shapeWorld = Shape2D.Square.CreateCopy(); + private Shape2D _shapeWorld = Shape2D.Square; private Shape2D _shapeLocal = Shape2D.Square; public override void CalculateCollider() => ShapeLocal.Transform(Transform, _shapeWorld);