I am selecting a mesh on click and set it as lockedTarget because I want the rotation point of the camera to be around the mesh. After that Babylon moves the lockedTarget to the center of the camera. How is it possible to stop Babylon from moving the camera?
This is my current playground I am working on. https://playground.babylonjs.com/#G2F8LN#116
The camera is panned when setting a new target in order to keep alpha/beta angles. But it’s possible to compute that pan vector and change the camera position accordingly.
I understand how it should work, also setting the camera position to the old position is giving me the right results in console. But the camera is still moving. In both examples the camera is still moving around.
My goal is to change the target on click. Now when I click i dont want the mesh or camera to move. Everything should stay exactly the same (angle, rotation etc.).
I came across it before, but I thought that you cant rotate the meshes on camera input. Do I need to create my own click and drag events? Or how can I set a pivot and then rotate with click input (like normal camera rotation).