title: Shooting a bullet out of a point in a rotating circle using C# within Unity
body: <p>I have a circle object that can be rotated and moved around on a 2D plane. There is a point on the circle where the object must be fired from. I'm currently using this script.</p>
  
  <pre><code> var newBullet = GameObject.Instantiate(bulletPrefab) as Bullet;
      newBullet.transform.position = transform.position;
  </code></pre>
  
  <p>and then in the bullet script I'm using</p>
  
  <pre><code>void Fire()
  {
      rigidbody2D.AddForce(Vector3.right * 100);
  
  }
  </code></pre>
  
  <p>At the moment the bullet is only shooting and travelling in the right direction. What can I use to make the bullet fire out of the circle with the applied rotation?</p>
  
  <pre><code>  public void ApplyRotation(float turnInput)
  {
      //TODO: Complete this code
  
    if (turnInput == -1)
    {
        transform.Rotate(Vector3.forward, Time.deltaTime * 180);
    }
    if (turnInput == 1)
    {
        transform.Rotate(Vector3.forward, Time.deltaTime * -180);
    }
  }
  </code></pre>
  
  <p>This is how I rotate the circle player.</p>