Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Chris_E on January 12, 2014, 04:23:43 AM

Title: Tween in response to a drag proximity?
Post by: Chris_E on January 12, 2014, 04:23:43 AM
I have a panel at the bottom of my screen that tweens up when you click a tab.  Once the panel is open you can drag and drop items into it.  That works perfectly.

What I'd like to do is allow users to skip the clicking step if they want to, and have the opening tween play when an item is dragged near the tab.  Is that possible?
Title: Re: Tween in response to a drag proximity?
Post by: ArenMook on January 12, 2014, 05:48:17 PM
Sure, if you add your own logic that detects the proximity. I would suggest placing a script on your draggable objects that listens to OnDrag (Vector2) notifications, and checks the distance inside.