-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
SharedShape 2D convex decomposition produces bad results if polygon is clockwise #55
Comments
Hi! Could you please try again with the |
Ah sorry, I looked up the problem but only in issues, not in PRs! I'll try it out. There's still the (small) detail about the docs for |
Mmh, you are correct, the docs should be made more precise about the expected orientation!
Let’s make another issue with a more suited title for that. |
Cool, I'll do that if you want :-) |
Hi!
I don't know whether this is a bug or a problem in the docs, but if you do a convex decomposition with a clockwise polygon, each shape in the decomposition will also be clockwise, and therefore will not work properly with
SharedShape::convex_polyline
. In turn, this means that the resulting compound shape will not work as expected.parry/src/shape/shared_shape.rs
Lines 200 to 208 in d4b01c5
The docs for
SharedShape::convex_decomposition
don't mention that shapes have to be counter-clockwise, and neither do the user guides. Similarly, the docs forSharedShape::convex_polyline
don't mention that either, and it's only when looking atConvexPolygon::from_convex_polyline
that the counter-clockwise condition is ever mentioned.Thanks for the amazing engine btw :-) people who played my LDJam game kept saying they were impressed by the physics, for which y'all are 100% responsible.
The text was updated successfully, but these errors were encountered: