Touch and collision event question

Lets say you have a water balloon falling down the screen and when it hits the ground, it splatters. You want to tap the balloon to “grab” it before it hits the ground.

Is there any way to make the radius larger for the touch event to make it easier to tap without making the balloon hit the ground while it is still in the air? I almost need two shapes for the body. One for touch and one for collision.

I was going to try and calculate the distance between the objects when the collision event fired and not do anything until it was actually close enough but it looks like the collision event is only firing once.

Any ideas on this?

Thanks,
Mark [import]uid: 117098 topic_id: 22564 reply_id: 322564[/import]

Yes.

Use a larger canvas for the balloon (ie more transparency/blank space) and use a either a custom shape (by hand or you can easily get the data from physics editor for instance) or use a radius for the balloon’s physics body. [import]uid: 84637 topic_id: 22564 reply_id: 90014[/import]

This is brilliant!!! Resizing my avatars now!
[import]uid: 19626 topic_id: 22564 reply_id: 90042[/import]

Ok so if I made the image canvas twice as big and still kept the shape the same size, will the touch events use the entire size of the image (including the transparent border) and the collision only use what I define in my shape?

That would be nice. I will give that a shot tomorrow.

Thanks,
Mark [import]uid: 117098 topic_id: 22564 reply_id: 90062[/import]

@mnewnam exactly yeah :slight_smile: [import]uid: 84637 topic_id: 22564 reply_id: 90182[/import]

Yep, that did the trick. Thanks!

Mark [import]uid: 117098 topic_id: 22564 reply_id: 90184[/import]