Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physics.Overlap rect not right size. #765

Open
xThuby opened this issue Jul 3, 2023 · 0 comments
Open

Physics.Overlap rect not right size. #765

xThuby opened this issue Jul 3, 2023 · 0 comments

Comments

@xThuby
Copy link
Contributor

xThuby commented Jul 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant