This commit is contained in:
2024-04-26 09:20:13 +02:00
parent 6dd5933873
commit 1218b7870f
5 changed files with 49 additions and 9 deletions

View File

@@ -122,13 +122,13 @@ public class PlayerController : MonoBehaviour
}
private void Update() {
// Transform currentCheckpoint = checkpoints[checkpointsCollected].transform;
// float checkpintDistance = distanceToCheckpoint(currentCheckpoint);
Transform currentCheckpoint = checkpoints[checkpointsCollected].transform;
float checkpintDistance = distanceToCheckpoint(currentCheckpoint);
// if (checkpintDistance < 0.1f)
// {
// checkpointsCollected += 1;
// }
if (checkpintDistance < 0.1f)
{
checkpointsCollected += 1;
}
}
private void OnCollisionEnter(Collision other) {