Download

Timed movement consistency in variable timestep

I am curious as to how people deal with timed movements, such as a dash, within a variable timestep.

In a variable timestep, the timer will detect that it finished on a frame and the dash movement will stop, but the truth is the timer finished sometime within the frame. So what we actually wanted the dash to do was get the remaining time and set the dash velocity accordingly. However, things get complicated when you do things like apply no friction during the dash. Also, if the dash ended this frame, but we are still treating as if it didnt end, then that means if we were to be walking right after the dash we would need to also cut up the walk velocity to take into account that dash is still kinda moving this frame in order to avoid doing extra movements.
This has been getting very messy in my code.

The next idea is to use substepping. We run the timer within the substep to get a smaller error, but from my test I would need to make the substep deltaTime very low to get something decent. Even with .004 deltaTime, if my dash is a speed of 20 units per second, doesnt that mean the max distance error would be .08 units (20 * .004). While that isnt too bad, if you put 2 objects .08 units apart you will easily notice the difference. Also, having everything run at a substep of .004 can be poor for performance…

Am I pretty much on track of the unfortunate reality of working in a variable timestep, or is there a better way of handling this? Do unreal engine users just deal with the inconsistencies or is everyone building their own fixed timestep to use for their character movement? What does epic games do for their competitive games? Would pro players not be incredibly disgusted by such inconsistencies?

I would think there would be lots of info on a topic like this, but from my research I have not found much. There are mentions of this issue here and there, but nothing on a workaround or anything.
When people talk about fixed and variable timesteps, it seems they usually just focus on variable timesteps needing to use a deltaTime for framerate independence, but unfortunately it goes much deeper then that.

Perhaps I am searching with the wrong words. Does anyone have any different keywords to use to search an issue like this? I dont understand why something like this wouldnt be talked about more.

Take a game like overwatch, you have genjis dash attack. How would they make it fairly precise? I wonder if it currently even is precise.