- Home /
Smoothing end of a lerp
Hi guys, I'm using lerp to move an object, but would like the objects rate of movement to slow towards the end so it appears smoother. Any suggestions to where I should be looking? Thanks
Answer by kevork · Dec 15, 2011 at 07:29 PM
The easiest way is to use iTween. More information is at http://itween.pixelplacement.com/index.php.
Thanks for the link - I'll look into this for future projects, looks amazing.
Answer by aldonaletto · Dec 18, 2011 at 12:02 PM
You could use the "Lerp filter" configuration:
transform.position = Vector3.Lerp(transform.position, destPosition, speed * Time.deltaTime);
When you assign Lerp to the same variable/property that's passed as the first argument, you get a movement that slows down when approaching the end.
Your answer
Follow this Question
Related Questions
Crash on loop using Lerp. 1 Answer
Inertia/Smoothing Advice 1 Answer
Slerp / Lerp RotateAround() 0 Answers
Lerp a Object along X and Z axis only. 3 Answers