Update
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using static OnlyScove.Scripts.CameraController;
|
||||
|
||||
namespace OnlyScove.Scripts
|
||||
{
|
||||
@@ -32,9 +33,9 @@ namespace OnlyScove.Scripts
|
||||
CurrentRotation = cameraTransform.rotation;
|
||||
}
|
||||
|
||||
public void HandleRotation(InputReader inputReader, Transform followTarget, float rotationSmoothTime)
|
||||
public void HandleRotation(InputReader inputReader, Transform followTarget, float rotationSmoothTime, CameraViewMode viewMode)
|
||||
{
|
||||
if (inputReader == null) return;
|
||||
if (inputReader == null || viewMode == CameraViewMode.FirstPerson) return; // Only process input in TPV
|
||||
|
||||
if (inputReader.LookInput.magnitude > 0.01f)
|
||||
{
|
||||
@@ -58,7 +59,6 @@ namespace OnlyScove.Scripts
|
||||
_rotationY = Mathf.LerpAngle(_rotationY, targetYaw, autoRotateSpeed * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
Quaternion targetRotation = Quaternion.Euler(_rotationX, _rotationY, 0f);
|
||||
CurrentRotation = Quaternion.Slerp(CurrentRotation, targetRotation, rotationSmoothTime * Time.deltaTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user