|
|
|
|
@ -96,6 +96,11 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(
|
|
|
|
|
speedScale *= gSettings.cameraFastMoveSpeed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m_inMoveMode || m_inOrbitMode || m_inRotateMode || m_inZoomMode)
|
|
|
|
|
{
|
|
|
|
|
m_totalMouseMoveDelta += (QPoint(currentMousePos.m_x, currentMousePos.m_y)-QPoint(previousMousePos.m_x, previousMousePos.m_y)).manhattanLength();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((m_inRotateMode && m_inMoveMode) || m_inZoomMode)
|
|
|
|
|
{
|
|
|
|
|
Matrix34 m = AZTransformToLYTransform(viewportContext->GetCameraTransform());
|
|
|
|
|
@ -343,11 +348,15 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
shouldCaptureCursor = true;
|
|
|
|
|
// Record how much the cursor has been moved to see if we should own the mouse up event.
|
|
|
|
|
m_totalMouseMoveDelta = 0;
|
|
|
|
|
}
|
|
|
|
|
else if (state == InputChannel::State::Ended)
|
|
|
|
|
{
|
|
|
|
|
m_inZoomMode = false;
|
|
|
|
|
m_inRotateMode = false;
|
|
|
|
|
// If we've moved the cursor more than a couple pixels, we should eat this mouse up event to prevent the context menu controller from seeing it.
|
|
|
|
|
shouldConsumeEvent = m_totalMouseMoveDelta > 2;
|
|
|
|
|
shouldCaptureCursor = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|