Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: UndercoverDesigns on February 04, 2015, 10:15:00 AM

Title: How to do a Tinder-Like swipe of a UISprite
Post by: UndercoverDesigns 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
Title: Re: How to do a Tinder-Like swipe of a UISprite
Post by: ArenMook 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.