RayCast seems to sometimes hit mesh in Blender 2.69
I suspect that the problem is that the cast ray stops at end. In some cases, precision errors might cause the ray to stop before actually hitting the mesh. In my case, making the ray go twice as far solved the problem. Use

direction = empty_location - Vector(camera_location)
(ray_hit, obj, matrix, location, normal) = scene.ray_cast( camera_location, empty_location + direction )


for Blender 2.69