Search code examples
unity-game-enginetweenleantween

Setting in and out easing separately


When using LeanTween for Unity to move a GameObject, is it possible to set the in and out parts of the easing separately?

What I would like to do is:

  1. Start off slow.
  2. Gradually increase speed from slow to fast.
  3. Stop abruptly with no ease at the end.

Solution

  • Maybe you should make your own animation curve on LeanTween.

    Just create a AnimationCurve to edit in the editor:

    public AnimationCurve animCurve;
     
    void Start(){
        LeanTween.scale(gameObject, Vector3.zero, 1f).setEase(animCurve);
    }