Collision in pipe system

Hi there,

I’m building a little game where you have to move a ball in a pipe system. You can rotate the pipe system to move the ball. You can also click a pipe to rotate it 90 degrees.
I use a mesh collider on the pipes because no other collider is open on two sides like it should for a pipe. The problem is: to see the ball in the pipes I had to make the pipe a bit transparent with the alpha colour setting. But now the mesh collider also doesn’t see the transparent bit of the pipe. So now when I rotate the pipes a bit too fast the ball falls through the pipe it is in. This also happens when you click the pipe.
So my questing is: is there another collider which is open on two sides and lays on the inside of a pipe or is there any way to work around it?

thanks for your time.

I’m pretty sure the problem you are seeing is related to the way physics is split up into discrete steps. In most physics engines, if you throw a ball fast enough at a wall (plane), it will go through it, because it will only bounce off the wall if it is found to be intersecting with it, after updating it’s position. Now I think, from your description, that this is what you are seeing when you rotate ‘a bit too fast’. An elegant solution to this might be to make the ball rotate with the pipe when it’s rotating, such that it is fixed to a point on the pipe whilst the rotation occurs. If you are manually setting the position whilst it rotates be sure to set the rigid body to kinematic for the duration of the rotation.