3
votes

I am trying to implement a bar that rebounds the object falling on it. however I just want the object to rebound when it falls on it from above the top edge. if the object is comming from bellow the object should pass as if the bar doesnot exsits. This is similar to what the bird does in tweetjump or doodle does in doodle jump. Any hints on how I can do this in corona ?

1

1 Answers

4
votes

When the object collides with the bar from below, Try giving

bar.isSensor = true

Have a read here: http://developer.anscamobile.com/reference/index/bodyissensor

One use case for setting this property is overriding a collision that is about to happen, such as the "one-sided platform" case, where a character should pass through a platform only in one direction.