hi, here is my bullet script
var Bullet : Transform; var ROF = 10.0; // Rate of fire in bullets/sec. private var timeout = 0.0;
function Update () { if (Input.GetButton ("Fire1") && Time.time >= timeout){ var bullet = Instantiate(Bullet,GameObject.Find("BulletSpawn").transform.position,Quaternion.identity); bullet.rigidbody.AddForce(transform.forward *1000); Destroy(bullet.gameObject, 2); timeout = Time.time + 1.0/ROF; } }
when I shoot, it will shoot the direction that im facing. so i can do a compleat circle and shoot fine. but when I shoot at an upward angle, the bullets go parallel to the ground. what should i do. i also get a error message saying
UnassignedReferenceExceprion: The variable Bullet of 'Shooting script' has not been assigned. but in the inspector, it is assigned. thanks for your time