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

testPolygonCircle and testCirclePolygon always return true if Polygon has width/height 0 #55

Closed
fabiopigna opened this issue Oct 19, 2018 · 0 comments · Fixed by #59
Closed
Labels

Comments

@fabiopigna
Copy link

var V = SAT.Vector;
var C = SAT.Circle;
var B = SAT.Box;

var circle = new C(new V(50,50), 20);
var polygon = new B(new V(1000,1000), 20, 0).toPolygon();
var response = new SAT.Response();
var collided = SAT.testPolygonCircle(polygon, circle, response);
console.log(collided); //output true

If width or height of the polygon is 0 the result is always true, despite of the position of the elements.
If the two elements are both circles or polygons it works.

@fabiopigna fabiopigna changed the title testPolygonCircle and testCirclePolygon always return true if Polygon has size 0 testPolygonCircle and testCirclePolygon always return true if Polygon has width/height 0 Oct 19, 2018
@jriecken jriecken added the bug label Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants