소스 검색

[unity] Fixed RootMotion components temp movement not being completely cleared when using FixedUpdate. Closes #2046.

Harald Csaszar 3 년 전
부모
커밋
69b2a5ce13
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      spine-unity/Assets/Spine/Runtime/spine-unity/Components/RootMotion/SkeletonRootMotionBase.cs

+ 2 - 0
spine-unity/Assets/Spine/Runtime/spine-unity/Components/RootMotion/SkeletonRootMotionBase.cs

@@ -37,6 +37,7 @@ namespace Spine.Unity {
 	/// <summary>
 	/// Base class for skeleton root motion components.
 	/// </summary>
+	[DefaultExecutionOrder(1)]
 	abstract public class SkeletonRootMotionBase : MonoBehaviour {
 
 		#region Inspector
@@ -155,6 +156,7 @@ namespace Spine.Unity {
 			Vector2 parentBoneScale;
 			GetScaleAffectingRootMotion(out parentBoneScale);
 			ClearEffectiveBoneOffsets(parentBoneScale);
+			skeletonComponent.Skeleton.UpdateWorldTransform();
 			previousRigidbodyRootMotion = rigidbodyDisplacement;
 
 			ClearRigidbodyTempMovement();