- Home /
Move Object Using iTween
I want to move my game object horizontally on screen.
For this I want to use iTween.MoveTo() function to reach at desire position.
Also I want listener for this so that I can able to deactivate object when it finished its movement.
If any one provide basic example for usage of this then it become useful to me as well as other members.
@siddharath: I understand that you're new to Unity, but ins$$anonymous$$d of asking every question that comes to your $$anonymous$$d, why don't you search for them first. $$anonymous$$any of your questions have already been asked and answered several times.
@jorjdboss Ok, next time I will keep thing in $$anonymous$$d.
Hey! I like to support newcomers! If you are interested I could give you my skype Id or email or whatever so you can ask me any question whenever you want. Just write a personal message. Or another comment or so. I'm just someone who has not much to do :D
Answer by goo-muffin · Jan 18, 2014 at 10:50 AM
iTween.MoveTo(gameObject, iTween.Hash("x", positionx, "y", anypositiony, "oncomplete", "functionwhenfinished"));
Answer by Rgalaxy · Jan 18, 2014 at 11:22 AM
i think the documentation is good to read, though they don't give an example of simple code, but if yours, try this
iTween.MoveTo(gameObject, new Vector3(x,y,z), t) where gameObject is what object u want to move, Vector3(x,y,z) is the point you want your object to go and t is int/float for how fast your object.