I have one problem I need help with.
I'm trying to measure a distance between the origin point and hit point using ray_cast. Is it possible or do I have to use another tool?
ray_cast loc always return 1.0 or -1.0
cb = bpy.data.objects['Cube'] src = bpy.data.objects['src'] dst = bpy.data.objects['dst'] mw = cb.matrix_world mwi = mw.inverted() origin = mwi * src.matrix_world.translation dest = mwi * dst.matrix_world.translation direction = (dest - origin).normalized() hit, loc, norm, face = cb.ray_cast(origin, direction)
Thank you for your answer.