Horje
how to move a gameobject Code Example
how to move a gameobject
   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);
    }
how to move a gameobject to another object
//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
}




Csharp

Related
randomize through array in C# Code Example randomize through array in C# Code Example
remove first object from list c# Code Example remove first object from list c# Code Example
assetfinder Code Example assetfinder Code Example
how to find how much digits in number c# Code Example how to find how much digits in number c# Code Example
wpf choose file dialog Code Example wpf choose file dialog Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7