Skip to content

Commit

Permalink
Touchscreen: Allow camera movement while digging without touch_use_cr…
Browse files Browse the repository at this point in the history
…osshair
  • Loading branch information
grorp committed Mar 1, 2024
1 parent bb7f57b commit 00a3e6b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/gui/touchscreengui.cpp
Expand Up @@ -832,14 +832,12 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
m_move_pos = touch_pos;
m_pointer_pos[event.TouchInput.ID] = touch_pos;

if (m_tap_state == TapState::None || m_draw_crosshair) {
// adapt to similar behavior as pc screen
const double d = g_settings->getFloat("touchscreen_sensitivity", 0.001f, 10.0f) * 3.0f;
// adapt to similar behavior as pc screen
const double d = g_settings->getFloat("touchscreen_sensitivity", 0.001f, 10.0f) * 3.0f;

// update camera_yaw and camera_pitch
m_camera_yaw_change -= dir_free.X * d;
m_camera_pitch_change += dir_free.Y * d;
}
// update camera_yaw and camera_pitch
m_camera_yaw_change -= dir_free.X * d;
m_camera_pitch_change += dir_free.Y * d;
}
}

Expand Down

0 comments on commit 00a3e6b

Please sign in to comment.