Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Moradom on January 22, 2014, 08:28:25 PM
-
Hello all,
I am looking for a way to detect when when a touch drags off a collider. For example a touch is detected on a collider with OnPress() then I would like to know when that touch drags off that collider.
After reviewing the UICamera's notification events I didn't see a specific notification for that.
Thanks
-
Wanted to share a quick update
I am sure there might be a better way, but I was able to get this behavior by checking the tag in the UICamera.hoveredObject in the OnDrag event handler. Once I detected the tag changed from the touched gameObject I knew the touch was dragged off the collider.
-
OnDragOut tells you when you've left a collider. OnDragOver tells you when you've moved over a collider.