ball does not shoot to the left.

According to the position of the cursor its shooting from the center to the right. But when I bring the cursor to the left it shoot in the straight center direction. Please help`

void update()
{
if (Input.GetKeyDown(KeyCode.Mouse0))
		{
			Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
			float dist;
			if (m_ClickPlane.Raycast(ray, out dist))
			{

				Vector3 dir = (ray.GetPoint(dist) - gameObject.transform.position).normalized;

				GameObject ball = (GameObject)Instantiate (prefab, gameObject.transform.localPosition, Quaternion.identity);    				ball.GetComponent<Rigidbody>().AddForce( dir*10, ForceMode.Impulse);
			}        


		}
}

Here’s a fix. GameObjects aren’t allowed to have forced applied to them. Instead make it a rigidbody but make the rigidbody have no gravity so it doesn’t glitch around.