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
41
S
8
G
6
Posts: 58
Reputation: 6,820

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
60
S
22
G
14
Posts: 1,479
Reputation: 16,346


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 27 guests