Moving Multiple Objects as One

Hey! I have multiple objects on screen that are clones of each other. How can I move them all simultaneously up? I don’t want to have each object containing a script waiting for a keypress to move up. Is there a way to have a central controller that moves all objects with a tag up? And note: multiple clones are being created every 5 seconds.

You could make them all child objects of a single parent, and then move the parent object.

2 Likes

There are two option.

  1. Make All Objects Child of single Object and Move That Object.
  2. Search Object with tag in Script and Move all of that with the Following code
GameObject[] obj=GameObject.FindGameObjectsWithTag("TestObject");
        for(int i=0;i<obj.Length;i++){
            obj[i].transform.position=new Vector3(0,0,0); //New Position
        }
3 Likes