Author Topic: Tween in response to a drag proximity?  (Read 4318 times)

Chris_E

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 37
    • View Profile
Tween in response to a drag proximity?
« 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tween in response to a drag proximity?
« Reply #1 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.