ActionManager on scene or meshes?

I have a Scene containing 1200 sphere Meshes. When the user clicks on one of the spheres, the camera is zoomed to it. I have now done this twice, using the onPointerDown/Move/Up on the Scene, and using actionManager ExecuteCodeAction attached to each of the sphere meshes.

My question is simple: which is better? Intuitively, there being only one set of onPointer methods, vs 1200 identical functions for the Meshes, is a no-brainer. Making my CodeAction a tiny function that calls another function 1200 times mitigates this, but not entirely. On the other hand, there’s no way round that onPointerMove, and I don’t like the idea of code unnecessarily firing forever. Is there anything clever under the hood that makes this something I don’t have to worry about? Or some third means that gets round both problems?

Another approach using Action Managers is to make use of the callback’s event parameter, which has property source that will be the clicked mesh. That way you can use the same callback function for all the meshes. For example, here I use the same function for all of the action managers and print the clicked mesh’s name. IDK which way is best thou, this is just another example. :slight_smile:

Hello @Natalie_Driscoll just checking in, was your question answered? :slight_smile: