title: Shooting with a shotgun 2D Top-down Shooter
body: <p>I'm trying to make shooting with a shotgun, I have already made shooting with one bullet. Code:</p>
  <pre><code>            Vector2 shootingDirection = new Vector2(joystick.Horizontal, joystick.Vertical);
              shootingDirection.Normalize();           
              if (shootingDirection != new Vector2(0, 0))
              {
                  if(isShotGun) ShotGunShoot(shootingDirection);
                  GameObject bullet = Instantiate(bulletPrefab, crossHair.transform.position, Quaternion.identity);
                  bullet.transform.Rotate(0.0f, 0.0f, Mathf.Atan2(shootingDirection.y, shootingDirection.x) * Mathf.Rad2Deg);
                  bullet.GetComponent&lt;Rigidbody2D&gt;().AddForce(shootingDirection * 10f, ForceMode2D.Impulse);
              }
  
          }
  </code></pre>
  <p>But I'm just trying to create two other bullets with a slight deviation from the main one, so that it looks like a fraction, but it does not work correctly. Code:</p>
  <pre><code>    private void ShotGunShoot(Vector2 dir)
      {
          GameObject shotGun = Instantiate(bulletPrefab, crossHair.transform.position, Quaternion.identity);
          shotGun.transform.Rotate(0.0f, 0.0f, Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg - 30f);
          shotGun.GetComponent&lt;Rigidbody2D&gt;().AddForce((dir + new Vector2(-.3f, 0f)) * 10f, ForceMode2D.Impulse);
     
          shotGun = Instantiate(bulletPrefab, crossHair.transform.position, Quaternion.identity);
          shotGun.transform.Rotate(0.0f, 0.0f, Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg + 30f);
          shotGun.GetComponent&lt;Rigidbody2D&gt;().AddForce((dir+ new Vector2(.3f, 0f)) * 10f, ForceMode2D.Impulse);
      }
  </code></pre>
  <p>As it should be</p>
  <p><a href="https://i.stack.imgur.com/aSY5u.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aSY5u.jpg" alt="" /></a></p>
  <p>Here it is now</p>
  <p><a href="https://i.stack.imgur.com/Lfz8U.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lfz8U.gif" alt="" /></a></p>
  <p>Thanks for help!</p>