noob questoin about Translate

I have 2 points A and B, distance between them is 105m, an object is moving from A to B in a pace of 6.5m per turn. I would like to know the object’s current position after 3 turns. Could you please give a simple code sample for this?

In that case, check the transform’s position. For example:

   Debug.Log ( this.transform.position.ToString() );

That’s what you asked for, but that’s so simple. Perhaps what you really wanted to know was the distance between the object and the destination? In that case you actually want:

  float length;
  length = Vector3.Distance ( this.transform.position, 
                   GameObject.Find("Destination").transform.position );
  Debug.Log ( length.ToString() );

If the script’s not attached to the target object, replace this with that object of course. And preferably factor out any Find() calls from your Update() routine to maintain performance!

Hope this helps. :slight_smile:

Thank so much, Ostagar. It really helps.