Enhanced internal edge removal #612
Labels
A-Collision
Relates to the broad phase, narrow phase, colliders, or other collision functionality
C-Enhancement
New feature or request
Ghost collisions are a very common and frustrating problem in game physics. A common case where they may occur is when an object is sliding along a seemingly smooth surface formed by several shapes joined together, such as a tilemap; the body can hit the edges where the colliders meet, causing jarring and unrealistic behavior as the object bumps into invisible edges.
Parry already supports fixing internal edges for triangle meshes and heightfields. However, the same is not supported for other compound shapes or separate colliders. Objects can still hit internal edges of cuboids that are flush next to each other.
How can we improve on this?
I largely consider proper internal edge removal to still be an open problem, but I suspect that there is more we could do.
Jolt supports enhanced internal edge removal that appears to work for any compound shape, as long as the vertices of sub-shapes match within some epsilon threshold (i.e. "T-edges" are not supported). It is built based on the ideas in Contact generation for meshes by Pierre Terdiman (https://www.codercorner.com/MeshContacts.pdf). There is a video showcasing it here.
Jolt's approach only works for shapes belonging to a single body. For example, a tilemap consisting of separate bodies for each tile can still have internal edge problems, but for a single compound shape, they should be fixed. This is because making it work cross-body would have serious performance implications and hinder parallelism in their case. If we implement this, we might require similar limitations, though I do want to experiment to see if it's possible to work around them.
The text was updated successfully, but these errors were encountered: