Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Chris_E on July 05, 2012, 02:04:15 PM

Title: OnMouseOver on mobile?
Post by: Chris_E on July 05, 2012, 02:04:15 PM
Hi,

I'm looking for something like an OnMouseEnter event for mobile.  I have a pickup, and when it's touched or when the finger slides through the object I want it to be picked up.  Is there any way to do that?  Also, along the same lines, I have something else that I want to have react in script to the same type of events; As long as the touch is inside, either by touching down or sliding inside (or, I guess, if the object moves inside of the touch area!) it has to respond.

Thanks,

Chris

Title: Re: OnMouseOver on mobile?
Post by: Chris_E on July 05, 2012, 02:38:59 PM
I am trying this which I modified from the Unity Wiki's OnTouchDown script:

http://pastebin.com/3xJKuTGj
Title: Re: OnMouseOver on mobile?
Post by: ArenMook on July 05, 2012, 06:23:11 PM
Hover events are not sent on mobile devices because there is no way to detect a finger hovering over something. You can work with OnPress() events instead.
Title: Re: OnMouseOver on mobile?
Post by: Stephan on July 16, 2012, 04:36:59 PM
I am creating left and right buttons, I need to know when they drag off the collider.  OnHover would do the trick, is there anything similar for Touch?  I need to know if the user slides there finger over a control or off the control.