"Add force" works strange in async tick physics

I am using “add force” on actor with static mesh with 1000kg mass.

When “add force” is done in Event Tick (in my case in 60FPS vsync) - works as expected.

But I would like to try async physics tick to get more precision - but it looks like same “add force”, works proportionally stronger as Async physics tick frequency increases.

I did an experiment where regular 60FPS “Event Tick” is pushing object into right side, while 120FPS “Async Physics Tick” pushing object into left side - with same amount of force applied all the time.
And “Async” is twice strong - while I expect that same forces applied all the time in opposite directions should cancel each other.
When I set async tick to 60FPS - it works that way.

Looks like calculating how force changes object speed (as well as rotation) is done incorrectly (or I don’t understand some concepts behind async physics), because it always took engine FPS (1/60 in my case) instead of actual Delta Seconds passed to Event Async Physics Tick (1/120 in my case).

It is hard to workaround by simply manual scaling down force, because Event Tick frequency may vary (because dynamically changing FPS in complex scenes), so it is hard to get good scaling coefficient.

Also did some more experiments, and in 60FPS to oppose gravity force on 1000kg mass I need to apply 980000.0 upwards - and it “hangs” steady, so it is ok.
But in async physics at 120FPS - 490000.0 is barely enough but it is not fully steady (sometimes starts to slowly fall).

Is there good BKM to handle that issue?

Chaos simulate-physics physics-stability Physics-Mass

tick1


With sub-stepping on async physics calculations the two tick events are unhooked from each other and all go at the same rate.
You could try capturing the sim seconds and check via a modulo (modulus in ue) operator if a compared to a value it’s equal zero (example sim time mod 2 == 0) and then add the force with a bool that makes it happen once per occurrence. Then you could steadily add the force every two seconds no matter the tick. (OFC 2 seconds is just an example experiment until you are happy with the result)

It wil be a steady stream of force then.


Ok so direct modulus comparison can be too precise with the fluctuations in sim time (causing lack of execution in some cases). Better use nearly equal to get a more reliable result.

Think of it as a controlled burn in a rocket, with spurts of fuel.

You’ll have to play around with the modulo percentage and nearly equal value to get it stable.

Or you could consider Add Impulse in place of Add Force

1 Like

I think it is good workaround.

Anyway “add force” called from async tick should work based on ‘delta seconds’ from the event, not from whole frame.
Because right now physical simulation with fixed async time step would work wrong, and behavior would significantly change with change of FPS.