- Home /
iTween MoveTo not working at all
its a simple script but gives me a handful of errors that I dont understand how...
heres my code using UnityEngine; using System.Collections; public class Buttons : MonoBehaviour { public GameObject cameraMain; public void Start (){ iTween.MoveTo(cameraMain, Vector3(728.25 , 54.517 , 374.57) , 2); } }
here's my errors:
its the same three everytime, and i have narrowed it to Line 10, obviously, but i CANNOT figure out whats wrong.....?!
Answer by GameVortex · Oct 02, 2014 at 06:38 AM
This has nothing to do with iTween not working. iTween works fine. These are compile errors which means that it happens before the game even runs, so iTween has no chance of even starting to do anything at all.
There are multiple errors in your script.
Vector3 are classes and needs to be initialized with the new keyword: new Vector3(...
floating point values needs to be defined with an f to know what they are: 728.25f
Lastly you have an apostrophe at the end of the last line which should not be there.
Your answer
![](https://koobas.hobune.stream/wayback/20220613164223im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
iTween help needed 2 Answers
iTween.MoveTo doesnt Working! 1 Answer
Using iTween to chain multiple paths together 2 Answers
Using iTween.MoveTo() for paths in local space 1 Answer
itween MoveTo IndexOutOfRangeException 0 Answers