0 votes

I'm trying to make a drag&drop game like: http://www.abcya.com/make_a_face.htm

I made drag&drop part but when two node move same pos, i can't drag one of them. Both are moving. How can i do a game like this: http://www.abcya.com/make_a_face.htm

BTW: I'M using area2d->input_event node for drag&drop

(Sorry about my English. Google Translate :))

in Engine by (36 points)

1 Answer

+1 vote
Best answer

You can attempt to make "Layers", aka when you attempt to pick up a node(which is area2d) you can check for all the overlapping area2d using the get_overlapping_areas method and give each of them a number, and only the highest/lowest number will be picked...

but you will need to make sure the mouse is above both of them and ignore the ones he is not above...

by (1,190 points)
selected by

Thank you for your answer. It worked.

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.
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 webmaster@godotengine.org with your username.