Actions for Multiple Meshes

Hello everyone,

In the PG below, the “donut” mesh performs 2 actions when it intersects the sphere (scaling and color).

https://www.babylonjs-playground.com/#DNOLK#3

However, is it possible for the donut to have a 3rd action associated with a different mesh (i.e. one of the boxes)?

I haven’t seen an example of this yet.

Thanks!

The target being a parameter of the action you could change it to any mesh you want :slight_smile:

Also, you could rely on a CodeAction to run any code you want when a trigger has been detected.

Great, thanks @sebavan!
I didn’t know about the CodeAction option, so I’ll look into that.

1 Like