mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[unity] Use MixBlend in 3.7
This commit is contained in:
parent
a3a0648ce7
commit
a9c469a4a7
@ -149,8 +149,8 @@ namespace Spine.Unity.Playables {
|
||||
skeleton.SetToSetupPose();
|
||||
float fauxFromAlpha = (1f - toClipTime/mixDuration);
|
||||
fauxFromAlpha = fauxFromAlpha > 0.5f ? 1f : fauxFromAlpha * 2f; // fake value, but reduce dip.
|
||||
fromAnimation.Apply(skeleton, 0, fromClipTime, fromClipLoop, null, fauxFromAlpha, MixPose.Setup, MixDirection.Out); //fromAnimation.PoseSkeleton(skeleton, fromClipTime, fromClipLoop);
|
||||
toAnimation.Apply(skeleton, 0, toClipTime, clipData.loop, null, toClipTime/mixDuration, MixPose.Current, MixDirection.In);
|
||||
fromAnimation.Apply(skeleton, 0, fromClipTime, fromClipLoop, null, fauxFromAlpha, MixBlend.Setup, MixDirection.Out); //fromAnimation.PoseSkeleton(skeleton, fromClipTime, fromClipLoop);
|
||||
toAnimation.Apply(skeleton, 0, toClipTime, clipData.loop, null, toClipTime/mixDuration, MixBlend.Replace, MixDirection.In);
|
||||
} else {
|
||||
skeleton.SetToSetupPose();
|
||||
toAnimation.PoseSkeleton(skeleton, toClipTime, clipData.loop);
|
||||
@ -165,4 +165,4 @@ namespace Spine.Unity.Playables {
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user