- Home /
Move object from point a to point b
Is there any command in the Unity API that will smoothly move an object from one point to another at a constant rate? I don't want to play around with physics because none of my other game elements are physics based, and I need the object to land precisely at the destination coordinate?
Some answers from similar questions have pointed to Vector3.Lerp(), but it's not giving me the effect I want.
Answer by Xarbrough · Jul 13, 2015 at 12:18 AM
Yes, you can use MoveTowards().
Check out the example. It will move from point A to point B at a constant speed and will not overshoot.
Your answer
Follow this Question
Related Questions
Have 2D Sprite Follow the Mouse in Straight Line 2 Answers
How to Convert each 2D Array to GameObject 2 Answers
Moving object disappears then comes back 1 Answer
Top down 2d character controller sometimes walking backwards 1 Answer
[2D] Moving the player 1 tile at a time using rigidbody movement 0 Answers