Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JTJonny | |
Old Version | Published before Godot 3 was released. |
I don’t really need it, but is there a way to replace a large test number with a built-in GDscript infinite value
var lowestGoalDistance = 10000000000000
var closestGoal
for fG in foundGoals:
if fG.distance_to(start) < lowestGoalDistance:
lowestGoalDistance = fG.distance_to(start)
closestGoal = fG
goal = closestGoal