From 1d002b8c25b0a1f06784a3f8b2accd160f7dac2b Mon Sep 17 00:00:00 2001
From: BobSong <605277374@qq.com>
Date: Wed, 10 Sep 2025 10:37:37 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=8E=A7=E5=88=B6=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Unity/CharacterControllerComponent.cs | 30 +++++++++----------
Fishing2.sln.DotSettings.user | 1 +
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/Assets/Scripts/Fishing2/Unit/Unity/CharacterControllerComponent.cs b/Assets/Scripts/Fishing2/Unit/Unity/CharacterControllerComponent.cs
index 6ce6bbe5e..b50625eaf 100644
--- a/Assets/Scripts/Fishing2/Unit/Unity/CharacterControllerComponent.cs
+++ b/Assets/Scripts/Fishing2/Unit/Unity/CharacterControllerComponent.cs
@@ -250,7 +250,6 @@ namespace NBF.Fishing2
private void StartMovement(MoveState moveState)
{
networkPosition = moveState.startPosition;
- // networkFacingDirection = moveState.currentFacing;
Debug.Log($"开始移动 - 位置: {moveState.startPosition}");
}
@@ -258,8 +257,7 @@ namespace NBF.Fishing2
private void StopMovement(MoveState moveState)
{
networkPosition = moveState.startPosition;
- // networkFacingDirection = moveState.currentFacing;
-
+ characterController.transform.position = networkPosition;
Debug.Log($"停止移动 - 最终位置: {moveState.startPosition}");
}
@@ -294,19 +292,19 @@ namespace NBF.Fishing2
private void UpdatePlayerRotation(Vector2 lookValue)
{
// Look
- Vector2 lookInput = lookValue * sensitivity;
-
- if (lookInput.x != 0.0f)
- {
- _rotationInput.y += lookInput.x;
- }
-
- // Player.CameraRoot.transform.localRotation = Quaternion.Euler(_cameraPitch, 0.0f, 0.0f);
- if (_rotationInput != Vector3.zero)
- {
- characterController.transform.rotation *= Quaternion.Euler(_rotationInput);
- _rotationInput = Vector3.zero;
- }
+ // Vector2 lookInput = lookValue * sensitivity;
+ //
+ // if (lookInput.x != 0.0f)
+ // {
+ // _rotationInput.y += lookInput.x;
+ // }
+ //
+ // // Player.CameraRoot.transform.localRotation = Quaternion.Euler(_cameraPitch, 0.0f, 0.0f);
+ // if (_rotationInput != Vector3.zero)
+ // {
+ // characterController.transform.rotation *= Quaternion.Euler(_rotationInput);
+ // _rotationInput = Vector3.zero;
+ // }
}
// 检查朝向同步
diff --git a/Fishing2.sln.DotSettings.user b/Fishing2.sln.DotSettings.user
index 2da2ef4ad..adde88aab 100644
--- a/Fishing2.sln.DotSettings.user
+++ b/Fishing2.sln.DotSettings.user
@@ -4,6 +4,7 @@
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded