I'm going to use fixed-timestep logic for my game but I'm confused on how to implement render-tweening.
According to the articles on gaffer.org, it is easy to use linear interpolation based on the amount left in the accumulator.
So, for example...
Let's say I have a ball moving in a circle at a rate of 4 seconds per full rotation.
After 2 seconds the ball is halfway around the circle.
My accumulator (eg. the amount left over after performing full timestep updates) says that we are 1/10th (0.1) of the way to the next timestep.
Where should I draw my ball? I can't perform an update on the ball because that would ruin my fixed-rate logic.
Do I somehow move the ball in a straight line? If so, how do I know where to move it?
Thanks for your help...
According to the articles on gaffer.org, it is easy to use linear interpolation based on the amount left in the accumulator.
So, for example...
Let's say I have a ball moving in a circle at a rate of 4 seconds per full rotation.
After 2 seconds the ball is halfway around the circle.
My accumulator (eg. the amount left over after performing full timestep updates) says that we are 1/10th (0.1) of the way to the next timestep.
Where should I draw my ball? I can't perform an update on the ball because that would ruin my fixed-rate logic.
Do I somehow move the ball in a straight line? If so, how do I know where to move it?
Thanks for your help...