Question by
zeshanulhaque · Mar 18, 2016 at 09:59 AM ·
movementmove
How can I move a GameObect Form Position one to another Position?
I want to give movement from one point to another point.
Comment
Answer by Guhanesh · Mar 18, 2016 at 11:29 AM
void Start() {
transform.position = new Vector3(0, 0, 0);
}
Docs here Above Script for movement in next frame.
public Transform target;
public float speed;
void Update() {
float step = speed * Time.deltaTime;
transform.position = Vector3.MoveTowards(transform.position, target.position, step);
}
Docs here Above script moves gameobject in a given time and speed.
Your answer
![](https://koobas.hobune.stream/wayback/20220612072028im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
My player moves diagonally when you press two keys at once 0 Answers
How to move an object with a starting and ending speed and time 0 Answers
How to move an object left and right by dragging mouse after clicking left mouse button. 0 Answers
HELP ME ! DICE MOVE in ARRAY 0 Answers
Move player based on UI controls 0 Answers