Animated camera on idle mode

Hi,
I would like to ask if there is any possibility to :

  1. Create slider, to control animation of a imported camera ( which was exported to *.babylon file from 3dmax). Slider will be animated when scene starts. When the slider will be moved manually, camera flies in animation depending on the slider position. When scene will be in idle mode (like “camera.useAutoRotationBehavior = true;”), animation resumes automatically on its actual position.

  2. To stop animation of camera anytime by start of controlling it (rotate, but with movements even better) and after a few seconds in idle mode ( not controlling), camera will fly back to position, where were paused and continue the animation.

my sample scene: Babylon.js Playground

Thank you.

Hello and welcome,

this is definitely possible.
You should have a look at our Sandbox page where we kind of doing something along the same lines:

The overall idea is to map the sldier value to camera.alpha value in your case.

The useAutoRotationBehavior will also animate the same value so you can sync the slider.value to camera.alpha easily