Object moves to 0,0,0? (Just want to know why it works)

pPos = GameObject.FindGameObjectWithTag (“Player”).transform.position;

		foreach (GameObject s in eSpawn.eSnake) 
		{
			if (bFireRate >= 0.75f)
			{
				Rigidbody bullet = Instantiate(eAi.Bullet, s.transform.position,
				                               Quaternion.LookRotation((pPos - s.transform.position))) as Rigidbody;
				bFireRate = 0.0f;
			}
		}
	}

So the above script works.

Whats odd is that the below script doesn’t:

pPos = eAi.Player.transform.position;


		foreach (GameObject s in eSpawn.eSnake) 
		{
			if (bFireRate >= 0.75f)
			{
				Rigidbody bullet = Instantiate(eAi.Bullet, s.transform.position,
				                               Quaternion.LookRotation((pPos - s.transform.position))) as Rigidbody;
				bFireRate = 0.0f;
			}
		}
	}

Isn’t it the same thing?

The eAi script is attached to a Main empty object in the world, which is then attached to a Empty object that is the child of the object that fires the bullet.

I use the child Empty object as a Sphere collier. Which contains the script that fires the bullet.

As far as I can tell, in the first script, you obtain pPos as world coordinates. In the script below, pPos is obtained from a child object where the location is 0,0,0 (i.e. zero offset to the parent’s world coordinates). However, you are using the local offset as world coordinates, hence the position at 0,0,0.