Skip to content
Prev Previous commit
Next Next commit
Make pitch change of globe using right mouse work as it did before DP…
…I scaling changes. Moving the mouse down should increase the pitch, so it appears that the top of the globe is rotated away from the eye.
  • Loading branch information
gbburkhardt committed Jan 10, 2024
commit 1d9f490daf36458a00a541cc1cd67ac2ee6f6b94
6 changes: 3 additions & 3 deletions src/gov/nasa/worldwind/awt/BasicViewInputHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,17 @@ public boolean inputActionPerformed(AbstractViewInputHandler inputHandler,
return false;
}

// 'mouseEvent' is in GL surface coords, (0,0) in lower left of canvas
// Make down mouse movement increase the pitch.
Point movement = ViewUtil.subtract(point, lastPoint);
int headingInput = movement.x;
int pitchInput = movement.y;
int pitchInput = -movement.y;
if (mouseDownPoint == null)
mouseDownPoint = lastPoint;
Point totalMovement = ViewUtil.subtract(point, mouseDownPoint);
int totalHeadingInput = totalMovement.x;
int totalPitchInput = totalMovement.y;



ViewInputAttributes.DeviceAttributes deviceAttributes =
getAttributes().getDeviceAttributes(ViewInputAttributes.DEVICE_MOUSE);

Expand Down