réparation d'une petite erreur dans try_interact de player.gd

This commit is contained in:
Zacharie Guet 2025-08-01 16:04:44 +02:00
parent 18ed66e795
commit d4dba21eda

View File

@ -26,7 +26,8 @@ func try_interact():
if len(interactables) > 1: if len(interactables) > 1:
# Sort them to the closer # Sort them to the closer
interactables.sort_custom( interactables.sort_custom(
func (el : Interactable): return el.global_position.distance_to(global_position) func (el1 : Interactable, el2 : Interactable):
return el1.global_position.distance_to(global_position) > el2.global_position.distance_to(global_position)
) )
interactables[0].interact(self) interactables[0].interact(self)