Re-use mesh behavior

When you apply a behavior to more than one mesh it is only applied to the last one, eg https://www.babylonjs-playground.com/#YEZPVT#40

For this topic it led to creating and putting behaviors in an array.

Is there a way of creating a behavior once and using it multiple times?

One instance of a behavior is really meant to target only one instance of a node as it reacts to its event and so on.

Unfortunately in your case it means creating several instance of it.

The easiest if you want customization might be to extend a behavior with your custom code ?

I was about to post this question to the forum as well when the forum software detected that my question was similar to this.

I watched @Deltakosh’s youtube video on behaviors and was also mistakenly under the impression that one behavior instance could be applied to multiple meshes. Perhaps a clarification should be added to the documentation?