I'm getting weird results from unprojecting positions from the camera in 3D with
camera.unproject_position( pos_vec3 ). I'm unprojecting the vertices from a cube mesh I have in my scene. Everything seems to work fine when I'm outside the mesh and all its vertices are within view, but when I'm inside the mesh the unprojections are weird.
For example, when looking upward so the bottom face is totally outside the screen below the camera's visibility (as in the image below), unprojecting the vertices from the bottom face gives me Y values that don't make sense:
>>> [(-657, 4191), (1211, 224), (480, 401), (-973, -583)]
The screen is 800 pixels tall, so I'd suppose all the Y values would be greater than 800.
Why would the camera be unprojecting them like that?