Hello to everyone.
Yesterday I asked a question. Very nice answers. You can look at:
https://forum.babylonjs.com/t/zoom-according-to-meshs-local-coordinate/2136/6
But now I have a very similar question. In the above example, clicked mesh moves and comes in front of the camera. And when you look at the mesh from the top and click, it doesn’t exactly face the camera. What I want now is that the meshes will remain fixed. Arc camera will be in front of the mesh clicked with zoom animation. (Arc camera control settings will be active.)
In this way, no matter where the Meshs, when I clicked different meshs, camera will stop in front of that mesh.
I’ve tried a lot of ways for that. The problem will be solved if I reach the z axis in the local coordinates of the meshes and stop the cameras away from the local z-5 axis and turn it into a world coordinate. Is there anyone who can help me with this?
What I want is like this:
https://www.babylonjs-playground.com/#LXZPJK#138
But this doesn’t work properly in the complex meshes in gltf. Is there a better one?