Skip to content

Commit

Permalink
BoxCollider should always have the localOffset set to include the hal…
Browse files Browse the repository at this point in the history
…f width/height
  • Loading branch information
prime31 committed Oct 10, 2016
1 parent f6a7b03 commit 84d7dc2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Nez-PCL/ECS/Components/Physics/BoxCollider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ public BoxCollider()
/// <param name="height">Height.</param>
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 );
}

Expand Down

0 comments on commit 84d7dc2

Please sign in to comment.