When the freecam rotation animation starts, the current rotation position is reset to (0,0,0).
How can I get the current camera rotation position?
Here is an example, turn the camera before the turn animation starts after 5 seconds.
When the freecam rotation animation starts, the current rotation position is reset to (0,0,0).
How can I get the current camera rotation position?
Here is an example, turn the camera before the turn animation starts after 5 seconds.
You clone() your camera rotation and set as animation start key before anyone could interact (rotate) camera. Either set keys etc. inside your setTimeout or use CreateAndStartAnimation, like in this example PG, just exchange mesh with camera and rotationQuaternion with rotation:
Edit: Pretty much use this in your setTimeout():
BABYLON.Animation.CreateAndStartAnimation('spinTo', camera, 'rotation', framerate, 3*framerate, camera.rotation, new BABYLON.Vector3(0, 2, 0), BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT)
Thanks, now I understand how it works!