Why is GetComponent including another object?

So I’m making a very small game for learning purposes. And everything is coming along fairly well when I ran into this ‘gotcha’.

The game is a simple little two button shmup (think flappy bird with shooting). Well the player controller controls the bird’s flap and the creation of bullets. The bullets then grab their own rigidbody and apply force. Trouble is, when I tell it to grab the rigidbody it looks like it’s grabbing both the egg and the player’s rigid body, so that when the force is applied the player also gets the force applied to it.

Hrm…

anyway, here’s the code I’m looking at:

PLAYER

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

	public bool canShoot;

	public float canShootDelay;

	private float canShootTimer;

	public GameObject bullet;

	private Transform myTransform;;


	// Use this for initialization
	void Awake () {
		myTransform = transform;
	}

	void OnEnable () {
		canShoot = true;
	}


	void Shoot () {
		if (canShoot == true) {
			Instantiate(bullet, myTransform.position, myTransform.rotation); //Remove  when pooling is done
			canShoot = false;
		}
	}

	void TimerUpdate () {
		if (canShoot == false) {
			canShootTimer += Time.deltaTime;
		}
		if (canShootTimer > canShootDelay) {
			canShootTimer = 0f;
			canShoot = true;
		}

	}
}

BULLET

using UnityEngine;
using System.Collections;

public class Egg : MonoBehaviour {

	public float deathClock = 5;
	public float thrust;
	public Rigidbody rb;

	void Start () {
		//rb = gameObject.GetComponent<Rigidbody>(); Enable when done
	}

	void OnEnable() {
		rb = gameObject.GetComponent<Rigidbody>(); //remove when done
		rb.AddForce(transform.right * thrust);
	}

	void Update() {
		deathClock -= Time.deltaTime;
		if (deathClock < 0f) {
			Destroy (gameObject);
		}
	}

	void OnCollisionEnter() {

	}
}

(note, I will be pool the bullets, but for now am just doing destroy and instantiate)

I am thinking the eggis inside the bird and then pulls it when moving forward. You should create the egg outside the bird.