Is it possible to enable gravity and collision separately for a mesh

checkCollisions uses the native collision system of BabylonJS, so in case of physics engine set it to false.

In the physics engine you can set collisionFilterGroup and collisionFilterMask. A collision between A and B will happen if A.collisionFilterGroup & b.collisionFilterMask !== 0.

So for every “digit” of A and B the AND-operator is applied. By default group and mask is -1.

The example PG of @Cedric:

But I recommend to use new Havok physics engine:

How collision filters are set in Havok:

4 Likes