Collision detection with double-sided mesh

Hi there!

Recently I received a super-fast bug fix regarding my bug report here. Thanks @Deltakosh!

This time I have one more question regarding the built-in collision detection system, but not sure if it’s a bug or just a lack of the collision detection system. That’s why posting in the Questions thread.

The thing I noticed is that collision detection doesn’t work properly when colliding from inside a mesh even if it has sideOrientation: BABYLON.Mesh.DOUBLESIDE.

This is not a huge issue for me as I can work around this by merging two sphere meshes setting for outer mesh sideOrientation: BABYLON.Mesh.FRONTSIDE and for inner one sideOrientation: BABYLON.Mesh.BACKSIDE. That way proper collision detection can be achieved.

But I’m still interested to know either it’s a bug which can be fixed or maybe I’m doing something wrong? :slight_smile:

Link to the playground (W, S, A, D to move the cube) -

This is “by design” :slight_smile: To go fast we only detect collisions with front facing triangles

1 Like

I thought so. But that’s good to know for sure. Thanks :wink:

1 Like