Play animation from a particular frame to a particular frame

i want to play the animation from 0 - 122 frame from close button and
play animation from 123 - 245 from open open button how can i do that
@mawa @PirateJC @RaananW

Hope you are well.
I believe what you are looking for is ‘animationGroup.start’.
The parameters are all listed in the API.
You don’t have to pass all of’em but you have to follow the order, I.E:

animationGroup.start(true, 1,0, 10);

From the above, read :
The first parameter set to ‘true’ will loop the animation.
The second set to 1 is the ‘speed’ of the animation group.
The third set to 0 is the START FRAME.
Finally, the fourth is the END FRAME.

Note that since you are playing a group of animations, there are a couple of things you need to watch:

  1. Since your animations are likely to have a different ‘length’, note that you SHOULD NOT exceed the length of your shortest animation for the end frame
  2. In order to make sure animations will ‘sync’ while setting a different than the animation start and end frame, you can enable ‘animationGroup.normalize

Hope this will help and have a great day :sunglasses:


Is this the way you were thinking?


I guess it is :smiley: Implementation seems correct. Why do you ask? any issue with it?


No problem, I just implemented it

1 Like

Happy to hear that. Have a great day :sunglasses:

1 Like

Thanks for the help :smiley: