I think mouse_pos3d works like this:

Code:
//
				
				vec_set( pos1 , vector(mouse_pos.x,mouse_pos.y,0) );
				vec_for_screen (pos1, camera);
				
				vec_set( pos2 , vector(mouse_pos.x,mouse_pos.y,50000) ); // should be a big value       		
				vec_for_screen (pos2, camera);
			
				c_trace (pos1, pos2, IGNORE_CONTENT);



and mouse_dir3D probably points towards to this hit point from camera position.


Free world editor for 3D Gamestudio: MapBuilder Editor