Repeated lerp operations are equivalent to evaluating an exponential curve. Learn how to rewrite them in a framerate-independent form using exp/log for precise control.
Math
Scott Lembcke
Improved Lerp Smoothing.
slembcke
Useful Math Snippets
Framerate Independent Interpolation:
So one of my favorite math tricks is simple damping. Say you have a moving object that you want to apply some drag to. The easy way to do it is to multiply the velocity of the object by a number slightly less than 1.0 each frame:
slembcke
Leading a target.
Just about everybody who’s played a shooting game knows about leading the target. For instance, in Halo, rockets move pretty slow compared to bullets. To get good at the game, you have to learn how far ahead of your target to fire the rockets so they will run into the rocket’s path just …
slembcke
Simple Swept Collisions
With the large and dynamic scale that we have planned for Solaro, the game is going to need to work with relatively high velocities. We’ll want to allow ships to travel fairly fast so that they can get around the world, and bullets will have to travel even faster so that you can hit things. …