Exemplo n.º 1
0
 public static Popup.TransformData Lerp(Popup.TransformData d1, Popup.TransformData d2, float t)
 {
     //Debug.LogFormat("d1: {0}, d2: {1}, t: {2}", d1.ToString(), d2.ToString(), t);
     return(new Popup.TransformData()
     {
         Position = Vector3.Lerp(d1.Position, d2.Position, t),
         Rotation = Quaternion.Lerp(d1.Rotation, d2.Rotation, t),
         Scale = Vector3.Lerp(d1.Scale, d2.Scale, t)
     });
 }
Exemplo n.º 2
0
 public static void Apply(this Transform transform, Popup.TransformData data)
 {
     transform.localPosition = data.Position;
     transform.localRotation = data.Rotation;
     transform.localScale    = data.Scale;
 }