Can you be more specific? The lerp takes 3 values, one as a starting value, an other as an ending value and a third one that determines how much in-between of these two values you will get.
For example: lerp(10, 20, 0) is 10, lerp(10, 20, 1) is 20 and lerp(10, 20, 0.5) is 15. That is of course when you trigger it once. If you triggering the lerp every tick (as when a key is pressed down), you will gradually get the second value and the speed by which it'll get there is determined by the third value. A lerp(10, 20. 0.01) will have a slow transition towards 20, while a lerp(10, 20. 0.9) will reach 20 almost instantly.
Of course there are other ways to move stuff around. Have a look to the moveto behavior () and to the Litetween/EaseTween behaviors (https://www.scirra.com/forum/viewtopic.php?t=70700&start=0). These are very useful tools!
And here, in this example you can test the lerp speed in action. Use the mouse wheel to increase/decrease the 3rd value which determines the speed of the lerp.
Awesome example, dude
But I want a way to use the lerp whit 'on key pressed' for example... with a trigger, u know?
How can I achieve that?
Thanks
edit: preferably, I want do this without plugins.. that's why the lerp question.