Should be forces and torques multiplied by "tpf"?

Hello guys,

I have serious doubts about whether forces applied to dynamic nodes should be multiplied by "tpf" (time per frame).

I think if we don't do so, the game turns framerate-dependent. However, I wonder whether in some cases we should use (tpf * tpf) instead, or any other expression in function of tpf, since maybe impact of time on forces is non-linear?.

Can someone develop on this, please? Let me know if my question is not clear enough.


Bump. Thanks.

Time per visual frame (usual framerate) is irrelevant here. You should apply forces per physics step. As the step size is currently fixed in jME Physics you don’t need to scale your forces.

You need to scale your forces per step if you change the step size, which is controlled by the accuracy (in physics space), though. But the scaling factor depends on the physics simulation used. So, decide on accuracy first and tune your forces according to that.

That explains why springs would completely change when I was tinkering with the accuracy. I was getting so frustrated by that, good to know.