Drag-info on each pixel

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

Hi everyone,

I’m looking for a way to achive the following (within a Button’s script):
After clicking and holding down the mouse (or finger), depending on where I move the mouse I would like to have a message printed “up”, “down”, “left” or “right” on each following pixel.

(The idea is to -1 or +1 the rotation of a Sprite on each passing pixel when moving the mouse left or right and change other things on up or down.)

I assume this needs to be done in a func _process(delta):, but I just can’t figure out how to achieve this. Any ideas?