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

testPolygonPolygon and testPolygonCircle APIs differ on definition of collision #42

Closed
brownstein opened this issue Oct 19, 2016 · 2 comments

Comments

@brownstein
Copy link

Found that testPolygonPolygon returns true when one polygon is inside another, but testPolygonCircle returns false when a circle is inside a containing polygon. Looks like this is caused by line #840 of SAT.js, which returns false regardless of containment for circle tests, and line #983, which returns true when two polygons do not have a separating axis.

Requesting that the next release unify the definition of collisions to either include or not-include containment cases. Issue is mitigated by inspecting Response payloads, but this is still a confusing API behavior.

@jriecken jriecken added the bug label Oct 19, 2016
@brownstein
Copy link
Author

@jriecken Looks like I'm in error - had an inverted polygon in the mix which was causing the observed behavior. Closing the issue.

@jriecken jriecken removed the bug label Oct 19, 2016
@jriecken
Copy link
Owner

Thanks for double-checking!

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

2 participants