Carousel control

Hi, I’m new to Unity and I’m using 2dToolkit to simulate a carousel control in 2d. I basically lay out sprites in a circular pattern using sin/cos to manipulate the z depth and scaling and x,y positioning. My question is, how do I get input to control it? I want to be able to swipe left or right to get it to spin but I am unsure how to get x deltas when the finger or mouse is depressed in the area of the control.

Can someone give me a pointer on what I might use to set that up?

Thanks,
-E

There are frameworks in the Asset Store handling the gesture recognition.

Thanks dkozar, yeah I looked up there and I saw a few. But I want to implement it myself at least on a small scale before I pay for it. Otherwise, I won’t appreciate what I am buying.

It looks like what I want to use is Input.GetAxis in conjunction with an invisible button that covers the areal of my control. At least that is what I have been able to piece together so far. If someone out there thinks this is a really bad way or knows of a better way please let me know.

If you think I’m heading down the right track let me know too!! It’s good to know that bumps and bruises will pay off in the end. :slight_smile:

-E

In fact, Input.touches is what you need.

Additionally, check out the eDriven framework… it has a class wrapping Input.touches asynchronously.

Thanks again, I’ll check it out tonight.

-E