- BGE crash fix when casting a ray to the same location as the object from python.
- Incorrect Mathutils vector docstrings. - last rayshade commit had an incomplete comment.
This commit is contained in:
@@ -2597,12 +2597,10 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo,
|
||||
}
|
||||
}
|
||||
MT_Point3 fromPoint = NodeGetWorldPosition();
|
||||
|
||||
if (dist != 0.0f)
|
||||
{
|
||||
MT_Vector3 toDir = toPoint-fromPoint;
|
||||
toDir.normalize();
|
||||
toPoint = fromPoint + (dist) * toDir;
|
||||
}
|
||||
toPoint = fromPoint + dist * (toPoint-fromPoint).safe_normalized();
|
||||
|
||||
PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
|
||||
KX_IPhysicsController *spc = GetPhysicsController();
|
||||
KX_GameObject *parent = GetParent();
|
||||
|
||||
Reference in New Issue
Block a user