If i place 30 rigidbody cubes on each other, they start shivering, bouncing off each other and finaly fall on the floor.
You can see this effect using this Unity script:
function Start () {
for (var y = 0; y < 5; y++) {
for (var x = 0; x < 5; x++) {
var cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
cube.AddComponent(Rigidbody);
cube.transform.position = Vector3 (x, y, 0);
}
}
}
- Create floor
- Create an empty object
- Attach the script to the empty object
- Change “y < 5” to “y < 30”
The question is: how to make it behave like in real world?