[C++]Slow computer perfomance cause physics to work different
I have a pretty usual piece of code performing a free fall acceleration.
DeltaTime comes from a Tick loop so it's based on frame change time. I guess this code should work the same way on any computer because for one second of calculation any PC should get MovementSpeed.Z = -1 * FreeFallAcceleration*FrameRate. Since FrameRate = 1/DeltaTime, the results should be the same, but... Same character jumps right on the middle of platform on PC#1 but a little overshoots and thus falls off platform on PC#2. What am I doing wrong?
asked Oct 15 '15 at 03:16 PM in C++ Programming
Depending on how much it overshoots. If not too much - It is normal. On slower computer you'll have less frames per second, so your movement change curve will be less accurately interpolated, so more error will be accumulated during physics calculation. It is a limitation of physics modelling and not too much you can do here. That is one reason why games are usually targeting fixed fps.
Depending on what you mean by overshoot - there can be options how you can fix this.
Follow this question
Once you sign in you will be able to subscribe for any updates here