- Home /
 
               Question by 
               Muzz5 · May 30, 2011 at 05:17 AM · 
                rotationinstantiaterotateaxis  
              
 
              Instantiate a rotated object
How do you instantiate an object rotated 90 is the y-axis?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Muzz5 · May 30, 2011 at 08:48 AM
I did it with variables, and
 pieceRotation = Quaternion.AngleAxis(270, Vector3.up);
 Instantiate (transform.position, pieceRotation);
Answer by Eric5h5 · May 30, 2011 at 06:23 AM
Instantiate (object, position, Quaternion.Euler(0, 90, 0));
Answer by hellcats · May 30, 2011 at 05:46 AM
Just Instantiate it and then set its rotation after it is created.
That will not work in my scenario, sorry. I need to do it based on quaternions.
Answer by testure · May 30, 2011 at 06:17 AM
instantiatedObject.transform.rotation = Quaternion.Euler(angleX, angleY, angleZ);
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
               
 
			 
                