determining mouse pos in 3D space