aboutsummaryrefslogtreecommitdiff
path: root/JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts')
-rw-r--r--JamHelper/Assets/JamTools/FPSControllerVelocity/Scripts/FPSCharacterController.cs12
1 files changed, 4 insertions, 8 deletions
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()
- {
-
- }
-
}
-
}