# How to Move an Object using Timer in Unity 3d

**URL:** https://discussions.unity.com/t/how-to-move-an-object-using-timer-in-unity-3d/418296
**Category:** Mobile
**Tags:** iOS
**Created:** [July 16, 2010, 11:36am UTC](https://discussions.unity.com/t/how-to-move-an-object-using-timer-in-unity-3d/418296 "2010-07-16T11:36:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![anon\_89842851](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@anon\_89842851](https://discussions.unity.com/u/anon_89842851)
#### Post date: [July 16, 2010, 11:36am UTC](https://discussions.unity.com/t/how-to-move-an-object-using-timer-in-unity-3d/418296/1 "2010-07-16T11:36:25Z")

</div>

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

---

<div class="post-metadata">

### Author: ![anon\_89842851](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@anon\_89842851](https://discussions.unity.com/u/anon_89842851)
#### Post date: [July 16, 2010, 1:34pm UTC](https://discussions.unity.com/t/how-to-move-an-object-using-timer-in-unity-3d/418296/2 "2010-07-16T13:34:21Z")

</div>

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

---

<div class="post-metadata">

### Author: ![tonyd](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/tonyd/32/437055_2.png) [@tonyd](https://discussions.unity.com/u/tonyd)
#### Post date: [July 16, 2010, 1:50pm UTC](https://discussions.unity.com/t/how-to-move-an-object-using-timer-in-unity-3d/418296/3 "2010-07-16T13:50:09Z")

</div>

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:

```auto
var speed = 5.0;

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

```

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

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

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

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

```

---

<div class="post-metadata">

### Author: ![anon\_89842851](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@anon\_89842851](https://discussions.unity.com/u/anon_89842851)
#### Post date: [July 16, 2010, 3:22pm UTC](https://discussions.unity.com/t/how-to-move-an-object-using-timer-in-unity-3d/418296/4 "2010-07-16T15:22:38Z")

</div>

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

---

<div class="post-metadata">

### Author: ![andeeeee](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@andeeeee](https://discussions.unity.com/u/andeeeee)
#### Post date: [July 20, 2010, 10:00am UTC](https://discussions.unity.com/t/how-to-move-an-object-using-timer-in-unity-3d/418296/5 "2010-07-20T10:00:24Z")

</div>

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