Here with another question! So, how can I sort an array by two values, priorizing one of them?
I’m doing some draw functions in a tilemap, but the placed tiles list doesn’t come ordered by their position. So I’m trying to do that, but I’m having trouble adapting solutions to this problem to Godot’s sort_custom, since it’s a Vector2.
So for example, an array that looks like this:
[(1,1), (1,0), (0,1), (0,0)]
Should look like this:
[(0,0), (1,0), (0,1), (1,1)]
AKA, from top to bottom, left to right