Deactivation

This may be a simple question, but does jME physics or for that matter ODE actually deactivate any rigid bodies when they have low energy?



I ask because I am writing a network script for logging to the database when values are changing.  I come from a Havok and Director background and the rigid bodies in Havok had this nice feature called active that is set to false when it has a low energy.



Any chance that exists?



Thanks

It does: You can set the auto disable threshold and you can deactivate physics nodes explicitly (new rest() method). See stress and domino tests. It would also be possible to set auto disable thresholds for a single body, but physics node currently does not have methods for it. If you need it those could be added.

Fantastic!  This looks perfect.

Wait, is the new repository compiled against a newer version of odejava-jni.jar?



I'm getting usatisfied link errors on my mac when i download the precompiled binaries from odejava?  This used to work and I don't remember how I got it to work.


Another question that is directly related to the help you've already given me.  I have set the auto disable threshold and it is working fantastic, but how do I wake something up through code that has gone to sleep?  I can't seem to find a wakeUp function.



Thanks

Currently there is no such method. You could apply a tiny force to do so, or move it a tiny little bit. But why do you need to enable it manually?

That's what I currently do right now is move it forward a tiny bit.  Currently I set the auto-disable threshold and if the user controlled character changes to a resting state, I can't wake it up when the user tries to start moving again.  It's not a big deal, this works.



Thanks

I have added an unrest() method now.

deerslyr1,



I had the same problem with the new binaries. I'm now using the working "old" one from this thread:

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



Did you manage to use the new ones?

I just double checked that (as I got the natives from joh), and they were different. It's in jME Physics 2 cvs now.

@Irrisor: DynamicPhysicsNodeImpl gives me a exception when compiling because it does not define unrest method… Also, OdePhysicsSpace does not define setAutorestThreashold



Just mentioning  :wink:

uh, incomplete checkin, sorry. I'll fix it, thanks.