0 votes

signal swipe
var swipestart = null
var minimum
drag = 100

func unhandledinput(event):
if event.isactionpressed("click"):
swipestart = getglobalmouseposition()
if event.isactionreleased("click"):
calculateswipe(getglobalmouseposition())
func _calculate
swipe(swipeend):
if swipe
start == null:
return
var swipe = swipeend - swipestart
emit_signal("swipe", swipe)

asked Dec 2, 2019 in Projects by agung (12 points)

You asked what you want in the question title, but an image or animation of the desired effect maybe more helpful.

And tell everyone what is happening as a result of your code and why you think it is not working.

Also, tags are lie keywords or subject. Something like "mouse-position" or "draw-on-screen".

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.