Author Topic: How to do a Tinder-Like swipe of a UISprite  (Read 2134 times)

UndercoverDesigns

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 7
    • View Profile
How to do a Tinder-Like swipe of a UISprite
« on: February 04, 2015, 10:15:00 AM »
I have a project where I am displaying images via a UISprite, with the user swiping them either right or left as input.

I have put a UIDragDropItem component on my UISprite, but I cannot click and drag the sprite.

What is the proper way to obtain this effect?

Gabe

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to do a Tinder-Like swipe of a UISprite
« Reply #1 on: February 05, 2015, 10:19:15 AM »
Click and drag? The UIDragDropItem has several options on how to start the drag operation. Press and hold is one of them, but there is no "click". If you want it to react to click, I would say set it to Press And Hold, then write a new script that will react to OnClick(), get the UIDragDropItem component and call its StartDragging() function.