public void Update(int pressedButton) { #region Aim camera Pointer position = new Pointer(); Import.GetCursorPos(ref position); int difX = FormMain.FormPos.X + 512 - position.x; int difY = FormMain.FormPos.Y + 384 - position.y; if (position.y < 384) { pitch -= rotationSpeed * difY; } else if (position.y > 384) { pitch += rotationSpeed * -difY; } if (position.x < 512) { yaw += rotationSpeed * -difX; } else if (position.x > 512) { yaw -= rotationSpeed * difX; } UpdateDirVector(); CenterMouse(); #endregion Look(); }
public static extern void GetCursorPos(ref Pointer point);