Mesh to mesh collision

Hello everyone, I’m new to babylon.js, I’m sorry if this question is stupid. But I’m looking to find a way to make mesh to mesh collision. This is my playground:
I want to be able to make the sphere gone when colliding with the box. Thank you for reading my question.

Welcome aboard!

It does work for me, when moving the box into the sphere the sphere is thrown away: what is exactly your problem?

Hello! I want the sphere is disappeared like when the cube eat the sphere. Sorry for the weird analogy tho lol.

You might be able to rely on the collision observable for that and in the callback disable the sphere for instance:

    sphere.onCollideObservable.add(() => {
1 Like

how can I put this on my playground? I’m a little lose…

Thank you very muchh