diff --git a/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs index bcb506f..fbf2a84 100644 --- a/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs +++ b/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs @@ -209,7 +209,7 @@ public class FirstPersonController : MonoBehaviour private void Update() { - float scrollValue=Input.GetAxis("Mouse ScrollWheel"); + float scrollValue = Input.GetAxis("Mouse ScrollWheel"); playerCamera.fieldOfView = Mathf.Clamp(playerCamera.fieldOfView - scrollValue * 20, 10, 60); #region Camera @@ -389,12 +389,8 @@ public class FirstPersonController : MonoBehaviour if (playerCanMove) { // Calculate how fast we should be moving - //if (stopForce) - //{ - // if (Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0) - // stopForce = false; - // return; - //} + if (Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0) return; + Vector3 targetVelocity = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")); // Checks if player is walking and isGrounded diff --git a/Assets/Scenes/05_LiveScene.unity b/Assets/Scenes/05_LiveScene.unity index 21a461a..ebb824a 100644 --- a/Assets/Scenes/05_LiveScene.unity +++ b/Assets/Scenes/05_LiveScene.unity @@ -1480,6 +1480,42 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} +--- !u!1 &159466234 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2588606950836171102, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + m_PrefabInstance: {fileID: 159466233} + m_PrefabAsset: {fileID: 0} +--- !u!1 &159466235 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: -7138000903914520420, guid: 92b1a298e95fb664cb2aa2aff35920e0, type: 3} + m_PrefabInstance: {fileID: 159466233} + m_PrefabAsset: {fileID: 0} +--- !u!65 &159466236 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 159466234} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 500, y: 761.86084, z: 0} + m_Center: {x: 0, y: 119.0697, z: 0} +--- !u!65 &159466237 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 159466235} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 500.00397, y: 519.947, z: 0.00008470567} + m_Center: {x: -0.0019607544, y: 240.02661, z: 0.08268043} --- !u!1 &192342789 GameObject: m_ObjectHideFlags: 0