From e5d082b220eaa4351086b27607231f5df01a0903 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 17 Feb 2022 19:42:30 +0800 Subject: *misc --- .../FPSControllerVelocity/Scripts/FPSCharacterController.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/FPSCharacterController.cs') diff --git a/JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/FPSCharacterController.cs b/JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/FPSCharacterController.cs index c51fffc..cbb3bf0 100644 --- a/JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/FPSCharacterController.cs +++ b/JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/FPSCharacterController.cs @@ -128,6 +128,8 @@ namespace JamTools float mouseX = Input.GetAxis("Mouse X"); float mouseY = Input.GetAxis("Mouse Y"); + //mouseX = -0.1f; // test jittery + m_CameraRotation -= mouseY * Time.deltaTime * m_LookSensitive; m_CameraRotation = Mathf.Clamp(m_CameraRotation, -90, 90); Quaternion rot = Quaternion.Euler(m_CameraRotation, 0, 0); @@ -186,7 +188,7 @@ namespace JamTools float vy = m_Rigidbody.velocity.y; Vector3 velocity = new Vector3(m_MoveDirection.x * Time.deltaTime * m_MoveSpeed, vy, m_MoveDirection.z * Time.deltaTime * m_MoveSpeed); - m_Rigidbody.velocity = Vector3.Lerp(m_Rigidbody.velocity, velocity, m_MoveSmooth); + m_Rigidbody.velocity = Vector3.Slerp(m_Rigidbody.velocity, velocity, m_MoveSmooth); } void MoveInAirUpdate() @@ -367,7 +369,6 @@ namespace JamTools private void Update() { - LookAround(); MoveAroundUpdate(); MoveInAirUpdate(); Jump(); @@ -381,6 +382,7 @@ namespace JamTools private void FixedUpdate() { + LookAround(); MoveAroundFixedUpdate(); MoveInAirFixedUpdate(); DodgeFixed(); @@ -389,11 +391,5 @@ namespace JamTools WallJumpFixedUpdate(); } - private void OnDrawGizmos() - { - - } - } - } -- cgit v1.1-26-g67d0