Skip to content

Convex / Convex collisions not generating enough contact points. #56

@oleh-derevenko

Description

@oleh-derevenko

When I place two convex shapes on top of each other, so that the top one rests on the bottom one, then the collider generates only one contact point.
One contact point is not enough to resolve the collision in a stable way.

The contact point will jump around, from corner to corner, causing an unstable wobble in the bodies.

This video demonstrates the behaviour.
Note: that in the video, I single-step through the sim so that frame-by-frame changes are visible.
(Contact position and depth are shown as yellow arrows.)

https://youtu.be/H7txuoUwxy0

This is with libccd convex/convex collider.

To fix this, the collider should generate a contact point for each of the vertices pushed into the shape.
Additionally, it should generate contacts on edges as well, if one shape is resting halfway over the top of the other.

[Issue created by bram_stolk: 2018-10-30]

[Comment created by bram_stolk: 2018-10-30]
Looking at the libccd sources, this seems to be a limitation in libccd.
The API for libccd collision tests will generate either 0 or 1 contact point+dir.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions