Well, heres my problem. I am creating a 2D game where I have to instantiate 30 different pieces where I have to set a piece and accept it in its position. Positioning includes rotation, however, I currently have the GUI set as a child of a gameobject. I can get the buttons of the canvas to not rotate using the following:
#pragma strict
function Update () {
transform.rotation = Quaternion.identity;
}
However the location of the canvas still changes as if it is rotating, as depicted in the images below.
I want this to work the most efficiently as possible. I want to find a way to make it so it isn’t rotating. The only reason I did it this way was because it needs to be able to follow all 30 pieces after they were instantiated in runtime. I figured the easiest way was to add the canvas to the prefabs and then SetActive = false; until they were ready to be used.
Ideally I would like it to be separate where 1 canvas and buttons control them all as they are instantiated. However, if this is difficult/impossible, then I would like to figure out a way to prevent the canvas from moving.
Also it is set to world space because the other options are not adjustable to what I need, if there is anything else that might be useful in this, any help is good help. Thank you in advance.