Skip to content

Commit

Permalink
Add shift + drag to rotate camera (#96)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarathkrishnan Ramesh <[email protected]>
  • Loading branch information
Sarath18 authored Jul 20, 2020
1 parent f351124 commit 179d80c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plugins/scene3d/Scene3D.cc
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,10 @@ void IgnRenderer::HandleMouseEvent()
// Pan with left button
if (this->dataPtr->mouseEvent.Buttons() & common::MouseEvent::LEFT)
{
this->dataPtr->viewControl.Pan(this->dataPtr->drag);
if (Qt::ShiftModifier == QGuiApplication::queryKeyboardModifiers())
this->dataPtr->viewControl.Orbit(this->dataPtr->drag);
else
this->dataPtr->viewControl.Pan(this->dataPtr->drag);
}
// Orbit with middle button
else if (this->dataPtr->mouseEvent.Buttons() & common::MouseEvent::MIDDLE)
Expand Down

0 comments on commit 179d80c

Please sign in to comment.