Pick mesh (get pick information)

I usually pick up models in these two ways,
One is by binding an actionManager to the mesh,
The other is to add a click event to the scene.

When the scene has a lot of mesh,
The latter seems to have a higher performance cost.

I want to get the mesh and triangle of the current click, and I want to get the best performance

If you have a lot of meshes integrating octrees will be a good approach, see Optimizing With Octrees | Babylon.js Documentation (babylonjs.com)

3 Likes