object toss

I want to create a paper toss type of mini game within my game, but I am having an issue with figuring out how to release the object. I am able to drag the object around the screen but I want to remove the object “touch” listener when the object is dragged past a certain point, let’s say about halfway up the screen. In other words, I place my finger at the bottom of the screen and drag up quickly, but as soon as my finger reaches a certain point I want my object to quit following my finger and be thrown. Can somebody help me with a solution? I’m sure it’s something simple that I just can’t figure out.

Thanks! [import]uid: 71109 topic_id: 21304 reply_id: 321304[/import]

Take a look at the multipuck example.

If the only thing you’re interested in is how to “let go” at a certain point on the screen you could do;

[lua]if event.phase == “moved” and event.y < 240 then[/lua]

Then code there - that would let it go once it were half way up the screen.

Make sense?

Peach :slight_smile: [import]uid: 52491 topic_id: 21304 reply_id: 84372[/import]