Closed sominator closed 1 year ago
@sominator I've added a dropzone example where you sort green and blue aliens into two same colored dropzones. It should hopefully help you get going with your own similar solution.
@britzl this is so excellent and exactly what I was looking for. Thank you so much for taking the time to create it!
Hi there,
I'd like to request an example of a dropzone that would detect whether a game object (e.g. playing card) is over a particular area while being dragged with the cursor.
Presumably, the dropzone and game object(s) would use colliders to determine when the game object is over the dropzone. Ideally, there would be a simple API that could return info about the state of the drag event, like isOverDropZone = true, wasDropped = false, etc. This would allow for things like returning the game object to its starting coordinates if it wasn't placed over a dropzone, or disabling its draggable functionality if it was placed correctly.
Thank you!