I'm moving a Game Object in unity from point A to point B no matter what the original position of the Game Object is.

Let us suppose that I have a Game Object at (0, 0, 0).

But I want to move that Game Object from (1, 1, 1) to (2, 2, 2).

How can I do this in C# ?


1 Answer 1


Simply set the object's Transform.position to Vector3.Lerp(Vector3 A, Vector3 B, percent completion

  • \$\begingroup\$ Why not just set it? I don't think he's looking for Lerp. \$\endgroup\$
    – Ben
    Apr 19, 2015 at 5:51
  • \$\begingroup\$ Its a bit ambiguous but I actually read it that he does want to lerp over time from A to B \$\endgroup\$
    – Alan Wolfe
    Apr 20, 2015 at 1:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .