I added a print in Player.gd to investigate:
States.WALK:
print("WALK")
print_debug(position - click_position) # debug
if position.is_equal_approx(click_position): # doesn't work
change_state(States.IDLE)
else:
speed = walk_speed
The output shows that position gets close to click_position, but not close enough for position.is_equal_approx(click_position) to be true.
It works better if I replace:
if position.is_equal_approx(click_position):
with:
if (position - click_position).length_squared() < 10.0:
But that's probably not the correct solution. You need to figure out why position doesn't get closer to click_position.
Also, when posting a project, you can omit the .godot folder, which is usually very big.