# Why ray_cast is behaving like this?

Why the result of ray_cast function is giving me that result? The hit point should be Vector(0.5, -1.0, 0.0), but it is returning Vector(0.666..., -1.0, 0)

I have tried a lot of combinations to try to understand what is wrong, but no clue of what happens, so I decide to ask it here.

• Yes, it is the default cube. I double check and the two vector (v1 and v2) are what is showed in the image. – Fabio Nascimento Jun 17 '16 at 16:36
• Related blender.stackexchange.com/questions/50716/… You are ray casting from v1l in a v2l direction, it's not from-to. – batFINGER Jun 19 '16 at 13:40
• Thanks batFINGER... In fact the function cast_ray expects a initial vector and a direction, giving by (vector2 - vector1).normalized()... Now it works as expected. – Fabio Nascimento Jun 19 '16 at 21:33