fix: 2D shape collider parametered constructor not creating a copy of the given shape

This commit is contained in:
Syntriax 2025-04-07 22:37:23 +03:00
parent 1ee07b41f8
commit 66b46e3d36

View File

@ -13,5 +13,9 @@ public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2
public override void CalculateCollider() => Transform.TransformShape(ShapeLocal, ref _shapeWorld); public override void CalculateCollider() => Transform.TransformShape(ShapeLocal, ref _shapeWorld);
public Collider2DShapeBehaviour() { } public Collider2DShapeBehaviour() { }
public Collider2DShapeBehaviour(Shape2D shape) => ShapeLocal = shape; public Collider2DShapeBehaviour(Shape2D shape)
{
ShapeLocal = shape;
ShapeWorld.CreateCopy();
}
} }