2d top down shotgun shooting

hi, i would like to make shotgun shoot few bullets in fixed different directions.
in engine i placed few empty gameobjects and fixed their position and rotation acording to player gameobject.
what it does now: bullets instantiate in position and rotation i want them to go, but they dont spread based on their rotation ,they go all in same direction while looking at other directions when fired.
i hope i was clear enough.
how could i fix this?

  GameObject tempMetak, tempMetak1, tempMetak2;
        tempMetak = Instantiate(metak, pucac.transform.position, pucac.transform.rotation) as GameObject;
        tempMetak1 = Instantiate(metak, pucac1.transform.position, pucac1.transform.rotation) as GameObject;
        tempMetak2 = Instantiate(metak, pucac2.transform.position, pucac2.transform.rotation) as GameObject;

        Rigidbody2D tempRB, tempRB1, tempRB2;
        tempRB = tempMetak.GetComponent<Rigidbody2D>();
        tempRB.AddForce(transform.up * speed);

        tempRB1 = tempMetak1.GetComponent<Rigidbody2D>();
        tempRB1.AddForce(transform.up * speed);

        tempRB2 = tempMetak2.GetComponent<Rigidbody2D>();
         tempRB2.AddForce(transform.up * speed);

You have supplied “transform.up” as the direction in which to apply force.

Try changing one to see if this is right for ya.

tempRB2.AddForce(tempRB2.transform.right * speed);
  • This assumes that “right = forward direction”.
tempRB2.AddForce(tempRB2.transform.up * speed);

thank you for response, i appreciate your help. i got it working by adding tempRB before transform up in existing code.

however i now have strange problem.
one of the 3 bullets always appears invisible ingame even though it has sprite renderer and rigidbody checked and
it is visible in scene view