Play animation group from one frame to another?

Hello, is it possible play an animation group from one frame to another?

In my scene I have a camera and camera target that animate from left to right. The camera needs to pause at certain points along the scene.

I want to trigger the camera to move and then stop at the intervals such that I can say play from frame 0 to frame 200 then stop. Then when a button is clicked go from 200 to 400. So and so forth. And the same for going backwards (frame 400 to 200).

Any help on this would be greatly appreicated.

animation.start(true, 1.0, animation.from,, false);

You can set your keyframe in animation.from and

animation.start(true, 1.0, 200, 400, false);

Hope it helps


Is there anyway to add a callback so when the group stops, some code is executed.

I tried adding to the animationGroupPauseObservable and the animationGroupStopObservable with no sucess

Probably in this case you need onAnimationGroupEndObservable ?
Example from documentation -

Turns out I was just being dumb. I was calling the wrong method lol

Thanks for your help!


Also I would recommend you to take a look at the AnimationGroup API.
It´s very clear