4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.

Home Page:https://gdevelop.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change Draggable behavior to pick up the instance with the highest layer and Z order

tristanbob opened this issue · comments

Description

If a player tries to drag overlapping objects, it drags the first created object.
This doesn't make sense to the players, they expect the dragging to work like the real world, where the top-most object gets dragged first.

In this example, I created 52 objects with events and changed their animations.

GDevelop_tFyjyt2571.mp4

Solution suggested

Change the "Draggable" behavior to first pick the object with the highest z order and layer.

I wonder if these objects created by events all have the same z order (I will debug tomorrow)