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.
Develop games in your browser. Powerful, performant & highly capable.
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.