aboutsummaryrefslogtreecommitdiff
path: root/Assets/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts')
-rw-r--r--Assets/Scripts/AnimatorHandler.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Assets/Scripts/AnimatorHandler.cs b/Assets/Scripts/AnimatorHandler.cs
index f285dca..de1af4c 100644
--- a/Assets/Scripts/AnimatorHandler.cs
+++ b/Assets/Scripts/AnimatorHandler.cs
@@ -142,7 +142,7 @@ namespace DS
{
// 获取当前帧的根运动位移向量
var rootMotion = GetRootMotion();
-
+
// 输出调试日志,用于查看根运动数据
Debug.Log(rootMotion);
@@ -178,6 +178,7 @@ namespace DS
// Vector3.ProjectOnPlane 会去除向量中沿法线方向的分量
// 这样只保留水平方向的位移,避免 Y 轴上的微小波动影响角色位置
// return Vector3.ProjectOnPlane(animator.velocity, normalVector);
+ // return Vector3.ProjectOnPlane(animator.velocity, normalVector);
return Vector3.ProjectOnPlane(animator.velocity, normalVector);
}
}