Nez
Nez copied to clipboard
Physics.Overlap rect not right size.
When using Physics.OverlapRectangle() it seems like the rect I give as an argument has to be twice the size of what it needs to be.
I added a Debug.DrawHollowRect to Physics.OverlapRectangle and saw that the _overlapTestBox was about half the size that it should be, when comparing to a debug draw of the rect I'm putting in.
Red is the rect I'm giving to
OverlapRectangle blue is the debug draw I added to the overlap method.
Debug.DrawHollowRect(new RectangleF(rect.Location.X, rect.Location.Y, _overlapTestBox.Width / 2, _overlapTestBox.Height / 2), Color.Blue);