Hello everyone,
long time no see
I am using a fixed ArcRotateCamera for my card game that is precisely adjusted to show the cards in my (virtual) hand and the play mate.
Free moving camera is impressive but is not serving the gameplay, so I froze it.
Now that I have some free time, I am thinking to do subtle camera animations, like framing and zooming on the cards in my hand when I just receive them at the beginning of a round, then replace the camera, also at the end of the round farming and zooming on the point panel, etc.
So, I attached the camera to the mouse and move the camera around to find the best possible position, rotation, zoom* with the idea to use these parameters in camera animations afterwards:
- when I move the mouse while left button pressed, I think it binds alpha and beta to the mouse: when I finished, I can properly reset the camera to its initial values (.alpha, .beta, .rotation)
- when I move the mouse while right button pressed, it looks like .position.x and position.y are bound, but afterwards I cannot find a proper way to reset the camera to its initial position… I tried to clone the position vector and then to use it in a .setPosition but it doesn’t work properly, or is working only one time…
I guess there something trivial that I don’t understand (again ) and would welcome some help
Here is the playground https://www.babylonjs-playground.com/#1DMQK9#1
The replace is no more working after the second right pressed move action.
*also, side question about the zoom: is there a way to setup the sensitivity of my mouse wheele ? It is way to sensitive time being to be usable for me…
THANKS!