- Home /
iTween rleative path
Hi,
Is it possible to start a path from the current position of the object and not where the path start point is located?
Thank you
Comment
Best Answer
Answer by robertbu · Jul 13, 2014 at 03:06 PM
I don't know of a way to do a relative path in iTween, but assuming you are using an array of Vector3s for your path, it is quick and easy to modify the path to the current position. Assuming you started your path at (0,0,0), just add the current position to each Vector3. If you are using Transforms for your path, then just adding the current position to the 'transform.position' of each entry in the array will move the path to start at the current location (assuming you authored the start at (0,0,0)).