perf: double copy in shape collider's world shape field
This commit is contained in:
parent
4d353662a1
commit
4a3775a0de
@ -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;
|
private Shape2D _shapeLocal = Shape2D.Square;
|
||||||
|
|
||||||
public override void CalculateCollider() => ShapeLocal.Transform(Transform, _shapeWorld);
|
public override void CalculateCollider() => ShapeLocal.Transform(Transform, _shapeWorld);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user