Hi, I am wondering if there is a way to check for collisions with a “type” of object rather than a specific object.
The following code is according to the documentation:
sphereImpostor.registerOnPhysicsCollide(groundImpostor, function(main, collided) {
main.object.material.diffuseColor = new BABYLON.Color3(Math.random(), Math.random(), Math.random());
});
What if I wanted to collide with MULTIPLE types of ground scattered all throughout my level? I’m sure I could add all my ground to a list and register a callback for all of them in a loop, but I was wondering if there was a system I wasn’t aware of nestled in BJS that lets me apply a tag to multiple objects so I might simply register a callback for collisions with a type of object instead.