Hi everybody,
I’m new to Unity and I’m trying to do a newton cradle.
I’ve started with 2 basic spheres and when the first sphere touches the second one the force seems divided by 2 and the 2 spheres just swing identically. The first one does not stop.

I used basic spheres and basic cylinder for the wire with hinge and fixed joint.

Do I need to add some code or maybe I missed something?

The short answer is: You will never get a perfect Newton’s cradle since the physics system is designed for an efficient approximation of real world physics and will never by scientifically accurate. The physics system works by applying penalty forces after two objects collide with each other. So the objects actually “overlap” and based on the used physics material the physics system will “solve” that penetration by applying proper forces to the involved bodies. Though at collision only two objects are involved. The next iteration the second sphere will have the same problem as it will collide with the third one.

Such situations will never work out like in the real world. In the real world it wouldn’t matter if it’s 5 or 500 masses. In a PhysX simulation things are only “simulated” and that’s an edge case which you barely need in games / visual simulations. Again: The physics engine is not ment to be scientifically accurate.

If you want to build a Newton’s cradle as a prop for your game you might want to “fake it” by doing the calculations by hand.