Instantiate with a specific rotation

Hi. I want to Instantiate an object with a specific rotation.

This is what I do now:

var prefab : Rigidbody = Instantiate (RealAmmo, spawnPos.position, spawnPos.rotation);

and this is what I want to do:

var prefab : Rigidbody = Instantiate (RealAmmo, spawnPos.position, SET MY OWN ROTATION);

Anyone have any suggestions?

1 Answer

1

Supply the appropriate quaternion; probably easiest to use Quaternion.Euler().