diff --git a/include/omath/pathfinding/walk_bot.hpp b/include/omath/pathfinding/walk_bot.hpp index b7a9fd6..7d2906b 100644 --- a/include/omath/pathfinding/walk_bot.hpp +++ b/include/omath/pathfinding/walk_bot.hpp @@ -12,9 +12,9 @@ namespace omath::pathfinding public: void update(const Vector3& bot_position, const Vector3& target_position, float min_node_distance) const; + void on_path(std::function&)> callback); private: std::weak_ptr m_mav_mesh; - float m_min_distance_to_path_point; std::optional&)>> m_on_next_path_node = nullptr; }; } // namespace omath::pathfinding \ No newline at end of file diff --git a/source/pathfinding/walk_bot.cpp b/source/pathfinding/walk_bot.cpp index 9ae649d..171b91f 100644 --- a/source/pathfinding/walk_bot.cpp +++ b/source/pathfinding/walk_bot.cpp @@ -28,4 +28,8 @@ namespace omath::pathfinding else m_on_next_path_node->operator()(path.front()); } + void WalkBot::on_path(std::function&)> callback) + { + m_on_next_path_node = callback; + } } // namespace omath::pathfinding \ No newline at end of file