title: Move mouse without moving cursor
body: <p>I am trying to implement a free rotation system using the mouse to rotate a gameobject while holding down a key. Much like Planet Coaster's object rotation system.</p>
  
  <p>I currently have a script that works, the object is rotated around the normal axis corresponding to horizontal mouse movement, however because I am also moving the object to the mouse location, the object jumps to where the mouse is after I release the rotation key.</p>
  
  <p>Is there a way to either stop the actual cursor from moving while still getting a <code>Input.GetAxis("Mouse X")</code> value, or, move the cursor to coordinates so I can save the pre-rotation mouse position and set the cursor to that position when rotation is finished?</p>
  
  <p>I have found some Unity forum links that talk about using another GameObject whose transform is linked to the mouse position (<a href="https://answers.unity.com/questions/925711/how-can-i-move-the-mouse-without-moving-the-cursor.html" rel="nofollow noreferrer">https://answers.unity.com/questions/925711/how-can-i-move-the-mouse-without-moving-the-cursor.html</a>) and using it as a "software" cursor, but other threads that talk about this being a bad idea, however they all seem to be several years old and possibly out of date.</p>
  
  <p>For reference, my current object rotation code is:</p>
  
  <pre><code>void Update () 
  {
      // uses a raycast to get the mouse position on the terrain
      hitPoint = GetMousePosition(); 
  
      if (!Input.GetKey(RotationKey))
      {
          // if not holding the rotation key, move the building to the mouse position
          transform.position = hitPoint;
      }
      else
      {
          // rotate the building according to Mouse X position
          var _placementRotationY = -Input.GetAxis("Mouse X") * RotationSpeed * Time.deltaTime;
          transform.Rotate (transform.up, _placementRotationY);
      }
  
      // rest of method deals with placing object
  }
  </code></pre>