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

Manifold calculating code not always providing circle manifolds for corner collisions #429

Open
louis-langholtz opened this issue Nov 25, 2016 · 2 comments

Comments

@louis-langholtz
Copy link

As MelvMay pointed out in issue #428 , some shape-shape type collisions with corners don't generate circles typed manifolds. This becomes more of a problem for those shapes that don't have rounded corner collision handling as they have larger m_radius settings. As Erin's code stands as of commit 374664b (from June 19, 2016), only circle-circle and circle-edge type collisions support rounded corner collisions.

@louis-langholtz
Copy link
Author

This capability is now in my dev branch (prior to commit dfd51ec). The following screenshot is an example of it in my dev branch GUI Testbed with visual highlighting of what's involved:

trianglerectanglecirclesmanifold

This picture shows two polygons - a triangle (Shape A) and a rectangle (Shape B) - colliding at each others vertical corners. The curved outlines surrounding both polygons show their "skins" with radiuses much larger than the default in order to highlight the effect. The white circles encircle the contact points generated for the e_circles type contact manifold (where their radii are half the vertex radiuses of 0.8 and 1.6 respectively). The blueish green line shows the simplex generated for calculating their distances. The red dot shows the midpoint of the aforementioned simplex line.

Algorithmically speaking, I achieved this solution essentially by removing the addition of the skin radius total from the incident edge clipping and then checked for the vertices being within that total radius of each other when edge collision wasn't detected. If the vertices were within the total radius of each other, then a 'e_circles' type manifold is returned from the manifold calculating code (instead of the face type manifold that would have formerly been returned).

@erincatto
Copy link
Owner

Feature request: rounded polygonal shapes

@erincatto erincatto added enhancement and removed bug labels Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants