title: Move Object Using Raycast
body: <p>I am trying to move the y position of a UI element in it's local space by clicking and dragging with the SteamVR controller and a raycast. I am getting what appear to me to be unpredictable results.</p>
  
  <p>I am trying to get the position of the raycast at the start of the drag and move it the distance between where it is and where it was started while dragging.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>if (hit.transform.name == "Content" &amp;&amp; scrollSet == false)
  {
      content = hit.transform;
      scrollSet = true;
      scrollPos = hit.transform.position ;
  }
  
  if (scrollSet == true)
  {
      if (rController.triggerPressed)
      {
          y = hit.transform.position.y - scrollPos.y;
          content.transform.localPosition = new Vector3(content.transform.localPosition.x,  content.localPosition.y + y, content.transform.localPosition.z);
      }
      else
      {
          scrollSet = false;
      }
  }
  </code></pre>