This commit is contained in:
Scove
2026-03-27 20:20:06 +07:00
parent df1377206a
commit ed67b8258d
4 changed files with 82 additions and 30 deletions

View File

@@ -36,6 +36,11 @@ namespace OnlyScove.Scripts
Vector3 inputDir = new Vector3(input.x, 0, input.y).normalized;
Vector3 moveDirection = stateMachine.Cam != null ? stateMachine.Cam.PlanarRotation * inputDir : inputDir;
if (stateMachine.Cam != null)
{
Debug.Log($"[PlayerMoveState] View: {(stateMachine.Cam.PlanarRotation.eulerAngles.y)}, InputDir: {inputDir}, MoveDir: {moveDirection}, PlayerRot: {stateMachine.transform.rotation.eulerAngles.y}");
}
Vector3 velocity = moveDirection * stateMachine.RunSpeed;
if (stateMachine.IsGrounded && stateMachine.VelocityY < 0)