Making one object pass through another - ball through pipe

Hi there,

I’m wondering what the best way to go around this is? I will have some bits of pipe with one piece missing which the player will drag and drop in place where the missing piece is. I need a ball to then be able to roll through the pipe going in one end and coming out the other.

Open to suggestions on the best way to implement it.

Thanks [import]uid: 44553 topic_id: 16914 reply_id: 316914[/import]

I think the easiest way to do this should be to add physicsbodies to the edges of the pipes. [import]uid: 24111 topic_id: 16914 reply_id: 63428[/import]

So I can add make the outer edges alone be physics bodies and not have it closed at either end? I assume if I used Physics Editor I could plot points for the edges on curved bits of pipe?

Also how can I go about making the draggable piece snap/click into place in between two bits of pipe? Im guessing I can use joints and those should let me join them?

Cheers for the reply [import]uid: 44553 topic_id: 16914 reply_id: 63431[/import]

I would attempt it as placing a physics body that is alpha 0.01 and are lines on the top of the pipe image and at the bottom, it can be at an angle if you want.

The pipe image is nothing but an image not a physics body. THe physics body are just the lines above and below the pipe to guide the ball through the pipe.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 16914 reply_id: 63484[/import]