mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[unity] Fixed RootMotion components temp movement not being completely cleared when using FixedUpdate. Closes #2046.
This commit is contained in:
parent
aa7ad12222
commit
69b2a5ce13
@ -37,6 +37,7 @@ namespace Spine.Unity {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Base class for skeleton root motion components.
|
/// Base class for skeleton root motion components.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[DefaultExecutionOrder(1)]
|
||||||
abstract public class SkeletonRootMotionBase : MonoBehaviour {
|
abstract public class SkeletonRootMotionBase : MonoBehaviour {
|
||||||
|
|
||||||
#region Inspector
|
#region Inspector
|
||||||
@ -155,6 +156,7 @@ namespace Spine.Unity {
|
|||||||
Vector2 parentBoneScale;
|
Vector2 parentBoneScale;
|
||||||
GetScaleAffectingRootMotion(out parentBoneScale);
|
GetScaleAffectingRootMotion(out parentBoneScale);
|
||||||
ClearEffectiveBoneOffsets(parentBoneScale);
|
ClearEffectiveBoneOffsets(parentBoneScale);
|
||||||
|
skeletonComponent.Skeleton.UpdateWorldTransform();
|
||||||
previousRigidbodyRootMotion = rigidbodyDisplacement;
|
previousRigidbodyRootMotion = rigidbodyDisplacement;
|
||||||
|
|
||||||
ClearRigidbodyTempMovement();
|
ClearRigidbodyTempMovement();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user