1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Fix crash in navigation 3d when target is not reachable

The code that resets variables to retry navigation to the closest possible poly was not resetting 1 variable, which caused it to exceed the vector bounds
This commit is contained in:
Sean
2022-10-02 13:18:33 -06:00
parent abf473e2d0
commit 9b525da531

View File

@@ -238,6 +238,7 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p
to_visit.clear();
to_visit.push_back(0);
least_cost_id = 0;
prev_least_cost_id = -1;
reachable_end = nullptr;