title: Get new child object postion based on parent transform
body: <p>I need a function that calculates new OffSet position that takes 2 arguments old offset and rotation value (the rotation is only a float because the rotation is only happening around 1 axis always. I managed to find how to calculate facing direction based on rotation but I am having problem with offset. Found same topics like this but no answer except making child objects, which is not a good way. So a code like this</p>
  <pre><code>var offset = new Vector3(0f,5f,10f);
  var rotationY = 90f;
  var newOffset = NeededFunction(offset, rotationY);
  </code></pre>
  <p>The newOffset should be a Vector3 (10f,5f,0f). This is the funtion to calculate the facing direction</p>
  <pre><code> private Vector3 GetFacingDirection()
  {
      var rotY = transform.eulerAngles.y;
      var vector = Quaternion.AngleAxis(rotY, Vector3.up)
          * Vector3.forward;
      return vector;
  }
  </code></pre>