Hello forum,
I want to use screenToWorld() to interact with 3D objects. So how can I get the z coordinate of the argument ofVec3f ScreenXYZ?
I expected this function to calculate a 3D coordinate, given a 2D coordinate of screen such as mouseX and mouseY. Of course it’s impossible to specify one 3D coordinate from a 2D coordinate. So I guessed there were “magical” calculations behind, but there is a simple transformation with a matrix.
I checked out the advanced3dExample, but I didn’t get it.
So, anyway, how can I get the Z?