diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-12 11:37:56 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-12 12:09:00 +0300 |
commit | c6c223ade6470e7a9b61ea4a4a3ab6ed62abe79d (patch) | |
tree | fb9323466d1c45ff6a99db96fc649fe3e6374249 /source/blender/editors/space_view3d/view3d_walk.c | |
parent | 90250f856817b68f29924be8a60152ec3a2486a8 (diff) |
Fix T47164: [Scene.raycast] - True result when it should be False.
We cannot use FLT_MAX as initi distance for raycast...
Renamed TRANSFORM_DIST_MAX_RAY to BVH_RAYCAST_DIST_MAX, moved it into BLI_kdopbvh,
and use in RNA raycast callbacks (and all other places using that API).
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_walk.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_walk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index 8b3ea2a1fee..022b305e5ac 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -33,6 +33,7 @@ #include "BLI_math.h" #include "BLI_blenlib.h" +#include "BLI_kdopbvh.h" #include "BLI_utildefines.h" #include "BKE_context.h" @@ -410,7 +411,7 @@ static bool walk_floor_distance_get(bContext *C, RegionView3D *rv3d, WalkInfo *w float dvec_tmp[3]; bool ret; - *r_distance = TRANSFORM_DIST_MAX_RAY; + *r_distance = BVH_RAYCAST_DIST_MAX; copy_v3_v3(ray_start, rv3d->viewinv[3]); @@ -441,7 +442,7 @@ static bool walk_ray_cast(bContext *C, RegionView3D *rv3d, WalkInfo *walk, float float mat[3][3]; /* 3x3 copy of the view matrix so we can move along the view axis */ bool ret; - *ray_distance = TRANSFORM_DIST_MAX_RAY; + *ray_distance = BVH_RAYCAST_DIST_MAX; copy_v3_v3(ray_start, rv3d->viewinv[3]); copy_m3_m4(mat, rv3d->viewinv); |