Drag and Drop game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By alpasp
:warning: Old Version Published before Godot 3 was released.

Hi.
I’m trying to make a drag&drop game like: ABCya! • Educational Computer Games and Apps for Kids

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: ABCya! • Educational Computer Games and Apps for Kids

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

(Sorry about my English. Google Translate :))

:bust_in_silhouette: Reply From: rustyStriker

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…

Thank you for your answer. It worked.

alpasp | 2017-12-17 15:24