Addforce not applying

Ok, so I’ve created a script that instantiates a bullet near the character, however when I set the rigidbody of the bullet to be kinematic the force doesn’t apply and it just sits there (my game has no gravity). The reason why I want it to be kinematic is because otherwise it doesn’t collide with objects properly and has a chance to ghost through them.

This is the code I’m using:

	public GameObject Missile = null;
	public GameObject MissileS = null;
	public GameObject MissileH = null;
	public GameObject Launcher = null;
	public GameObject Launcher2 = null;
	public GameObject Launcher3 = null;
	public GameObject LauncherH = null;
	public float missileSpeed = 500.0f;
	public float fireRate = 0.1f;
	public float nextFire = 0.0f;


	// Update is called once per frame

	void Update () {
		if (Input.GetButton("Fire1") && Time.time > nextFire)
		{
			nextFire = Time.time + fireRate;
			GameObject launch = GameObject.Instantiate(MissileS, Launcher.transform.position, transform.rotation) as GameObject;
			launch.rigidbody.AddRelativeForce(Vector3.left * missileSpeed * 2);

			GameObject launchr = GameObject.Instantiate(MissileS, Launcher2.transform.position, transform.rotation) as GameObject;
			launchr.rigidbody.AddRelativeForce(Vector3.left * missileSpeed * 2);
		}
		if (Input.GetButtonDown("Fire2") && Time.time > nextFire)
		{
			nextFire = Time.time + fireRate;
			GameObject launchs = GameObject.Instantiate(Missile, Launcher3.transform.position, transform.rotation) as GameObject;
			launchs.rigidbody.AddRelativeForce(Vector3.left * missileSpeed * 3);
		}
		if (Input.GetButtonDown("Fire3") && Time.time> nextFire)
				{
			nextFire = Time.time + fireRate;
				GameObject launchH = GameObject.Instantiate(MissileH, Launcher3.transform.position, transform.rotation) as GameObject;
			launchH.rigidbody.AddRelativeForce(Vector3.left * missileSpeed * 3);
				}
	
	}

In addition, setting the bullet’s Rigidbody’s Collision Detection to continous or continous dynamic instead of discrete will do a lot to help.

The docs actually use bullets as examples of when you want to change the collision detection settings.

Kinematic objects don’t react to an application of force. Instead of making it Kinematic, work to solve your ghosting issue. There are lots of posts on how to mitigate this issue. Decreasing the FixedTimestep usually has the most impact (at the cost of more CPU going to physics), but there are a number of other approaches.

Also do operations with Rigidbodies inside FixedUpdate, not in Update. Check this answer: