mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-07 03:06:55 +08:00
[unity] SkeletonRagdoll fix for 3.5 AnimationState
This commit is contained in:
parent
d57aa03680
commit
752516e00f
@ -237,6 +237,7 @@ namespace Spine.Unity.Modules {
|
|||||||
float startTime = Time.time;
|
float startTime = Time.time;
|
||||||
float startMix = mix;
|
float startMix = mix;
|
||||||
while (mix > 0) {
|
while (mix > 0) {
|
||||||
|
skeleton.SetBonesToSetupPose();
|
||||||
mix = Mathf.SmoothStep(startMix, target, (Time.time - startTime) / duration);
|
mix = Mathf.SmoothStep(startMix, target, (Time.time - startTime) / duration);
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,8 +35,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Spine.Unity;
|
|
||||||
using UnityEngine.Assertions;
|
|
||||||
|
|
||||||
namespace Spine.Unity.Modules {
|
namespace Spine.Unity.Modules {
|
||||||
[RequireComponent(typeof(SkeletonRenderer))]
|
[RequireComponent(typeof(SkeletonRenderer))]
|
||||||
@ -255,6 +253,7 @@ namespace Spine.Unity.Modules {
|
|||||||
float startTime = Time.time;
|
float startTime = Time.time;
|
||||||
float startMix = mix;
|
float startMix = mix;
|
||||||
while (mix > 0) {
|
while (mix > 0) {
|
||||||
|
skeleton.SetBonesToSetupPose();
|
||||||
mix = Mathf.SmoothStep(startMix, target, (Time.time - startTime) / duration);
|
mix = Mathf.SmoothStep(startMix, target, (Time.time - startTime) / duration);
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user