diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-02-16 02:12:03 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-02-16 02:12:03 +0300 |
commit | 13aa413361bf75c89b7c878f7720373cf464c9d8 (patch) | |
tree | e2e054e51ad887304f7771e6a7656b669a32c434 /source/gameengine/Ketsji/KX_RayCast.cpp | |
parent | 1597ba07705fbe39c219f1f99b5c92e9b06b8f0c (diff) |
patch 8235 8218 8211 added: various gameengine improvements, fixed windows project files
Diffstat (limited to 'source/gameengine/Ketsji/KX_RayCast.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_RayCast.cpp | 8 |
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. */ |