Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Tween by Digital Ruby problem

Discussion in 'Animation' started by CyberKn1ght, May 10, 2020.

  1. CyberKn1ght

    CyberKn1ght

    Joined:
    Apr 5, 2019
    Posts:
    16
    Hello, I am using the Tween library by DigitalRuby, and my tween isnt tweening between two values but between 0 and 1. Could anyone help?

    // tween swordOffset over time

    System.Action<ITween<float>> update = (t) => { TweenProgress(t.CurrentProgress); };

    System.Action<ITween<float>> completed = (t) => { Debug.Log("tween completed"); };

    Debug.Log("1 " + defaultSwordOffset);
    Debug.Log("2 " + attackSwordOffset);

    TweenFactory.Tween("WeaponAttack", defaultSwordOffset, attackSwordOffset, attackDuration, TweenScaleFunctions.Linear, update, completed);

    the default offset is 1.7 and attack offset is 2.5 before the tween, I checked with the debug.log
    Thanks for your time!
     
  2. CyberKn1ght

    CyberKn1ght

    Joined:
    Apr 5, 2019
    Posts:
    16
    Solution: use iTween instead, it is much simpler; Please delete thread.