Sphere inside of a Sphere but It keeps poping out?

Hello,

I have a Large Sphere with the normals flipped and inside of that sphere are a bunch of smaller ones that are bouncing around. I cant seem to figure out how to keep the smaller ones inside of the Large Sphere. There is always one or 2 of them that pop out?

I’ve attached 2 images so you can see the colliders I have attached and the rigidbody in the hopes of getting some help.

Also I have a script attached to the smaller balls:

var gravity = 1;

function FixedUpdate ()
{
    rigidbody.AddForce(-Vector3.up * rigidbody.mass * gravity);
}

and a Force script attached to an empty game object under the Large Sphere:

var radius = 1;
var power = 20.0;

function FixedUpdate () 
{
    // Applies an explosion force to all nearby rigidbodies
    var explosionPos : Vector3 = transform.position;
    var colliders : Collider[] = Physics.OverlapSphere (explosionPos, radius);
    
    for (var hit : Collider in colliders) 
    {
        if (!hit)
            continue;
        
        if (hit.rigidbody)
            hit.rigidbody.AddExplosionForce(power, explosionPos, radius, 3.0);
    }
}

As you can see there is not a lot of force or anything going on but I still cant figure out the right combination to keep the smaller balls inside of the larger sphere without one or two popping out?

Anyone have any ideas? or suggestions on how I might change the Large Sphere or Smaller ones so that none of them pop out?

510615--18143--$Picture 15.png

If you model your large sphere so that it has a thicker shell it might help.

How would I create a thicker shell? I did try and do a extrude while modeling the shell so that it would be thicker but then noticed the smaller sphere’s would get stuck in between. I also tried increasing the faces and tris of the mesh. But I’ll give it another go :slight_smile:

Thanks for the reply.

Ok I got it now 4 extrudes later now it works :slight_smile: