Below is some code I wrote to simulate gravity for a fireball that ticks every frame. It has an initial upward velocity and then falls back down in an arc. The rate at which it falls is all multiplied by delta time so that it will not fall slower or faster based on the client’s framerate but will rather be consistent. I’ve verified on multiple sites this is the correct formula for consistent acceleration.
fireBall.Position = (fireBall.Position + vel * DT + Vector3.new(0,GRAV,0) * DT * DT)
vel = vel - Vector3.new(0,GRAV,0) * DT
However at lower framerates like 5 - 20 it will land further and further away. Below is a picture of where the attack lands at 60 fps and 5.
I know game physics tied to framerate is a problem even for triple-A games like DOOM or FALLOUT but this disparity is very noticeable and not good for projectile attacks. Is there any way to make it more consistent? Or is it just an unfixable quirk of the engine?