Jmonkey 3.1 native bullet bug

how to reproduce :
1- set the project to use native bullet
2 - import a model and open it in the scene composer
3 - click add collision shape with the dynamic check-box checked
4 - save the scene ,run the game adding the spatial; to the root node and physics space
5- call applyforce(), applyImpulse(), applyTorque(), or applyTorqueImpulse() of the rigid body control attached to the spatial.
the spatial will disappear.
however when adding RigidBodyControl to the spatial at runtime and calling any of the previous methods,the spatial won’t disappear
How I Fixed It:
i replaced the read() and write() methods of the PhysicsRigidBody class of the bullet package with the read() and write() methods of the PhysicsRigidBody class from the Jbullet package, compiled and used my compiled bullet package, now the bug does not occur.

i’ll take a look a this, can you create a issue on GitHub with the error message.

Edit : never mind didn’t see the issue in GitHub : see #321

See last post there, jme seems to always calculate no matter the mass!

→ Seems only to happen with compoundshapes (for me)!
→ -> Does the sdk create a compound shape?
→ Apparently there is a calcualtion internally that results in somthing like
now depending on compiler settings and random enviroment magic,
X = 0 is prefered

@normen since this might be build related.

Meh, so its down to not calling calculateLocalInertia on mass zero objects? Kinda silly but it should be an easy change if thats necessary. I can’t really do that change any time soon though.

Btw, this is what randomly updating to the “latest” version of bullet gives you - instead of the performance enhancements one hopes for :wink:

Hm I kinda guess that it is not actually the version causing the issue (as the post above is from 2009 or so)

I guess it is some kind of compiler parameter, but yeah i know what you mean :slight_smile: