Hey Monkeys,
I have made some big changes to the jME3 physics.
Physics objects are no longer Nodes but exist in three different forms:
- Bullet Controls -
This is the new recommended way to do physics, these Controls can be applied to a Spatial to make it move according to the physics. These control classes directly extend the new Bullet Objects. Controls should be a way more flexible way to use physics, also dynamically.
- Bullet Nodes -
These Nodes have Bullet Controllers attached and wrap their methods to “simulate” the old physics nodes. The setLocalTranslation() info is transferred to the Bullet Objects (although not in a continuous manner anymore).
- Bullet Objects -
These are mostly wrapped bullet classes like RigidBody, GhostObject etc. and can be used to create new physics functions. Users will mostly use the former two types which internally use these objects.
Don’t be afraid, you can continue like you are used to and have only minimal changes to your code by using the supplied new PhysicsNode / PhysicsCharacterNode etc.
I will commit the changes shortly, any input is very welcome.
Other changes include a better debug display and the new HullCollisionShape for wrapping complex meshes (also used as “dynamic mesh shape” now instead of GImpactCollisionShape).
Cheers,
Normen