Gems/EMotionFX/Code/EMotionFX/Rendering/Common/OrthographicCamera.cpp
void OrthographicCamera::ProcessMouseInput(int32 mouseMovementX, int32 mouseMovementY, bool leftButtonPressed, bool middleButtonPressed, bool rightButtonPressed, uint32 keyboardKeyFlags)
    {
        MCORE_UNUSED(keyboardKeyFlags);

        // is right mouse button pressed?
        // zoom camera in or out
        if (leftButtonPressed == false && rightButtonPressed && middleButtonPressed == false)
        {
            const float distanceScale = m_currentDistance * 0.002f;
            m_currentDistance += (float)-mouseMovementY * distanceScale;
        }

        // is middle (or left+right) mouse button pressed?
        // move camera forward, backward, left or right
        if ((leftButtonPressed == false && rightButtonPressed == false && middleButtonPressed) ||
            (leftButtonPressed && rightButtonPressed && middleButtonPressed == false))
        {
            m_positionDelta.SetX((float)mouseMovementX);
            m_positionDelta.SetY((float)mouseMovementY);
        }
    }
// process input and modify the camera attributes
process input and modify the camera attributes
process input and modify the camera attributes
void OrthographicCamera::ProcessMouseInput(int32 mouseMovementX, int32 mouseMovementY, bool leftButtonPressed, bool middleButtonPressed, bool rightButtonPressed, uint32 keyboardKeyFlags)
    {
        MCORE_UNUSED(keyboardKeyFlags);
        if (leftButtonPressed == false && rightButtonPressed && middleButtonPressed == false)
        {
            const float distanceScale = m_currentDistance * 0.002f;
            m_currentDistance += (float)-mouseMovementY * distanceScale;
        }
        if ((leftButtonPressed == false && rightButtonPressed == false && middleButtonPressed) ||
            (leftButtonPressed && rightButtonPressed && middleButtonPressed == false))
        {
            m_positionDelta.SetX((float)mouseMovementX);
            m_positionDelta.SetY((float)mouseMovementY);
        }
    }
void OrthographicCamera :: ProcessMouseInput ( int32 mouseMovementX , int32 mouseMovementY , bool leftButtonPressed , bool middleButtonPressed , bool rightButtonPressed , uint32 keyboardKeyFlags ) { MCORE_UNUSED ( keyboardKeyFlags ) ; if ( leftButtonPressed == false && rightButtonPressed && middleButtonPressed == false ) { const float distanceScale = m_currentDistance * 0.002f ; m_currentDistance += ( float ) - mouseMovementY * distanceScale ; } if ( ( leftButtonPressed == false && rightButtonPressed == false && middleButtonPressed ) || ( leftButtonPressed && rightButtonPressed && middleButtonPressed == false ) ) { m_positionDelta . SetX ( ( float ) mouseMovementX ) ; m_positionDelta . SetY ( ( float ) mouseMovementY ) ; } }
process input and modify the camera attributes
process input and modify the camera attributes
// is right mouse button pressed? // zoom camera in or out // is middle (or left+right) mouse button pressed? // move camera forward, backward, left or right