Continious force

Hi! I would like to create a kind of an FPS rocket launcher, where an instantiated rocket would fly forever without any change in speed and/or direction unless someo bject touches it. For this purpose I suppose collider and rigidbody components are required.

I tried a simple script, but through time, the rocket falls (I presume it’s because the tick is automatically put near to “use gravity” statement in RigidBody component).

Could you please suggest how to make it work as intended? Here’s the script:
using UnityEngine;
using System.Collections;

public class frost_shoot3 : MonoBehaviour {


	
	public GameObject bullet_prefab;
	public float bulletImpulse = 20f;
	
	public Rigidbody g2;
	
	GameObject theBullet;
	Camera cam;
	
	
	
	void Start()
	{
		cam = Camera.main;
	}
	void Update () {
		if (!Input.GetButton ("Fire2")) {
			if (Input.GetButtonDown ("Fire1")) {
				theBullet = (GameObject)Instantiate (bullet_prefab, cam.transform.position + cam.transform.forward, cam.transform.rotation);
				theBullet.transform.parent = this.transform;
				theBullet.GetComponent<BoxCollider> ().enabled = false;
			}
			
			if (Input.GetButtonUp ("Fire1")) {
				if (theBullet != null) {
					theBullet.transform.parent = null;
					theBullet.GetComponent<BoxCollider> ().enabled = true;
					// You do not need to store a reference to the rigidbody component of your bullet if you are not using it elsewhere
					g2 = theBullet.AddComponent<Rigidbody> ();
					theBullet.rigidbody.AddForce (cam.transform.forward * bulletImpulse, ForceMode.Force);
					theBullet.rigidbody.velocity = constantForce;
					
					
				}
			}
		}
	}
}

the rocket falls (I presume it’s because the tick is automatically put near to “use gravity” statement in RigidBody component)

Then uncheck that property in the component, or set it to false in code: