Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 207aaa4eb7a..a028be14cc7 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -96,11 +96,13 @@ static void rna_Scene_ray_cast(Scene *scene, ReportList *reports, float ray_star
{
float dummy_dist_px = 0;
float ray_nor[3];
+ float dist;
sub_v3_v3v3(ray_nor, ray_end, ray_start);
+ dist = normalize_v3(ray_nor);
if (snapObjectsRayEx(scene, NULL, NULL, NULL, NULL, SCE_SNAP_MODE_FACE,
- ray_start, ray_nor,
+ ray_start, ray_nor, dist,
NULL, &dummy_dist_px, r_location, r_normal, SNAP_ALL))
{
*r_success = true;