Flip orbit camera vertical drag to iPhone-style
Drag down now raises the camera so the galaxy shifts down with the cursor (content follows finger). Horizontal was already correct (drag right moves the scene right). Matches the feel of panning a map on iOS.
This commit is contained in:
@@ -77,7 +77,10 @@ pub fn orbit_camera_control(
|
||||
if mouse_input.pressed(MouseButton::Left) && !cursor_over_ui {
|
||||
for event in mouse_motion.read() {
|
||||
orbit.yaw -= event.delta.x * ORBIT_ROTATE_SENSITIVITY;
|
||||
orbit.pitch -= event.delta.y * ORBIT_ROTATE_SENSITIVITY;
|
||||
// Vertical is flipped relative to a "trackball" feel so the content
|
||||
// follows the finger (iPhone-style): drag down → camera rises →
|
||||
// scene appears to shift down with the cursor.
|
||||
orbit.pitch += event.delta.y * ORBIT_ROTATE_SENSITIVITY;
|
||||
}
|
||||
} else {
|
||||
mouse_motion.clear();
|
||||
|
||||
Reference in New Issue
Block a user