Hi guys,
I’ve seen a few similar questions to this around here but none of them solved my problem. I’m instantiating a series of items that I’d like to attach as children to another game object. The purpose of this is to affect the rotation of the parent object’s transform.
GameObject parentObj = Instantiate(items, new Vector3 (spawnPos.x + i*dist, spawnPos.y + j*dist, spawnPos.z + k*dist), Quaternion.identity) as GameObject;
parentObj.transform.Rotate(Vector3.right * Time.deltaTime);
However, I’m getting an error saying parentObj onflicts with a declaration in a child block.
Is anyone able to point out what I’m doing wrong? It would be really appreciated.
Thanks.