diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index d3d652e..ce95888 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -451,7 +451,7 @@ MonoBehaviour: turnSpeed: 2 drift: 1 brake: 2 - maxBrakeTime: 30 + maxBrakeTime: 5 accelerationTime: 2.115 decelerationTime: 1.2346 --- !u!198 &198696209911726984 diff --git a/Assets/Scenes/CodeDEV.unity b/Assets/Scenes/CodeDEV.unity index 2ba7ef2..40eedf3 100644 --- a/Assets/Scenes/CodeDEV.unity +++ b/Assets/Scenes/CodeDEV.unity @@ -1469,7 +1469,7 @@ Prefab: - target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743, type: 2} propertyPath: m_AnchoredPosition.x - value: 64.16286 + value: 0 objectReference: {fileID: 0} - target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743, type: 2} diff --git a/Assets/Scripts/PlayerMovement.cs b/Assets/Scripts/PlayerMovement.cs index 7efcabe..bb569c1 100644 --- a/Assets/Scripts/PlayerMovement.cs +++ b/Assets/Scripts/PlayerMovement.cs @@ -68,8 +68,7 @@ public class PlayerMovement : MonoBehaviour { Vector3 speedVec = new Vector3(rb.velocity.x, rb.velocity.y, 0); float speed = speedVec.magnitude; - - maxBrakeTime = 5f; + bool braking = Input.GetAxis("Vertical") < 0; if (braking && brakeTime >= maxBrakeTime) { brakeTime = maxBrakeTime;