Prefab Instantiate Problem

Hi

I have a missile prefab that I instatiate according to code below (from a fighter):

function Fire () {
	if( ( Time.time > reloadTime + lastShot )  ( ammoCount > 0 ) ){
		var missile = Instantiate ( missilePrefab, 
											 ( transform.position - transform.up * 2 ),
											 Quaternion.identity	);
	}

My problems is that these missiles goes on global forward and not the fighter’s forward.

Have Fun
Bahadır Boge

Here is one of my scripts I use for a bullet

		var bullet1 = Instantiate(bulletPrefab, GameObject.Find("ShootingPoint").transform.position, Quaternion.identity);
		//bullet.rigidbody.drag = 2;
		bullet1.rigidbody.AddForce(transform.forward * 2000);

Dont know if it will help or not, hope it does.

Thanks for the reply but that sowant hwlp sorry.

?

Yes It was a stupid problem instead of Quaternion.identity I simply used transform.rotation:smile:.