Answers for "Unity move gameobjectr to position"

3

move gameobject to position unity

public Transform target;     
 public float speed;     
 
 void Update() 
 	{         
 	float step = speed * Time.deltaTime;         
    transform.position = Vector3.MoveTowards(transform.position, target.position, step);     
    }
Posted by: Guest on April-24-2021

Code answers related to "Unity move gameobjectr to position"

Browse Popular Code Answers by Language