- Edited
Hello! I understand that if I don't want my functions triggered when I click on a GUI element and not the game world, I should use _UnhandledInput instead of _Input. I also understand that if I want my function to be triggered repeatedly, I should put it in _Process which runs every frame instead of _UnhandledInput which only runs once per input. So... how can I achieve both?
In _Process my character moves towards the mouse when I hold the mouse button down, but it also moves when I click on a button.
In _UnhandledInput my character will only move if I'm smashing the mouse button.
I'm guessing I could add some global variable that I'd set in _Input and then check it in _PhysicsProcess, but is there a better way to do this?