“Como mover um GameObject para outro objeto” Respostas de código

como mover um objeto de games

   public static int movespeed = 3;
   public Vector3 userDirection = Vector3.down; //You can change this to any direction
   
   void Update()
    {
        transform.Translate(userDirection * movespeed * Time.deltaTime);
    }
Am coder

Como mover um GameObject para outro objeto

//Attach this to the oject you want to move
public GameObject Bullet
public GameObject Cannon

void Start()
{
 (Bullet) = GameObject.Find("Bullet"); //These are to find the object to move to
 (Cannon) = GameObject.Find("Cannon"); 
 Bullet.transform.position = Cannon.transform.position; //this is to move the object
}
Am coder

Respostas semelhantes a “Como mover um GameObject para outro objeto”

Perguntas semelhantes a “Como mover um GameObject para outro objeto”

Mais respostas relacionadas para “Como mover um GameObject para outro objeto” em C#

Procure respostas de código populares por idioma

Procurar outros idiomas de código