18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 12:44:59 +01:00

Merge pull request #313 from miloszunio/pr/perspective-pan

feat(editor): the wheel held and dragged pans the perspective view too, the ground under the cursor going along with it
This commit is contained in:
maj00r
2026-11-11 15:06:32 +01:00
committed by GitHub
2 changed files with 17 additions and 3 deletions

View File

@@ -225,6 +225,7 @@ class editor_mode : public application_mode, private editor_track::observer
double m_ortho_pitch{0.0};
bool m_ortho_pan{false};
glm::dvec2 m_ortho_pan_cursor{0.0};
double m_pan_metres{0.0}; // of the ground to a pixel, held by the panning in the perspective view
void ortho_pan_to(double const Horizontal, double const Vertical);
void ortho_pan_stop();
// camera fly-mode (right mouse button held); used to flush motion when it's released