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);