Search Unity

updating iTween to new version

Discussion in 'General Graphics' started by gamefox87, Aug 8, 2019.

  1. gamefox87

    gamefox87

    Joined:
    Aug 19, 2016
    Posts:
    64
    I upgraded iTween to the recent version since the old one depended on GUITexture which is now deprecated. I'm having a problem calling the class easeOutQuad https://github.com/jtothebell/iTween/blob/master/iTween.cs

    Code (CSharp):
    1. private float easeOutQuad(float start, float end, float value)
    2.     {
    3.         end -= start;
    4.         return -end * value * (value - 2) + start;
    5.     }
    This is a private float but was public static in the old iTween. I'm using it to transform an object.
    Code (CSharp):
    1.       deltaTimeCloseUp += Time.deltaTime;
    2.         if (deltaTimeCloseUp > time)
    3.         {
    4.             deltaTimeCloseUp = time;
    5.         }
    6.         gameObject.transform.position = new Vector3
    7.             (
    8.             iTween.easeOutQuad(from.x, to.x, deltaTimeCloseUp / time),
    9.             iTween.easeOutQuad(from.y, to.y, deltaTimeCloseUp / time),
    10.             iTween.easeOutQuad(from.z, to.z, deltaTimeCloseUp / time)
    11.             );
    Was wondering what is the correct way to call in the new iTween?

    Has anyone used iTween at all to do do this?
     
  2. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    I don't think you are in the right forum section, this one is called General Graphics. Try seeking help in the scripting section. Or on one of the official iTween support channels(if there is one).