Hi everyone, as promised I posted the source code on github.
- Use the mouse to move around the scene with the flyCam.
- Press the zero key ‘0’ to enables / disables BulletAppState debugging.
- Press and hold the ‘Enter’ key to rewind the time (Note: remember that the controller remembers the position and rotation of the fragments of the last 5 seconds but you can change it as you like).
jme-capdevon-examples/TimekeeperControl.java at c0634cd965d87f2936e28ca1f00747d707b22bb2 · capdevon/jme-capdevon-examples · GitHub - Release the ‘Enter’ key to allow physics to act on the cube fragments.
You can change the physical attributes of the fragments by following the official engine documentation.
The controller to rewind time is really simple and easy to understand, you can find it here:
The Main to run the app is here:
To model the cube I used Blender’s “Cell-fracture” free addon. Here you can find a short tutorial on how to use it.
Brackeys’ video explains all the steps in a clear and fun way.
Let me know if you will use this demo or if you add some interesting ideas of yours with some examples and images.