Gugis Posted May 6, 2014 Share Posted May 6, 2014 Is it to possible to get current frame of skeleton animation?Like:var animation = scene.beginAnimation(skeleton, 1, 10, true); When you need to get frame:var frame = animation.currentFrame; Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 6, 2014 Share Posted May 6, 2014 The problem is that beginAnimation can triggers a lot of animations. Here is the code of this specific function: // Local animations if (target.animations) { this.stopAnimation(target); var animatable = new BABYLON.Internals.Animatable(target, from, to, loop, speedRatio, onAnimationEnd); this._activeAnimatables.push(animatable); } // Children animations if (target.getAnimatables) { var animatables = target.getAnimatables(); for (var index = 0; index < animatables.length; index++) { this.beginAnimation(animatables[index], from, to, loop, speedRatio, onAnimationEnd); } }As you can see a lot of animatable objects are created 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.