How i can replace the default system that first sends you to the right or left or make it less of a priority?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Gonz4 L

Godot first check’s if the player can get out by the sides and, if not, then executes my func when what i want is, if it’s not possible to replace the default system, make it less of a priority than escape (first up or down, then right or left if there’s no space in the previous directions).

:bust_in_silhouette: Reply From: Brightlight studios

You could use raycasts to determine if you’re in a tight space or not