Remaining bullets ridgidbody bounses of after the enemy has been destroyed.


In my game you control a ship that can fire at enemy ships, thus destroying them. When the bullet hits the enemy it is destroyed in code, and instanciates an explosion particle effect. The bullet, upon impact is also destroyed.
So far, so good but the problem is that if I fire another bullet that ‘hits’ before the particle effect is done playing it bounces off.
I have tried removing the particle effect and then It works the way I want it so I suspect it’s because the bullet collides with the particles collider? If so, how can i disable the particles collider? or should/must I use the collision matrix?

My code looks like this:
The bullet

if (Input.GetKeyDown (KeyCode.Space)) 
			TEMProtation = new Vector3 (90, 0, 0);
			bulletStart = new Vector3 (myTransform.position.x, myTransform.position.y, myTransform.position.z + 1);		//bullet spawnPos
			bulletClone = spawn.ExSpawnObject(bullet,bulletStart,Quaternion.Euler(TEMProtation));

The collision:

void OnCollisionEnter(Collision col)
		if (col.gameObject.tag == "enemy") 
			Destroy (col.gameObject);
			Destroy (this.gameObject);

The particle effect is instantiated from the enemies OnDisable() event:

public void OnDisable()
		spawn.SpawnObject (explosionPrefab, myTransform.position, Quaternion.identity);
		sound.PlaySound (4);

Check your explosionPrefab to make sure it doesn’t have a collider, first.

Also, are you sure you want your bullet to have a RigidBody? If you just have a collider on it and have it be a trigger, it would pass through any object that doesn’t destroy it by default.

I think I solved this. The particle itself has a script attached called “Explosion physics force” Which seems to add force to the rigidbody. I disabled it, and now it works.