I am very new in unity,I want to move an object from one place to another and then in the 1st place again automatically ,is there any way to do that?..here’s my code to move the object,but its going infinity and beyond!!
{
float speedX = 1;
float speedY = 0;
float speedZ = 0;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.Translate (new Vector3 (speedX, speedY, speedZ) * Time.deltaTime);
}