diff --git a/xiaofang/Assets/Script/Character/PlayerMovement_Jpystick.cs b/xiaofang/Assets/Script/Character/PlayerMovement_Jpystick.cs index b11599cc..52e76359 100644 --- a/xiaofang/Assets/Script/Character/PlayerMovement_Jpystick.cs +++ b/xiaofang/Assets/Script/Character/PlayerMovement_Jpystick.cs @@ -87,7 +87,7 @@ public class PlayerMovement_Joystick : MonoBehaviour float horizontal = joystick.Horizontal; float vertical = joystick.Vertical; - // 转换为三维方向向量 (保持在水平面) + // 转换为三维方向向量 ( 保持在水平面 ) Vector3 inputDirection = new Vector3(horizontal, 0f, vertical); // 获取移动方向相对于摄像机的世界方向 @@ -101,7 +101,7 @@ public class PlayerMovement_Joystick : MonoBehaviour cameraForward.Normalize(); cameraRight.Normalize(); - // 计算最终的移动方向 (相对于摄像机的前后左右) + // 计算最终的移动方向 ( 相对于摄像机的前后左右 ) Vector3 moveDirection = (cameraRight * horizontal + cameraForward * vertical).normalized; if (Mathf.Abs(vertical) > 0.01f || Mathf.Abs(horizontal) > 0.01f) @@ -160,4 +160,4 @@ public class PlayerMovement_Joystick : MonoBehaviour // 使用插值平滑调整相机的FOV mainCamera.fieldOfView = Mathf.Lerp(mainCamera.fieldOfView, targetFOV, fovChangeSpeed * Time.deltaTime); } -} +} \ No newline at end of file