fix: Collider2DShapeBehaviour.ShapeWorld Create Copy of Shape.Box
This commit is contained in:
parent
c1c1676b9a
commit
1ffddab2c1
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue