Hi guys,
I’m trying to get the 3d position along an iTween path however when I use the PointOnPath function its returning huge irrelevant numbers far outside the world im editing e.g.-5.597703E+08 but if i put a box on the spline and move it using the MoveTo func it moves correctly along the spline and I can get a proper position out of it.
Am I using the function incorrectly? I assume percentage actually means 0.0f is the start of the path and 100.0f the end.
Heres my code:
Update()
{
var mPathPercentage:float = 0.0f;
var tempPoint :Vector3 = iTween.PointOnPath(iTween.GetPath("racingSpline"), mPathPercentage);
Debug.Log(tempPoint.z);
mPathPercentage+= 0.05f;
}
anybody got any ideas? thanks for any help!
Gringo