How to Move an Object using Timer in Unity 3d

Hi All,

Currently i am doing iphone project[Using Unity 3d game engine].My requirement is i want move an object using timer.Based on the timer,Object movement should occured.If anybody know about this,please reply.

Hopefully Positive Response from u All,
Thanks in Advance,
jayaprakash S

Hi All,

Please reply.Still i am trying.Still now i didn’t get any positive response.If anybody know about this.pls reply.

Thanks
Jayaprakash S

You’ll get a faster response to scripting questions if you post in the scripting forum.

But if you just want to move an object over time:

var speed = 5.0;

function Update(){
	transform.position.x += Time.deltaTime * speed;
}

If you want to move in steps every second or so:

var delay = 0.0;
var stepTime = 1.0;
var distance = 5.0;

function MoveBySteps(){
	transform.position.x += distance;
}

function Awake(){
	InvokeRepeating("MoveBySteps", delay, stepTime);
}

Hi thank you so much for your quick reply!!!Its really working perfectly what my expectation.

Then i have another doubt.How can i set Camera focus for iPhone Project(Normally iPhone Width 320 and Height 480].Currently i set plane and placed one image on the plane.here it displayed image improperly. Can u explain what r the basic settings to do here?..

Thanks in Advance,
jayaprakash S

When you say it displays the image improperly, what exactly is going wrong?