I can fire bullets with this code from a FPS and barrel.
q1)How do I fire bullet at the angle I am facing? I might shoot forward but
my gun barrel is facing in the ground or up in the air?
q2)To keep track of all these bullets I use an Array or List? What is the common way to do this?
public Rigidbody projectile;
Void Update ()
{
Rigidbody mybullet;
mybullet = Instantiate(projectile, transform.position, transform.rotation) as Rigidbody;
mybullet.AddForce(transform.forward * 1000);