Here is my code that I have right now but it doesn't seem to be working could anyone explain why?
float x = player.transform.position.x;
float y = player.transform.position.y;
Vector2 origin = new Vector2(x - 3f,y - 5f);
GameObject tempObj = Instantiate(lead, origin, Quaternion.identity) as GameObject;
tempObj.rigidbody2D.AddForce(new Vector2(500f, 0f));
↧