Forums › 💬 Slate Sequencer › 🤩 Custom Clips › Spine Animation Track › Reply To: Spine Animation Track
add m_SkeletonAnimation.Update(0);
fix when Application Playing spine show not correct bug 2019.8.13
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
public void UpdateClip(PlaySpineAnimationClip clip, float time, float previousTime, float weight){ if (spineComponent != null){ // baseWeight = activeClips == 2? 0 : 1 - weight; // clip.clipAnimation.Apply(skeleton, 0, time, true, null, weight, Spine.MixPose.Current, Spine.MixDirection.In); // clip.clipAnimation.Mix(skeleton, 0, time, true, null, weight); //fix spine 3.6 mix bug 2018.9.16 //by boboshu if( m_SkeletonAnimation == null) m_SkeletonAnimation = spineComponent as SkeletonAnimation; var toAnimation = clip.clipAnimation; // Approximate what AnimationState might do at runtime. if (activeClips > 1 && fromAnimation != null) { skeleton.SetToSetupPose(); fromAnimation.Apply(skeleton, 0, fromtime, true, null, fromWeight, MixPose.Setup, MixDirection.Out); toAnimation.Apply(skeleton, 0, time, true, null, weight, MixPose.Current, MixDirection.In); } else { skeleton.SetToSetupPose(); toAnimation.PoseSkeleton(skeleton, time, true); } //fix when Application Playing spine show not correct bug 2019.8.13 if (m_SkeletonAnimation != null) m_SkeletonAnimation.Update(0); fromAnimation = clip.clipAnimation; fromtime = time; fromWeight = weight; } |
