- Home /
iTween - Path Movement by Touch
I posted this question on the Unity Forums before understanding that this is probably the more appropriate place for my question. Sorry about the double post.
I am currently working on a prototype that is making use of the iTween plug-in ( an amazingly generous free offering. Thanks Bob! ). I have generated a path using the iTweenPath extension. The path contains 5 waypoints in a sine wave pattern. I want to use a TapControl style script (similar to what is found in the penelope project) to move a gameObject along the path. When the player taps on any screen coordinate, on or off the path, the gameObject should move to the point on the path (probably in-between waypoints) that is closest to the player's touch.
My Question: How do I determine what percent of the path is closest to the player's touch?