Stacking boxes

Hi there,



I'm currently trying to stack boxes to a Jenga-like tower. (Three boxes per layer, every second layer rotated by 90

you can set the boxes to rest, then they will not generate collision event until they are influenced by a force big enough the wake them up.



PhysicsSpace.setAutoRestThreshold(x).



http://www.jmonkeyengine.com/jmeforum/index.php?topic=5293.0

And you can put them to rest manually with the rest() method.



You can increase the stack size as well (see previous posts, search for "stack size"). But ODEs performance is decreased quite a lot by a high number of contacts - so maybe increasing stack size prevents crashes but still renders  your game unresponsive (or lagging).

Core-Dump said:

you can set the boxes to rest, then they will not generate collision event until they are influenced by a force big enough the wake them up.


Do I have to apply that force manually or could it also come from a collision generated by another object hitting the rested one?

it dosen't matter where the force comes from, force is force :slight_smile:

just throw a ball at the stack of boxes and it will collapse.