Halp!
I’m trying to instantiate a hat prefab and put it on my character’s head. To do this, I have a script on the head-bone, which instantiate my hat and sets itself as parent with
instance.transform.parent = transform;
All well and good except now my new instance gets a set of completely random local coordinates and rotation, so it ends up pretty much wherever it feels like! And even though I have a reference to it in my code, I can’t change its position. I know I can access it, since I can destroy it, but doing the below has NO impact:
GameObject lolresurs = (GameObject)Instantiate(Resources.Load("strawboaterzero"), Vector3.zero, Quaternion.identity);
lolresurs.transform.parent = transform;
lolresurs.transform.position = Vector3.zero;
lolresurs.transform.rotation = Quaternion.identity;
Any ideas what I’m doing wrong?