Search the Community
Showing results for tags 'animationgroup'.
-
First, animationGroup.setWeightForAllAnimatables works for the UFO file https://www.babylonjs-playground.com/#PSR2ZX#17, but not https://www.babylonjs-playground.com/#PSR2ZX#18. Is it because of the skeleton animation? /** * Start all animations on given targets * @param loop defines if animations must loop * @param speedRatio defines the ratio to apply to animation speed (1 by default) * @param from defines the from key (optional) * @param to defines the to key (optional) * @returns the current animation group */ public start(loop = false, speedRatio = 1, from?: number, to?: number): AnimationGroup { if (this._isStarted || this._targetedAnimations.length === 0) { return this; } for (const targetedAnimation of this._targetedAnimations) { this._animatables.push(this._scene.beginDirectAnimation(targetedAnimation.target, [targetedAnimation.animation], from !== undefined ? from : this._from, to !== undefined ? to : this._to, loop, speedRatio, () => { this.onAnimationEndObservable.notifyObservers(targetedAnimation); })); } this._speedRatio = speedRatio; this._isStarted = true; return this; } In AnimationGroup, beginDirectAnimation was used. Will beginWeightedAnimation make weight and blending working? Second (I guess is't a different issue), scene.animationPropertiesOverride = new BABYLON.AnimationPropertiesOverride(); scene.animationPropertiesOverride.enableBlending = true; scene.animationPropertiesOverride.blendingSpeed = 0.02; That works with https://www.babylonjs-playground.com/#BCU1XR, but not with scene.animationGroups._targetedAnimations.animation.enableBlending (in both https://www.babylonjs-playground.com/#PSR2ZX#17 and https://www.babylonjs-playground.com/#PSR2ZX#18). The value of enableBlending is always undefined. BTW, Weight -1 means stop while 0 also means stop too. That's confusing.
- 12 replies
-
- gltf
- animationgroup
-
(and 2 more)
Tagged with: