[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15262] trunk/blender/source/gameengine/ Ketsji/KX_RayCast.cpp: bugfix, BGE, use vec.safe_normalized() rather then vec.normalized() because in some cases the ray_cast sensor could crash blender.

Campbell Barton ideasman42 at gmail.com
Wed Jun 18 11:07:53 CEST 2008


Revision: 15262
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15262
Author:   campbellbarton
Date:     2008-06-18 11:06:51 +0200 (Wed, 18 Jun 2008)

Log Message:
-----------
bugfix, BGE, use vec.safe_normalized() rather then vec.normalized() because in some cases the ray_cast sensor could crash blender.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_RayCast.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_RayCast.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_RayCast.cpp	2008-06-18 07:03:47 UTC (rev 15261)
+++ trunk/blender/source/gameengine/Ketsji/KX_RayCast.cpp	2008-06-18 09:06:51 UTC (rev 15262)
@@ -49,7 +49,7 @@
 	//
 	// 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;





More information about the Bf-blender-cvs mailing list