Not a question, but I came across this and liked it, so I thought I'd share.
Different types of lerp motions and a visualization of the math needed to create them -
http://i.giphy.com/3ornjK3itVx9NZ3WUM.gif
Interesting.. someone need to recreate this in Construct.
In the general case you can set it up like this:
Global number t=0 Global number tt=0 Every tick --- set t to (t+dt)%2 t<1 --- set tt to cubic(0,0.5,0.5,1,t) t>=1 --- set tt to cubic(1,0.5,0.5,0,t-1) Every tick --- set X to lerp(A, B, tt)[/code:1i6tummh] t goes from 0 to 2 every two seconds. You can adjust it so it goes at a different speed, or just make it stop at the end. tt maps t to a curve. There are actually two curve parts. Going toward the target and coming back. The cubic expressions is where you define the shape. Change only the two 0.5 parameters. So for example an ease in/out could look like this: Set tt to cubic(0, 0, 1, 1, t)
Develop games in your browser. Powerful, performant & highly capable.
You're right R0J0, I just need to dig the technique more. Currently I managed to create ease in & out with distance cost calculated and stop precisely.