I just switched from using jmephysics to jbullet-jme in stardust.
Mostly the switch was very smooth, a big thanks to the jme-jbullet developers.
2 Problems i encountered:
- calling PhysicsNode.setLocalTranslation() inside a Controller causes an endless loop. (StackOverflow)
PhysicsNode.applyTranslation() calls updateGeometricState() again which in turn executes the Controllers again.
The workaround i used is to deactivate the controller inside the Controller.update() method.
[java]
public void update(float time) {
this.setActive(false);
// do all the work
this.setActive(true);
[/java]
I’m not sure how to solve this better or different.
- like mentioned on the jme-jbullet wiki: here
“getLocalTranslation().set() does not set the physics object location, use setLocalTranslation(), same applies for getLocalRotation()”
Its quite hard to find all the places where someone calls getLocalTranslation().set() / getLocalRotation().set() .
It would be great if this restriction could be resolved somehow.
I think it would be best if getLocalTranslation() would return a unmodifiable Vector if using jme-jbullet, but i guess thats not an option.