Skip to content

Commit

Permalink
Adjusted AGI Mouse calculations to account for new landscape screen p…
Browse files Browse the repository at this point in the history
…ositioning.
  • Loading branch information
lanceewing committed Apr 1, 2024
1 parent 42bdbcb commit 3d0c168
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,10 @@ private boolean updateAGIMouse(Vector2 touchXY, int button, boolean buttonDown)
// Landscape
agiY = 200 - Math.round((touchXY.y / viewportManager.getHeight()) * 200);
float agiWidth = (viewportManager.getHeight() * 1.32f);
float agiRatio = (agiWidth / 160);
float agiRatio = (agiWidth / 160);
float agiStart = (1920 / 2) - (agiWidth / 2);
agiX = Math.round((touchXY.x - agiStart) / agiRatio);
float adjustedCameraXOffset = (cameraXOffset * (agiWidth / 264));
agiX = (int)(Math.round(((touchXY.x + adjustedCameraXOffset) - agiStart) / agiRatio));
}

boolean agiMouseUpdated = false;
Expand Down

0 comments on commit 3d0c168

Please sign in to comment.