I have beein trying to use the iTween visual path editor. I named the visual path “test_path”(in a text box in the itween visual path code, not the actual object…just like the instructions said), but when I try this code, I get an error about test_path being an unknown identifier, what is wrong?
function Start(){iTween.MoveTo(gameObject, iTween.Hash("path", test_path, "speed", 10, "easetype", "linear"));}
Not positive, but try “path”, “test_path” instead. Without the quotes the compiler is going to think test_path refers to a variable within the script, not within iTween.
The unknown identifier error is gone, but now I get this (and the animation does not play)
Does anyone have any ideas?
http://itween.pixelplacement.com/documentation.php
path Transform[ ] or Vector3[ ] for a list of points to draw a Catmull-Rom through for a curved animation path
path expects an array of transforms, or an array of Vector3’s.
I don’t use the iTween Path’s visual editor, so I can’t help in terms of how to get the Transform[ ] or Vector3[ ] from the “iTween Path” in the editor though.