From 84d7dc245a3c4901260545423026ad1cf5299e7e Mon Sep 17 00:00:00 2001 From: Mike Desaro Date: Sun, 9 Oct 2016 17:42:38 -0700 Subject: [PATCH] BoxCollider should always have the localOffset set to include the half width/height --- Nez-PCL/ECS/Components/Physics/BoxCollider.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Nez-PCL/ECS/Components/Physics/BoxCollider.cs b/Nez-PCL/ECS/Components/Physics/BoxCollider.cs index 477a05881..b865d98fd 100644 --- a/Nez-PCL/ECS/Components/Physics/BoxCollider.cs +++ b/Nez-PCL/ECS/Components/Physics/BoxCollider.cs @@ -36,9 +36,7 @@ public BoxCollider() /// Height. public BoxCollider( float x, float y, float width, float height ) { - if( x != 0 || y != 0 ) - _localOffset = new Vector2( x + width / 2, y + height / 2 ); - + _localOffset = new Vector2( x + width / 2, y + height / 2 ); shape = new Box( width, height ); }