Nez icon indicating copy to clipboard operation
Nez copied to clipboard

Physics.Overlap rect not right size.

Open xThuby opened this issue 2 years ago • 0 comments

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.

image 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);

xThuby avatar Jul 03 '23 23:07 xThuby