I have a terrain and entities(npc, house...).
I'm able to convert screen coordinates to world coordinates with the
glReadPixels(mousePosition.x, mousePosition.y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &z); // of course its not just that...
My character can move over that terrain without problem, but I'm not able to move when the mouse is over a big house and I try to move "behind" that house.
Do you know how I can avoid entities when converting screen coordinates to world coordinates ?