Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RotateManipulator.cpp
bool RotateManipulator::Hit(Camera* camera, int32 mousePosX, int32 mousePosY)
    {
        // check if camera exists
        if (camera == nullptr)
        {
            return false;
        }

        // update the bounding volumes
        UpdateBoundingVolumes();

        // shoot ray ar the mouse position
        MCore::Ray mousePosRay  = camera->Unproject(mousePosX, mousePosY);

        // check if mouse ray hits the outer sphere of the manipulator
        if (mousePosRay.Intersects(m_outerBoundingSphere))
        {
            return true;
        }

        // return false if manipulator is not hit
        return false;
    }
// check if the manipulator is hit by the mouse.
check if the manipulator is hit by the mouse.
check if the manipulator is hit by the mouse .
bool RotateManipulator::Hit(Camera* camera, int32 mousePosX, int32 mousePosY)
    {
        if (camera == nullptr)
        {
            return false;
        }
        UpdateBoundingVolumes();
        MCore::Ray mousePosRay  = camera->Unproject(mousePosX, mousePosY);
        if (mousePosRay.Intersects(m_outerBoundingSphere))
        {
            return true;
        }
        return false;
    }
bool RotateManipulator :: Hit ( Camera * camera , int32 mousePosX , int32 mousePosY ) { if ( camera == nullptr ) { return false ; } UpdateBoundingVolumes ( ) ; MCore :: Ray mousePosRay = camera -> Unproject ( mousePosX , mousePosY ) ; if ( mousePosRay . Intersects ( m_outerBoundingSphere ) ) { return true ; } return false ; }
check if the manipulator is hit by the mouse.
check if the manipulator is hit by the mouse .
// check if camera exists // update the bounding volumes // shoot ray ar the mouse position // check if mouse ray hits the outer sphere of the manipulator // return false if manipulator is not hit