hi folks!
i was wondering if its possible to define something like a group and collect some objects in it to manipulate them as one.
f.e. when you instantiate some GameObjects and then you want them to center around one point.
thanx!
hi folks!
i was wondering if its possible to define something like a group and collect some objects in it to manipulate them as one.
f.e. when you instantiate some GameObjects and then you want them to center around one point.
thanx!
You can group objects by giving them the same tag or if you want them to move together you can make them the children of the same game object with transform.parent
something like:
function makechild(){
objs = GameObject.FindGameObjectsWithTag ("things to group");
for (obj in objs){
obj.transform.parent = parentObj.transform;
}
}
You need to define what you want to parent the game objects to