applyCentralForce() in simpleUpdate or prePhysicsTick
jMonkeyEngine Hub
June 26, 2026
Best practice is to apply forces before each physics step, not in simpleUpdate().
I looked at the source code of RollingTheMonkey and did some playtesting, but unfortunately I don’t yet understand what’s going on. The app seems equally playable over a wide range of frame rates (30-9000 fps), which is not what I’d expect from reading the code. Since it’s presented as an example, it should probably be re-written to follow best practices. But first I’d like to understand why it works at all. This may take a while.
I’m also unsure of the exact semantics of applyCentralForce(). The javadoc seems clear, but I’m having trouble reconciling the javadoc with the source code.
Discussion in the ATmosphere