Lerp with timescale

0 favourites
  • 4 posts
  • So, I've been using lerp as long as I started with construct 2. I switched to 1-n^dt after reading this, which supposedly gives perfect accuracy without worrying about the frame rate, but it is still obviously time scale dependent. I've tried multiplying by timescale, and other variants, but no luck.

    So just being curious, would there be a way of improving even more the "speed factor" of lerp so it would also support any time scale? And would the extra calculations hurt performance if many of these are called compared to the "vanilla" lerp?

  • I thought DT already took time scale into account.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 1-n^dt just approximates the current frame rate, and should give you a constant speed of about 60 frames per second.

    But what you are talking about is different speeds of different objects.

    The best method for using lerp, and dt would be the speed you wish to move, in pixels per second, times dt.

    Most behaviors are setup to use pixels per second btw.

  • Good to know, thanks newt ! I guess I'll stick with what I have if the formula cannot be improved.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)