perf: double copy in shape collider's world shape field

This commit is contained in:
Syntriax 2025-06-15 14:34:52 +03:00
parent 4d353662a1
commit 4a3775a0de

View File

@ -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);