do I need to consider the delta time in each update tick, when adding a force to a rigidbody? Or does the chaos engine handle that for me, so that the game runs fps-independently? I’m using physics sub-stepping + async.
I’m developing a vehicle arcade-sim and to brake, Im using “add force at location”. I calculate the brake force accordingly and just hit the rigid body every frame with it. It works fine and the result is what I expect with real world values and physics formulas… Or is there a way to reduce the performance for example to a fluctuating framerate to test such things?
I believe the whole point of async is to be independent from fps of the main thread.
The easiest way will be to practically check the effect of the code with different fps values =)
A force is a force. It’s an acceleration, in units per square seconds (divided by mass).
The engine naturally does the job of integrating acceleration into velocity updates (and velocity into position updates) over time, using frame delta time. So yes they are fps-independent.
If you were adding “impulses” instead of forces, you’d have to consider delta time, because impulses add directly to velocity, so they are short-circuiting the acceleration integration. Impulse is rather used for one-time propulsion like a jump pad.