dingoogle Posted May 10, 2018 Share Posted May 10, 2018 Hi guys, I'm trying to add some animations in my project recently. I know that I can use onAnimationEnd in beginAnimation function for a single mesh, but it seems that AnimationGroup is a good place to control multiple animations. My question is how to know animations are ended in an AnimationGroup. onAnimationEndObservable doesn't do anything unless click "stop" button as below PB. https://www.babylonjs-playground.com/#EBMTX7 Quote Link to comment Share on other sites More sharing options...
SinhNQ Posted May 10, 2018 Share Posted May 10, 2018 Hi! With animation loop = true, onAnimationEnd will not triggered. Change animationGroup.play(true) to animationGroup.play(), it will working for you. dingoogle and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
dingoogle Posted May 10, 2018 Author Share Posted May 10, 2018 19 minutes ago, SinhNQ said: Hi! With animation loop = true, onAnimationEnd will not triggered. Change animationGroup.play(true) to animationGroup.play(), it will working for you. Many thanks SinhNQ, got it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.