Lerp without easing?

Get help using Construct 2

Post » Thu May 31, 2012 8:24 pm

Hi,

I use Lerp quite often for moving an item from one position to another with dt, but I require now that there is no "easing" at the end of the Lerp.

Is there another function to use to solve this?

Tks
B
43
S
9
G
7
Posts: 58
Reputation: 7,510

Post » Thu May 31, 2012 9:51 pm

[code]Every Ticks
-> sprite: set t dt to min(1,sprite.t+dt)
-> sprite: set X to lerp(sprite.xStart,sprite.xEnd,sprite.t)[/code]
If you provide a starting point, and end point and t start at 0 it should linearly interpolate between xStart and xEnd.
Yann2012-05-31 21:51:37
B
64
S
22
G
14
Posts: 1,482
Reputation: 16,457


Return to How do I....?

Who is online

Users browsing this forum: inbong, Yahoo [Bot] and 12 guests