Enablling mesh collision and composition

Hello there, I’m planning to build a forniture 3d composer using babylon js, but after having spent a lot of time on the web and on youtube considering the best way to implement collision detection and alghoritms to do it, I would like to ask you if you have any example about this kind of application, and which kind of solution can be best for the pourpose, or if it’s better to think about using a physics engine like cannon js or others.

Thank you for your time

Toni

I would mostly fake physic for furniture as the shape is usually pretty squared so you could simply use the mesh intersection function.

The community might have some example apps ?

May I use collisionGroup and collisionMask with PointerDragBehavior in some way? Do you have any example? I’ve tried to apply the collisionMask and collisionGroup properties but without effect…

Adding @Cedric and @RaananW in case they have smthg similar up their sleeves.

You can use validateDrag like in this example:

https://playground.babylonjs.com/#8PERH0#0

instead of bounding position, you can check the mesh doesn’t collide with another, or more complex checks:

3 Likes