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:
authorCampbell Barton <ideasman42@gmail.com>2008-06-18 13:06:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-06-18 13:06:51 +0400
commitd39154bb50571c07fa5f2425261f123034b0b1c1 (patch)
tree201e603956836297369c48f231ab16cc80f6232d /source/gameengine/Ketsji/KX_RayCast.cpp
parent48c7c9d957896b0f3faa10c72cc86a55b5c39b88 (diff)
bugfix, BGE, use vec.safe_normalized() rather then vec.normalized() because in some cases the ray_cast sensor could crash blender.
Diffstat (limited to 'source/gameengine/Ketsji/KX_RayCast.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_RayCast.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_RayCast.cpp b/source/gameengine/Ketsji/KX_RayCast.cpp
index b88741625b6..89e2d645d54 100644
--- a/source/gameengine/Ketsji/KX_RayCast.cpp
+++ b/source/gameengine/Ketsji/KX_RayCast.cpp
@@ -49,7 +49,7 @@ bool KX_RayCast::RayTest(KX_IPhysicsController* ignore_controller, PHY_IPhysicsE
//
// returns true if an object was found, false if not.
MT_Point3 frompoint(_frompoint);
- const MT_Vector3 todir( (topoint - frompoint).normalized() );
+ const MT_Vector3 todir( (topoint - frompoint).safe_normalized() );
PHY_IPhysicsController* hit_controller;
PHY__Vector3 phy_pos;