0 votes

What control nodes can I use to replicate this programs' drag and drop feature on canvas that you can zoom in and out of

Gif - https://imgur.com/a/ZLJyK

If anyone knows any resources that might help me or some simple advice to guide me in the right direction, that would be fine.

in Engine by (23 points)

1 Answer

0 votes

Draggable.gd using TouchScreenButton here but would be very similar for other buttons

extends TouchScreenButton

func _ready():

dragging and dropping

func _input(event):
    if event is InputEventScreenDrag and is_pressed():
        position += event.realtive

For the connecting part you would have to define a bezier curve, which you tessellate everytime the points of it change. You can then manipulate the points and handles of the curve via script. You can find information about thart part by googling.

Hope it helps.

by (840 points)
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.