Instantiate and rotate a GameObject?

Hi all!

I am trying to brainstorm ways to rotate a GameObject that I am instantiating with mouse clicks…heres how that works:

var particle : GameObject;
bbox = GameObject.FindWithTag("Respawn");

function Update () 
{
	if (Input.GetButtonDown ("Fire1")) 
	{
		var ray = Camera.main.ScreenPointToRay (Input.mousePosition); // Construct a ray from the current mouse coordinates
		var hit : RaycastHit;

				 if (Physics.Raycast (ray, hit))
		 {
			Debug.DrawLine (Camera.main.transform.position, hit.point, Color.red);
			Debug.Log(hit.point);
			Instantiate (bbox, hit.point, Quaternion.identity);
		} 
	}
}

Can’t seem to figure out how to rotate it on the instantiation…it needs to be visible to the user. Should I yield until mouse release and then use MouseOrbit before the mouse is released? Any advice would be awesome!

not entierly sure what you want but i think you just need to create a reference to the instantiated transform and then you can rotate it.

I have the same question, just can’t get it to work. Soo many tutorials on insantiating, no one talks about the rotation.

So, what would Instantiate (bbox, hit.point, Quaternion.identity); look like if I wanted to rotate it around its Y-axis ??