Collision Not Working Well

Please download attached file and correct.

 

I’m developing runner game; 

as the player run on the way, he will be meeting a lot of challenges(hinderance ). 

If he hit any of the hindrance game will be over. 

 

My challenge is this:

It only working on the rock(hinderance) AND not working on fire(hinderance2) and well(hinderancex).

 

Please what is the cause and solution?

You’ll have to post your code so we can see exactly where you’re going wrong.

First thing to check though is that the player, rock, fire and well have all been added to same display group.

Dear nick_sherman

please, follow this link to download the source file. 

http://surfneticon.com/RunnerGame.zip

As the player run on the way, he will be meeting a lot of challenges(hinderance ). 

If he hit any of the hindrance game will be over. 

 

My challenge is this:

It only working on the rock(hinderance) AND not working on fire(hinderance2) and well(hinderancex).

 

Please what is the cause and solution?

Thank you

A little confusion seems to remain on this point, so I’d like to clarify again: physics objects do not need to reside in the same display group to collide with each other. You can put them in any group(s) you want. However, if you move/rotate/scale display groups independently of each other, then the physics objects residing in different groups will not collide in the per-body shape bounds you may expect.

@nobleogyify,

It sounds like you are making a “Flappy Bird” type of game, or similar? Perhaps you should view one of the several Corona-built templates for this style of game, and see how they handled the physics. A quick search in the forums should bring up a few results for this.

Take care,

Brent

You’ll have to post your code so we can see exactly where you’re going wrong.

First thing to check though is that the player, rock, fire and well have all been added to same display group.

Dear nick_sherman

please, follow this link to download the source file. 

http://surfneticon.com/RunnerGame.zip

As the player run on the way, he will be meeting a lot of challenges(hinderance ). 

If he hit any of the hindrance game will be over. 

 

My challenge is this:

It only working on the rock(hinderance) AND not working on fire(hinderance2) and well(hinderancex).

 

Please what is the cause and solution?

Thank you

A little confusion seems to remain on this point, so I’d like to clarify again: physics objects do not need to reside in the same display group to collide with each other. You can put them in any group(s) you want. However, if you move/rotate/scale display groups independently of each other, then the physics objects residing in different groups will not collide in the per-body shape bounds you may expect.

@nobleogyify,

It sounds like you are making a “Flappy Bird” type of game, or similar? Perhaps you should view one of the several Corona-built templates for this style of game, and see how they handled the physics. A quick search in the forums should bring up a few results for this.

Take care,

Brent