Hello, How can I get an array Point between 4 array vector for LeanTween.MoveSpline
?
My script is this:
public Transform[] a;
public Transform[] b;
public Transform[] c;
public Transform[] d;
public GameObject[] allObjPointRef;
public float[] distance;
float dekat;
public void MovePos ()
{
dekat = 1000;
int dekatNum = 0;
Vector3 posE;
for (int i = 0; i < allObjPointRef.Length / 4; i++)
{
Vector3 posA = a[i].position;
Vector3 posB = b[i].position;
Vector3 posC = c[i].position;
Vector3 posD = d[i].position;
distance[i] = Vector3.Distance(camPos.position, posA);
distance[i] = Vector3.Distance(camPos.position, posB);
distance[i] = Vector3.Distance(camPos.position, posC);
distance[i] = Vector3.Distance(camPos.position, posD);
if (dekat > distance[i])
{
dekat = distance[i];
dekatNum = i;
}
}
//LeanTween.moveSpline(cam,a[dekatNum],1f).setOrientToPath(false).setEase(LeanTweenType.easeOutQuad);
}