You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convex decomposition with params produces bad shapes.
I would like to use triangle colliders, because they provide better shapes (for dynamic bodies), but they break completely with ccd enabled, which is necessary to prevent objects going within terrain. Therefore, I use convex decomposition instead. However, that sometimes produces really bad shapes.
I haven't found a combination of parameters which would fix this.
Thank you for providing this test case. I think the right move here is to not use VHACD in 2D (it was originally designed for 3D anyway), and switch to triangulation (currently implemented as ear-clipping in parry) + Hertel-Mehlhorn.
Both features already exist (TriMesh::from_polygon and transformation::hertel_mehlhorn) but they have limitations (like no support for holes, and an API that’s not just one function call); this will be improved in the near term.
Convex decomposition with params produces bad shapes.
I would like to use triangle colliders, because they provide better shapes (for dynamic bodies), but they break completely with
ccd
enabled, which is necessary to prevent objects going within terrain. Therefore, I use convex decomposition instead. However, that sometimes produces really bad shapes.I haven't found a combination of parameters which would fix this.
Contour input:
Resulting collider:
Test data:
The text was updated successfully, but these errors were encountered: