small racing game im working on
Diffstat (limited to 'race.gd')
-rw-r--r--race.gd1
1 files changed, 1 insertions, 0 deletions
diff --git a/race.gd b/race.gd
index 691cf63..978e8dd 100644
--- a/race.gd
+++ b/race.gd
@@ -69,6 +69,7 @@ func _physics_process(_delta: float) -> void:
return
var shot := best_time_data.loadshot(Engine.get_physics_frames() - start_frame)
ghost.update(shot[0], shot[1], shot[2])
+ ghost.visible = (ghost.global_position.distance_squared_to(car.car_mesh.global_position) > 10)
func collect(cp: int) -> void: