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

0 favourites
  • 3 posts
From the Asset Store
320 high-quality cinematic sound effects for trailers and game scenes.
  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)