# Ball physics help

Hello everyone.

I’m trying to make a simulation of an object but I’m having a lot of trouble getting it working.

Let me explain:

Think of the black as a transparent plastic ball.

In the center of the ball, there is a cylinder which is connected to the ball on both sides (blue).

On the center of the cylinder, there is a box (green) with a hole for the cylinder to go trough.

Most of the box’s weight is at it’s buttom (red).

Here is how the ball needs to behave:

When going forward, the ball needs to rotate forward while the box needs to stay the same (because the weight keeps it down).

Same thing for going back (ball rotates back and box stays).

Conclusion:

Because I’m trying to simulate it, it needs to be done with physics and not animation or anything like that.

I tried playing around with rigidbodys and joints but without getting the desired results.

Any help on how to build this object and how to move it around will be really appreciated.

Thanks!

Make the square kinematic. If that doesnt work, then use a Physic Material. Add the physic material to your ball and square. Maybe increase the mass of the square. If you need help with physic materials, check this out:
http://unity3d.com/learn/tutorials/modules/beginner/physics/assignments/bouncing-ball

To put a “weight” on the bottom of the interior cube without a new object, can use `rigidbody.centerOfMass = new Vector3(0,-3,0);` The center of mass doesn’t even have to be inside the object. The lower it is, the more the square will stay up like a punching bag clown.