From 13aa413361bf75c89b7c878f7720373cf464c9d8 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Fri, 15 Feb 2008 23:12:03 +0000 Subject: patch 8235 8218 8211 added: various gameengine improvements, fixed windows project files --- source/gameengine/Ketsji/KX_RayCast.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/gameengine/Ketsji/KX_RayCast.cpp') 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. */ -- cgit v1.2.3