Godot Version
4.4.1
Question
I’m managing touches using a custom TouchManager script so that I can support multitouch in my game. I’m using InputEventScreenTouch
and InputEventScreenDrag
to detect the player’s input.
I want to detect an interaction when the player drags their finger to the edge of the screen and leaves it there
Right now I have something like
if event is InputEventScreenDrag
if event.postion.x > hotspot_boundary
do_the_thing()
It’s doing the thing as you’d expect but only while the player’s touch is moving. I want to continue calling the function while their finger is stationary in the hotspot, until the touch is released.
What would be the best way to approach this in Godot? Am I missing a feature of InputEvents, or would I be better off setting a boolean here and calling my function on _process
until the touch is released?