fix: Collider2DShapeBehaviour.ShapeWorld Create Copy of Shape.Box

This commit is contained in:
Syntriax 2024-01-27 21:50:55 +03:00
parent c1c1676b9a
commit 1ffddab2c1
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2
public Shape ShapeWorld { get => _shapeWorld; protected set => _shapeWorld = value; }
public Shape ShapeLocal { get; set; } = Shape.Box;
private Shape _shapeWorld = Shape.Box;
private Shape _shapeWorld = Shape.Box.CreateCopy();
public override void CalculateCollider() => Transform.TransformShape(ShapeLocal, ref _shapeWorld);