         // Rebuild part of the navigation mesh, then recalculate path if applicable
         NavigationMesh@ navMesh = scene_.GetComponent("NavigationMesh");
         navMesh.Build(updateBox);
-        RecalculatePath();
+        //RecalculatePath();
     }
 }
 

//     - Performing path queries to the navigation mesh
//     - Rebuilding the navigation mesh partially when adding or removing objects
//     - Visualizing custom debug geometry

#include "Scripts/Utilities/Sample.as"


{
    Vector3 hitPos;
    Drawable@ hitDrawable;
    NavigationMesh@ navMesh = scene_.GetComponent("NavigationMesh");
    
    if (Raycast(250.0f, hitPos, hitDrawable))
    {
        bool setStart = input.qualifierDown[QUAL_SHIFT];
        if (setStart)
        {
            startPos = navMesh.FindNearestPoint(hitPos, Vector3(1.0f, 1.0f, 1.0f));
            startPosDefined = true;
        }
        else
        {
            endPos = navMesh.FindNearestPoint(hitPos, Vector3(1.0f, 1.0f, 1.0f));
            endPosDefined = true;
        }
        
        //RecalculatePath();
        if (startPosDefined)
            Jack.position = startPos; // Reset Jack position to start
    }
}

