How do I Check for overlapping objects on drag drop event?

0 favourites
  • 3 posts
From the Asset Store
Physics Drag & Drop
$0.50 USD
95% off
Use inertion of your movements to throw, rotate your objects and etc. Objects can interact with others while dragging.g
  • I'm trying to check for an overlap event when the object has been dropped after dragging, but it seems that these 2 events together don't trigger anything.

    Is there anything I'm doing wrong?

    I have tried touch end instead but it produces a jitter and overall chaos.

    The objective is that the sprite should go back to its initial position if the user tries to overlap it with another spirit below. Both the sprites are in the same family and so we need to pick it by UID.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That won't work because the on drop event already narrows it to one instance of family, you have to find some other way. Using the specific object type on drop to check if it is overlapping family would work, pick by UID condition also wouldn't be necessary.

    So you would split out events into object A on drop, is overlapping family. Object B on drop, is overlapping family etc. Could be a few events with many draggable objects but it seems like the only way.

  • Thanks for your reply.

    So I used the end touch condition, at last, the source of the jitter was some other code that I discovered and added additional conditions to counter.

    Sharing the code here so that someone else who might need it can see it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)