I am trying to get world coordinates from the screen coordinates.
This is my process.
Get the Screen coordinates from the mouse click
Multiply projection with view matrix
FinalMatrix = projectionMatrix * viewMatrix;
3)Inverse the matrix
finalMatrix = glm::inverse(finalMatrix);
Get the position in world coordinates
glm::vec4 worldPosition = finalMatrix * glm::vec4(screenPoint.x - 1920.0 / 2.0, -1.0 * (screenPoint.y - 1080.0 / 2.0) , screenPoint.z, 1.0);
But the final position does not match the world position of mouse click