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).
This commit is contained in:
@@ -299,7 +299,7 @@ static bool cast_ray_highpoly(
|
||||
|
||||
hits[i].index = -1;
|
||||
/* TODO: we should use FLT_MAX here, but sweepsphere code isn't prepared for that */
|
||||
hits[i].dist = 10000.0f;
|
||||
hits[i].dist = BVH_RAYCAST_DIST_MAX;
|
||||
|
||||
/* transform the ray from the world space to the highpoly space */
|
||||
mul_v3_m4v3(co_high, highpoly[i].imat, co);
|
||||
|
||||
Reference in New Issue
Block a user