I have a scene where I drop about 30 balls into a cylinder (like a bucket) , They are rigidbodies with sphere colliders. The cylinder is also a rigidbody with mesh collider.
My problem is some of the balls pass through the bucket. Is there a simple way to solve this problem? I don't want to slow the balls down too much.
If your balls are going to fast to collide with the bucket, you should change the collision detection on the bucket's rigidbody to "Continuous" and the collision detection on the balls' rigidbodies to "Continuous Dynamic." That will make the physX engine use more advanced math to determine collisions than just checking whether the ball is inside the mesh at that particular moment.
Your other option would be to edit the project's physics properties to change the fixedUpdate time to be a smaller amount of time (though this will cause fixedUpdate to get called on each of your gameObjects more often, which may slown down the game as a whole, but could be less costly than having lots of "Continuous Dynamic" objects in your scene.
-Edit —> Project Settings —> Time … decrease “Fixed Timestep” value … This will solve the problem but it can affect performance negatively.
-Another solution is could be calculating the coordinates instead of using collider. For example, you have a ball and wall and ball will hit to wall. So calculate coordinates of wall and set hitting process according these cordinates).