Exemplo n.º 1
0
 protected static Vector3 LerpRandomTargets(Vector3[] randomTargets, Vector3[] newRandomTargets, float arrayLerp, float timeLerp)
 {
     if (randomTargets == null)
     {
         return(Vector3.zero);
     }
     return(MathS.Vector3Lerp(LerpArray(randomTargets, arrayLerp), LerpArray(newRandomTargets, arrayLerp), timeLerp));
 }
Exemplo n.º 2
0
        protected override Vector3 GetStartRelative(Vector3 prelerped, float lerp)       //Actually adjusts end point to be relative to this start point?
        {
            Vector3 endRelative = initialScale.Value;

            //if(scaleRelativeEndRelativeToStart && scales.Length > 0 && scales[0].x != 0 && scales[0].y !=0 && scales[0].z != 0){
            //	endRelative = Vector3.Scale(endRelative, new Vector3(1/scales[0].x ,1/scales[0].y ,1/scales[0].z) );
            //}
            return(Vector3.Scale(MathS.Vector3Lerp(endRelative, Vector3.one, lerp), prelerped));
        }
Exemplo n.º 3
0
        protected override Vector3 GetEndRelative(Vector3 prelerped, float lerp)
        {
            Vector3 endRelative = initialScale.Value;

            //if(scaleRelativeEndRelativeToStart && scales.Length > 0 && scales[0].x != 0 && scales[0].y !=0 && scales[0].z != 0){
            //	endRelative = Vector3.Scale(endRelative, new Vector3(1/scales[0].x ,1/scales[0].y ,1/scales[0].z) );
            //}
            return(Vector3.Scale(prelerped, MathS.Vector3Lerp(Vector3.one, endRelative, lerp)));
        }