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

[QUESTION] is it possible to have concave shape collision #4

Closed
lewislepton opened this issue Oct 6, 2018 · 2 comments
Closed

[QUESTION] is it possible to have concave shape collision #4

lewislepton opened this issue Oct 6, 2018 · 2 comments
Labels

Comments

@lewislepton
Copy link

as the question title is. is it possible to have concave shape collision. so collision within shapes that say look like stars?
as a star would have collision shape like a pentagon, but goes inwards for the star shape

@lewislepton
Copy link
Author

I guess you could do a cheap way of creating shapes that could take the shape of each stars points then have it in a class of its own. maybe

@hamaluik
Copy link
Owner

Sorry for the long delay. Short answer: not easily. Long answer: yes, but you have to break the concave shape into multiple convex shapes using something like nerik/poly2trihx and test each of the convex shapes against whatever you're trying to collide against. as far as I understand it, this is just a mathematical reality of calculating collisions this way.

@hamaluik hamaluik pinned this issue Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants