I have a problem. I use the intersect_ray_tri() function to find the intersection between a ray and a mesh. Somethimes it works perfectly fine and somethimes it only finds one of the two intersecton or none of the intersections. It seems like the problem has something do do with the angle it hits the mesh. I'm not sure if it is a bug or not. I really appreciate all your help.
http://pasteall.org/blend/index.php?id=44571 Open the .blend. You see a sphere emtpy. This defines the direction whichin the ray goes with the camera origin as a base point. When jumping one frame forwards/backward the script gets executed. If it finds an intersection it will add an empty to the location of the intersection(this is just for debugging now). Try do move the empty(make sure it stays behind on of the two meshes, as othervise it's clear it will not find an intersection) and you will see somethimes it finds both, somethimes just one one somethimes none of the intersections.