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?