lhx880619 Posted October 29, 2018 Share Posted October 29, 2018 hi all, do you guys know how to set from and to property of a animationGroup? i just want to play the animation form "END FRAME" to "START FRAME", thx! Quote Link to comment Share on other sites More sharing options...
Guest Posted October 29, 2018 Share Posted October 29, 2018 Hey! here is an example of animationGroup: https://www.babylonjs-playground.com/#3D23K4#2 You can directly set animationGroup.from and .to Quote Link to comment Share on other sites More sharing options...
lhx880619 Posted October 30, 2018 Author Share Posted October 30, 2018 @Deltakosh thanks for your help,but i just can NOT set from and to, because it only has getter from sourcecode https://github.com/BabylonJS/Babylon.js/blob/master/src/Animations/babylon.animationGroup.ts so the only way the set that is to set _from? but i think that may not work for all child animations Quote Link to comment Share on other sites More sharing options...
lhx880619 Posted October 30, 2018 Author Share Posted October 30, 2018 there is a start function which take from and to , so maybe i can use start() instead of play() Quote Link to comment Share on other sites More sharing options...
lhx880619 Posted October 30, 2018 Author Share Posted October 30, 2018 @Deltakosh sorry i have tried with your pg, to add from to of start function, but it has some errors. https://www.babylonjs-playground.com/#3D23K4#3 babylon.js:1 Uncaught TypeError: Cannot read property 'frame' of undefined Quote Link to comment Share on other sites More sharing options...
Guest Posted October 30, 2018 Share Posted October 30, 2018 As you want to go reverse you have to set the speed to -1: https://www.babylonjs-playground.com/debug.html#3D23K4#4 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.