Skip to content

Phantom collision due to convex manifold depth being too large #267

Answered by Grimelios
Grimelios asked this question in Q&A
Discussion options

You must be logged in to vote

Welp, false alarm. Turns out it's a problem with my game logic, not Bepu.

I'm using an INarrowPhaseCallbacks implementation that allows objects to track specific collisions (using a function with the signature OnContact(CollidableReference collidable, int childIndex)). The mistake I made is that INarrowPhaseCallbacks has two overloads each for AllowContactGeneration and ConfigureContactManifold, one that takes child indexes and one that doesn't. For a body with multiple collidables (like a Mesh), both functions are called while processing collisions, not just the child version. My mistake, then, was calling OnContact(collidable, 0) (note the hardcoded 0) for the non-child overload. By a h…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Grimelios
Comment options

Comment options

You must be logged in to vote
2 replies
@RossNordby
Comment options

@Grimelios
Comment options

Answer selected by Grimelios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants