summaryrefslogtreecommitdiff
path: root/servers/navigation/navigation_path_query_result_3d.cpp
diff options
context:
space:
mode:
authorJosh Jones <kilauea.jones@gmail.com>2022-09-19 22:56:54 -0700
committerJosh Jones <kilauea.jones@gmail.com>2022-09-28 23:01:12 -0600
commita2c53b881b1a54c95036f27577ee7d9b6e583d62 (patch)
treeaa84002a7cb9f54d3347f8e9c827a991e44b49ef /servers/navigation/navigation_path_query_result_3d.cpp
parentc2f66648f1cb7f26adf77cc3cf91052c95be5dbe (diff)
Update NavigationAgent to use query_path
This paves the way for having agents respond to link traversal.
Diffstat (limited to 'servers/navigation/navigation_path_query_result_3d.cpp')
-rw-r--r--servers/navigation/navigation_path_query_result_3d.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/navigation/navigation_path_query_result_3d.cpp b/servers/navigation/navigation_path_query_result_3d.cpp
index 8335d70c4b..1e28352995 100644
--- a/servers/navigation/navigation_path_query_result_3d.cpp
+++ b/servers/navigation/navigation_path_query_result_3d.cpp
@@ -38,9 +38,15 @@ const Vector<Vector3> &NavigationPathQueryResult3D::get_path() const {
return path;
}
+void NavigationPathQueryResult3D::reset() {
+ path.clear();
+}
+
void NavigationPathQueryResult3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_path", "path"), &NavigationPathQueryResult3D::set_path);
ClassDB::bind_method(D_METHOD("get_path"), &NavigationPathQueryResult3D::get_path);
+ ClassDB::bind_method(D_METHOD("reset"), &NavigationPathQueryResult3D::reset);
+
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "path"), "set_path", "get_path");
}