From 3dcf88a36c072e42005c48dae419c66996c96f84 Mon Sep 17 00:00:00 2001 From: SmallFox <2806143047@qq.com> Date: Thu, 21 May 2026 07:21:06 +0800 Subject: 摄像机视角实现 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实现跟随自由旋转 --- Assets/Scripts/PlayerLocomotion.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'Assets/Scripts/PlayerLocomotion.cs') 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; -- cgit