fix: Collider2DShapeBehaviour.ShapeWorld Create Copy of Shape.Box
This commit is contained in:
@@ -8,7 +8,7 @@ public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2
|
|||||||
public Shape ShapeWorld { get => _shapeWorld; protected set => _shapeWorld = value; }
|
public Shape ShapeWorld { get => _shapeWorld; protected set => _shapeWorld = value; }
|
||||||
public Shape ShapeLocal { get; set; } = Shape.Box;
|
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);
|
public override void CalculateCollider() => Transform.TransformShape(ShapeLocal, ref _shapeWorld);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user