Players should passthrough eachother but not walls?

Hello,

I want the players to pass-through each others but not walls?

If i try enabling isSensor for the players then they will passthough everything.

I need to detect collisions between players but walls are not importent, i only need walls to stop the players from going off the screen.

PS: i can’t use filters because i need collision between players.

Thank You!!!

Is there a problem with the solutions provided in your other post?

http://forums.coronalabs.com/topic/41650-stop-player-with-issensor-from-passing-through-walls/

The collision filter was created specifically for behavior such as you describe. Are you encountering an issue implementing it?

In other post i was trying to achieve it by using isSensor which as you mentioned was not possible, so now i am using the collision filters but the problem is that the players now push each other, they don’t just pass through each other.

I want them to passhthrough each other but still be able to get the collision events???

In the first post you state that you want players to pass through “each others” but then state “i can’t use filters because i need collision between players”. From reading your other post and your comments here, I believe you are trying to achieve the following:

Have certain groups of players interact/collide with other certain groups of players (not not stop their movement/physics inertia), and have all players/groups of players collide with walls.

If this is not accurate, please correct me. If it is accurate, then using the collision groups in combination with the non-physics collision logic would serve your purposes:

http://www.coronalabs.com/blog/2013/07/23/tutorial-non-physics-collision-detection/

This describes how you can detect when one object overlaps (or collides) with another, without actually using physics to accomplish the ad-hoc collision. 

Exactly!

The link you provided somehow describes how to check non-physics collisions but what i want is an static physics wall around my map to stop stuff from crossing it???

Hi @coolromin,

Did you experiment with the pre-collision physics “contact” as I suggested in the previous post? This can usually solve the more tricky collision scenarios…

Brent

I can’t figure out how to use “contact” so the players can passthrough each other but stop at walls? I would very apreciate if you can explain or provide a sample code.

I think what i am asking for is not possible in Corona SDK? If possible please someone help me.

Hi @coolromin,

In the tutorial (http://www.coronalabs.com/blog/2012/11/27/introducing-physics-event-contact/), you can see how to use pre-collision. Also, download the demo project mentioned in there, so you can see the actual process in action.

Brent

Is there a problem with the solutions provided in your other post?

http://forums.coronalabs.com/topic/41650-stop-player-with-issensor-from-passing-through-walls/

The collision filter was created specifically for behavior such as you describe. Are you encountering an issue implementing it?

In other post i was trying to achieve it by using isSensor which as you mentioned was not possible, so now i am using the collision filters but the problem is that the players now push each other, they don’t just pass through each other.

I want them to passhthrough each other but still be able to get the collision events???

In the first post you state that you want players to pass through “each others” but then state “i can’t use filters because i need collision between players”. From reading your other post and your comments here, I believe you are trying to achieve the following:

Have certain groups of players interact/collide with other certain groups of players (not not stop their movement/physics inertia), and have all players/groups of players collide with walls.

If this is not accurate, please correct me. If it is accurate, then using the collision groups in combination with the non-physics collision logic would serve your purposes:

http://www.coronalabs.com/blog/2013/07/23/tutorial-non-physics-collision-detection/

This describes how you can detect when one object overlaps (or collides) with another, without actually using physics to accomplish the ad-hoc collision. 

Exactly!

The link you provided somehow describes how to check non-physics collisions but what i want is an static physics wall around my map to stop stuff from crossing it???

Hi @coolromin,

Did you experiment with the pre-collision physics “contact” as I suggested in the previous post? This can usually solve the more tricky collision scenarios…

Brent

I can’t figure out how to use “contact” so the players can passthrough each other but stop at walls? I would very apreciate if you can explain or provide a sample code.

I think what i am asking for is not possible in Corona SDK? If possible please someone help me.

Hi @coolromin,

In the tutorial (http://www.coronalabs.com/blog/2012/11/27/introducing-physics-event-contact/), you can see how to use pre-collision. Also, download the demo project mentioned in there, so you can see the actual process in action.

Brent