void MoveCurvePath(GameObject img ,Transform start, Transform center, Transform end, float duration)
  {
      Vector3[] path = new Vector3[3];
      path[0] = start.position;
      path[1] = center.position;
      path[2] = end.position;

      // 경로를 따라 이동
      img.transform.DOPath(path, duration, PathType.CatmullRom).SetEase(Ease.InQuad);
  }

 

 

+ Recent posts