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/gameengine/Ketsji/KX_RayCast.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_RayCast.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_RayCast.cpp b/source/gameengine/Ketsji/KX_RayCast.cpp
index 7b13cb1fd7d..ea17e0b3dd6 100644
--- a/source/gameengine/Ketsji/KX_RayCast.cpp
+++ b/source/gameengine/Ketsji/KX_RayCast.cpp
@@ -77,6 +77,14 @@ bool KX_RayCast::RayTest(KX_IPhysicsController* ignore_controller, PHY_IPhysicsE
if (callback.RayHit(info, result_point, result_normal))
return true;
+ // There is a bug in the code below: the delta is computed with the wrong
+ // sign on the face opposite to the center, resulting in infinite looping.
+ // In Blender 2.45 this code was never executed because callback.RayHit() always
+ // returned true, causing the ray sensor to stop on the first object.
+ // To avoid changing the behaviour will simply return false here.
+ // It should be discussed if we want the ray sensor to "see" through objects
+ // that don't have the required property/material (condition to get here)
+ return false;
// skip past the object and keep tracing
/* We add 0.01 of fudge, so that if the margin && radius == 0., we don't endless loop. */