This commit is contained in:
magn9775
2024-04-26 18:32:28 +02:00
parent 61d1958308
commit 61b61632ff

View File

@@ -99,7 +99,7 @@ public class GameManager : MonoBehaviour
{
int checkpointsCollected = player.GetComponent<PlayerController>().checkpointsCollected;
carRB = player.GetComponent<Rigidbody>();
var carVel = (Mathf.Abs(carRB.velocity.x) + Mathf.Abs(carRB.velocity.y) + Mathf.Abs(carRB.velocity.z))*5;
var carVel = Mathf.Round((Mathf.Abs(carRB.velocity.x) + Mathf.Abs(carRB.velocity.y) + Mathf.Abs(carRB.velocity.z))*6);
speedometer.SetText(carVel.ToString());
if (checkpointsCollected == checkpoints.Count())