title: Why does using c++ Input class when I am trying to simulate mouse move in game leads to filck-move into ground ( in game ofc )?
body: <p>I wanted to make "bot" that would play simple 3D games. I ve started with minecraft. No matter how much value of x or y is incremented/decremented it causes terrible flick move with eventually spining when i used loops )into ground and nothing more ( i tried to delete flag MOUSEEVENTF_ABSOLUTE  ) . I know that game centers cursor in the middle of screen and then reads the difference when its moving and centers cursor again. I want to know what is wrong with that method or how to do it properly, thanks.</p>
  
  <pre><code>int main(){
      Sleep(3000);
  
      POINT point = showCoords();
      MouseMove(point.x + 0.1, point.y);
      Sleep(20);                                                                                      
      }
  
  POINT getCords() {
  
      POINT point;
  
      if (GetCursorPos(&amp;point))
          std::cout &lt;&lt; point.x &lt;&lt; "," &lt;&lt; point.y &lt;&lt; "\n";
  
      return point;                                                                                       
  }
  
  void MouseMove(int x, int y){
      double fScreenWidth = ::GetSystemMetrics(SM_CXSCREEN) - 1;
      double fScreenHeight = ::GetSystemMetrics(SM_CYSCREEN) - 1;
      double fx = x * (65535.0f / fScreenWidth);
      double fy = y * (65535.0f / fScreenHeight);
      INPUT Input = { 0 };
      Input.type = INPUT_MOUSE;
      Input.mi.dwFlags = MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE;
      Input.mi.dx = fx;
      Input.mi.dy = fy;
      ::SendInput(1, &amp;Input, sizeof(INPUT));                                                          
  }
  </code></pre>