Instantiate help.

Hello. This is a script in my game that fires projectiles automatically. Currently, it fires one projectile directly forward, how can I make it fire an additional projectile 5 degrees to the right (as if I has changed the rotation of the object to (0, 5, 0)) at the same time? Thanks

var projectile : Rigidbody; 

static var speed = 40; 

function Start ()
 { 
   InvokeRepeating("LaunchProjectile", 1, 0.3);}
 }

function LaunchProjectile ()
{ 
  var instantiatedProjectile : Rigidbody = Instantiate( 
   projectile, transform.position, transform.rotation ); 
  instantiatedProjectile.velocity = 
   transform.TransformDirection( Vector3( 0, 0, speed ) ); 
  Physics.IgnoreCollision( instantiatedProjectile. collider, 
   transform.root.collider ); 
}

Hi there, Tyler.

I'd give this a go - Chuck this in at the end of your LaunchProjectile() function.

var instantiatedProjectile2 : Rigidbody = Instantiate(
projectile, transform.position,transform.rotation );

instantiatedProjectile2.transform.Rotate(transform.up*5);

instantiatedProjectile2.rigidbody.velocity=instantiatedProjectile2.forward*speed;

Physics.IgnoreCollision( instantiatedProjectile2.collider, 
   transform.root.collider ); 

Physics.IgnoreCollision( instantiatedProjectile2.collider, 
   instantiatedProjectile.collider ); 

There might be a more efficient way out there, but this seems to do the trick.