about physics

Hi everyone,

I have a swamp that has physics features and also I have 3 more
objects that is the same. 

1 - I want the first object slammed into the swamp and stop it.

2 - I want to get the second object passes slowly out of the swamp.

3 - I want the third object to get quickly out of the swamp.

There is a chance of doing it only using physics property?

Thank you

Yes, entirely possible.

Thanks hocacebury. but how can i?

I mean, a physic body can not pass from the other. they become stacked. How can i do it?

Hi @gurcanhamali,

Do you mean that you only want certain objects to interact with specific other objects, but not all objects to interact with each other? If so, you should use collision filters to set this up. Here is a tutorial/worksheet I created quite some time ago which can assist you (the post is old but the method still works fine):

http://forums.coronalabs.com/topic/2128-collision-filters-helper-chart/

Hope this helps,

Brent

Hi Brent,

First of all thank you so much for your answer. 

Secondly, the links are not working in your post. Can you please post it one more time?

Thanks,

Gurcan 

Hi Gurcan,

Which links are not working? The “charts” in the post? I just tested and it seems functional to me.

Brent

Hi everyone,

I have a swamp that has physics features and also I have 3 more
objects that is the same. 

1 - I want the first object slammed into the swamp and stop it.

2 - I want to get the second object passes slowly out of the swamp.

3 - I want the third object to get quickly out of the swamp.

There is a chance of doing it only using physics property?

Thank you

You can have the swamp object as a sensor (if it’s kind of a pool, if it’s just a floor then even not sensor is good).
When the objects get in a collision with the swamp, you can change their linearDamping parameter depending on the object. So the very slow object would get a very high linearDamping, making it impossible to move properly after getting in contact with the swamp.
The second one will get a lower linearDamping, making it possible but hard to get out, while the third one will have a very low linearDamping.
When they get out and the collision ends, you can put the linearDamping back to 0.

Yes, entirely possible.

Thanks hocacebury. but how can i?

I mean, a physic body can not pass from the other. they become stacked. How can i do it?

Hi @gurcanhamali,

Do you mean that you only want certain objects to interact with specific other objects, but not all objects to interact with each other? If so, you should use collision filters to set this up. Here is a tutorial/worksheet I created quite some time ago which can assist you (the post is old but the method still works fine):

http://forums.coronalabs.com/topic/2128-collision-filters-helper-chart/

Hope this helps,

Brent

Hi Brent,

First of all thank you so much for your answer. 

Secondly, the links are not working in your post. Can you please post it one more time?

Thanks,

Gurcan 

Hi Gurcan,

Which links are not working? The “charts” in the post? I just tested and it seems functional to me.

Brent

Hi everyone,

I have a swamp that has physics features and also I have 3 more
objects that is the same. 

1 - I want the first object slammed into the swamp and stop it.

2 - I want to get the second object passes slowly out of the swamp.

3 - I want the third object to get quickly out of the swamp.

There is a chance of doing it only using physics property?

Thank you

You can have the swamp object as a sensor (if it’s kind of a pool, if it’s just a floor then even not sensor is good).
When the objects get in a collision with the swamp, you can change their linearDamping parameter depending on the object. So the very slow object would get a very high linearDamping, making it impossible to move properly after getting in contact with the swamp.
The second one will get a lower linearDamping, making it possible but hard to get out, while the third one will have a very low linearDamping.
When they get out and the collision ends, you can put the linearDamping back to 0.