Hi all!
I have a tween using Lerp (over a 0.5 sec.) and I need it to deactivate when Lerp is finnished. Is there a way to detect when Lerp has ended?
I am currently using a timer, but its not really good practice, I think.
Thanks,
Jan
Actually no because it always dividing the number endlessly before it can reach 1 in factor. But we can put instance variable to iterate the lerp factor an reach value 1: https://dl.dropboxusercontent.com/u/659 ... _lerp.capx
Thanks for the swift reply alextro. I was not able to open the capx though, its made with the 240 beta and I'm running the stable version - but I get the idea.
Another good reading about lerp by —
viewtopic.php?f=162&t=62764&p=538414&hilit=perfect+lerp#p538414
Oh just found the old example that should compatible with your C2 version:
https://dl.dropboxusercontent.com/u/659 ... _lerp.capx
It does easing in & easing out.
Develop games in your browser. Powerful, performant & highly capable.
Fine example showing a clever use of the Clamp exp. in Lerp. Thanks for showing me that - and the reed about Lerp