Hello and thanks for all the info.
That happens when one copy and pastes in a hurry …
After I fixed it, the animation works.
So I tried to recreate the movement that happens when one uses the keyboard right arrow key ( rotation along the x-axis ) with the following code:
let pos = camera.position.clone()
BABYLON.Animation.CreateAndStartAnimation("cameraAnimationX", camera, "position", 1, 1, camera.position, pos, 0);
However that does not produce my intended results.
Maybe I should just copy what I find in the source for the keyboard input?
Thanks. Well, I intentionally do not want to use the keyboard controls.
I need to recreate the same functionality with on-screen buttons.
The final application will run on a touch-device with limited capabilities.
I am sorry but I guess mixing two different questions is a bit confusing.
So I did check the source and the simple solution is just:
camera.inertialAlphaOffset += 0.01;
as seen here: