diff options
Diffstat (limited to 'Assets/Scripts/Unit/UnitRootMotion.cs')
-rw-r--r-- | Assets/Scripts/Unit/UnitRootMotion.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Assets/Scripts/Unit/UnitRootMotion.cs b/Assets/Scripts/Unit/UnitRootMotion.cs index caf59d7c..86e44abd 100644 --- a/Assets/Scripts/Unit/UnitRootMotion.cs +++ b/Assets/Scripts/Unit/UnitRootMotion.cs @@ -104,7 +104,8 @@ public class UnitRootMotion : UnitComponent Vector3 dest = m_Owner.unitAnimation.animator.deltaPosition;
dest.z = 0;
var state = m_Owner.unitAnimation.baseLayer.stateInfo;
- if (state.IsTag("IgnoreY"))
+ bool ignoreY = m_Owner.unitAnimation.baseLayer.animationData.GetProperty(EAnimationProperty.IgnoreY, 0) != 0;
+ if (state.IsTag("IgnoreY") || ignoreY)
{
dest.y = 0;
}
|