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

This commit is contained in:
Campbell Barton 2008-06-18 09:06:51 +00:00
parent 48c7c9d957
commit d39154bb50

@ -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;