you're fundamentally doing the wrong calculation.
Maybe. I don't argue. But let me explain my logic. Maybe you can tell me how to do it better.
With a simple example.
The sprite moves every tick by 1 pixel along the X axis, and stops when there is a collision. Usually, we multiply this number by dt, right? Now, I need to calculate the movement and write to a variable the time after which the sprite collides with an obstacle. I use a loop, and instead of ticks, I use a loopindex. If I didn't use the tajectory forecast, I would multiply the movement by dt. So, I need the object to move inside the loop exactly as it would move outside the loop, i.e. in real time. How else can this be implemented?