- Home /
Other; OP fixed
Rotating a Vector3 in Instantiation
Trying to make it so that an object will instantiate GameObjects, but in such a way that the position assigned to the new objects will be along the local axis of the instantiating object.
What I've got -
 void CubeType1 () {
         GameObject.Instantiate(holo_block, transform.position + (new Vector3(0f,0f,0f)), transform.rotation);
         GameObject.Instantiate(holo_block, transform.position + (new Vector3(0f,1f,0f)), transform.rotation);
         GameObject.Instantiate(holo_block, transform.position + (new Vector3(1f,0f,0f)), transform.rotation);
         GameObject.Instantiate(holo_block, transform.position + (new Vector3(1f,1f,0f)), transform.rotation);
     }
I have it set up so that it will create a 2x2 square of blocks, but yeah. I've explained my issue ._.
If you have a legitimate answer, I will greatly appreciate it :D
Answer by OBV10U3_NINJA · Sep 05, 2015 at 12:10 AM
Nevermind! Found the answer!
 GameObject.Instantiate(holo_block, transform.TransformPoint(new Vector3(0f,0f,0f)), transform.rotation);
Follow this Question
Related Questions
Controlling the update position of a cloned Gameobject C# 1 Answer
How do you choose where your object Instatntiates? 2 Answers
How to instanciate transform to element of a list?,How Get Transform of a instanciated Prefap 3 Answers
Instantiated projectile always floats up 1 Answer
gameObject are not referenced 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
               
 
			 
                