This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

signal swipe
var swipestart = null
var minimum
drag = 100

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

in Engine by (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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.