Ok, so i wanted to know how to make a block fall from the top of the screen and then stop about half way down?
How can i accomplish this? I have Itween, but have no idea on where to start?
Ok, so i wanted to know how to make a block fall from the top of the screen and then stop about half way down?
How can i accomplish this? I have Itween, but have no idea on where to start?
there are infinte ways. well maybe not infinite, but a lot. You could just attach a rigidbody and use gravity. Of course then turn it off when you want it to stop.
function Start()
{
rigidbody.gravity = false;
yield WaitForSeconds(3.0);
rigidbody.gravity = true;
yield WaitForSeconds(3.0);
rigidbody.gravity = false;
or you iTween.
var thisPosition : Vector3;
thisPosition = Vector3(0,0,0);
iTween.MoveTo(gameObject, iTween.Hash("position", thisPosition, "time", 4.0));
etc.
used the iTween to move them down, but why are they snaping back to the location out of screen where they started after 4 seconds? is there away to make them stay in the new vector3 loc?