Skip to main content
deleted 35 characters in body
Source Link

Found the problem. It was needed to update the up vector during pitching.

void rotatePitch(double rotationAngle)
{
    glPushMatrix();{
        loadCameraDirections();{
        glRotatef(rotationAngle, dirRight.x, dirRight.y, dirRight.z);
        loadCameraDirections();
    } glPopMatrix();

    lookAt = position.repositionBy(dirForward.reverseVector());
    up = dirUp;
}

This solved the problem.

Found the problem. It was needed to update the up vector during pitching.

void rotatePitch(double rotationAngle)
{
    glPushMatrix();{
        loadCameraDirections();
        glRotatef(rotationAngle, dirRight.x, dirRight.y, dirRight.z);
        loadCameraDirections();
    }glPopMatrix();

    lookAt = position.repositionBy(dirForward.reverseVector());
    up = dirUp;
}

This solved the problem.

Found the problem. It was needed to update the up vector during pitching.

void rotatePitch(double rotationAngle)
{
    glPushMatrix(); {
        glRotatef(rotationAngle, dirRight.x, dirRight.y, dirRight.z);
        loadCameraDirections();
    } glPopMatrix();

    lookAt = position.repositionBy(dirForward.reverseVector());
    up = dirUp;
}

This solved the problem.

Source Link

Found the problem. It was needed to update the up vector during pitching.

void rotatePitch(double rotationAngle)
{
    glPushMatrix();{
        loadCameraDirections();
        glRotatef(rotationAngle, dirRight.x, dirRight.y, dirRight.z);
        loadCameraDirections();
    }glPopMatrix();

    lookAt = position.repositionBy(dirForward.reverseVector());
    up = dirUp;
}

This solved the problem.