Games [XUI2D] Newton's Cradle Example

Erel

Administrator
Staff member
Licensed User
A simple example:


1. It loads the objects.
2. Creates the rope joints.
3. That's it. Everything just happens.

A bit of code is required to draw the ropes.

Note that the restitution is set to 1.02 which is larger than the maximum value. This helps with preserving the motion energy.

It is included in the examples pack.

https://www.b4x.com/android/forum/threads/xui2d-example-pack.96454/
 
Top