Make an object able to pass another

Hi there

I have 2 physic oblects… lets say 2 rectangles…in one state thery should be solid… in another state they should be able to pass each other…

1st state: [1] -> 2nd state: [1] ->

Any idea who to make this?
[import]uid: 44329 topic_id: 17378 reply_id: 317378[/import]

you should use collision filters [import]uid: 16142 topic_id: 17378 reply_id: 65772[/import]

Any examples? [import]uid: 44329 topic_id: 17378 reply_id: 65814[/import]

Have a look at this thread. It’s deals with letting objects pass through each other.
https://developer.anscamobile.com/forum/2011/11/02/collision-detection-not-very-good [import]uid: 70847 topic_id: 17378 reply_id: 65818[/import]

I guess you could have a function that says:

[lua] if “rectangle1” collides with “rectangle2” then
if collision.phase == “began” then
rectangle1:removePhysicsBody()
elseif collision.phase == “ended” then
rectangle2:addPhysicsBody()
end
end
[/lua]

I don’t have the wording correct, but you get the Idea.

Good luck,
J.K. [import]uid: 66117 topic_id: 17378 reply_id: 65819[/import]