aboutsummaryrefslogtreecommitdiff
path: root/Assets/Scripts/PlayerLocomotion.cs
diff options
context:
space:
mode:
authorSmallFox <2806143047@qq.com>2026-05-21 07:21:06 +0800
committerSmallFox <2806143047@qq.com>2026-05-21 07:21:06 +0800
commit3dcf88a36c072e42005c48dae419c66996c96f84 (patch)
tree76a068834f2f536d83d5f1702fa35de6554da8d0 /Assets/Scripts/PlayerLocomotion.cs
parenta60a3d9344118915a50f22567bef6bee3f2a2415 (diff)
摄像机视角实现
实现跟随自由旋转
Diffstat (limited to 'Assets/Scripts/PlayerLocomotion.cs')
-rw-r--r--Assets/Scripts/PlayerLocomotion.cs1
1 files changed, 1 insertions, 0 deletions
diff --git a/Assets/Scripts/PlayerLocomotion.cs b/Assets/Scripts/PlayerLocomotion.cs
index 686595d..aaa0c12 100644
--- a/Assets/Scripts/PlayerLocomotion.cs
+++ b/Assets/Scripts/PlayerLocomotion.cs
@@ -41,6 +41,7 @@ namespace DS
_moveDirection = _cameraObject.forward * _inputHandler.vertical;
_moveDirection += _cameraObject.right * _inputHandler.horizontal;
_moveDirection.Normalize();
+ _moveDirection.y = 0;
float speed = movementSpeed;
_moveDirection *= speed;