Answers for "how to move an object in unity to a certain position c"

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 "how to move an object in unity to a certain position c"

Browse Popular Code Answers by Language