From 6a104d8abd013334ed2787c4b4c6fa6481e4c6a4 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sat, 27 Jan 2024 20:34:58 +0300 Subject: [PATCH] fix: Collider2DShapeBehaviour TransformShape ref Requirement --- Engine.Physics2D/Collider2DShapeBehaviour.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Engine.Physics2D/Collider2DShapeBehaviour.cs b/Engine.Physics2D/Collider2DShapeBehaviour.cs index f225ad0..28b9f51 100644 --- a/Engine.Physics2D/Collider2DShapeBehaviour.cs +++ b/Engine.Physics2D/Collider2DShapeBehaviour.cs @@ -5,9 +5,10 @@ namespace Syntriax.Engine.Physics2D; public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2D { - public Shape ShapeWorld { get; protected set; } = Shape.Box; + public Shape ShapeWorld { get => _shapeWorld; protected set => _shapeWorld = value; } public Shape ShapeLocal { get; set; } = Shape.Box; + private Shape _shapeWorld = Shape.Box; public override void CalculateCollider() => Transform.TransformShape(ShapeLocal, ref _shapeWorld);