Fixed timestep and interpolation question
Posted
by
Eric
on Game Development
See other posts from Game Development
or by Eric
Published on 2014-05-25T14:07:05Z
Indexed on
2014/05/27
9:58 UTC
Read the original article
Hit count: 326
I'm following Glenn Fiedlers excellent Fix Your Timestep! tutorial to step my 2D game. The problem I'm facing is in the interpolation phase in the end.
My game has a Tween-function which lets me tween properties of my game entites. Properties such as scale, shear, position, color, rotation etc. Im curious of how I'd interpolate these values, since there's a lot of them. My first thought is to keep a previous value of every property (colorPrev, scalePrev etc.), and interpolate between those.
Is this the correct method? To interpolate my characters I use their velocity;
renderPostion = position + (velocity * interpolation)
, but I cannot apply that to color for example.
So what is the desired method to interpolate various properties or a entity? Is there any rule of thumb to use?
© Game Development or respective owner