2020-01-10 11:22:34 +00:00
|
|
|
/**************************************************************************/
|
2020-02-11 13:01:43 +00:00
|
|
|
/* navigation_obstacle_2d.cpp */
|
2020-01-10 11:22:34 +00:00
|
|
|
/**************************************************************************/
|
|
|
|
/* This file is part of: */
|
|
|
|
/* GODOT ENGINE */
|
|
|
|
/* https://godotengine.org */
|
|
|
|
/**************************************************************************/
|
2020-02-11 13:01:43 +00:00
|
|
|
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
|
|
|
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
2020-01-10 11:22:34 +00:00
|
|
|
/* */
|
|
|
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
|
|
/* a copy of this software and associated documentation files (the */
|
|
|
|
/* "Software"), to deal in the Software without restriction, including */
|
|
|
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
|
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
|
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
|
|
/* the following conditions: */
|
|
|
|
/* */
|
|
|
|
/* The above copyright notice and this permission notice shall be */
|
|
|
|
/* included in all copies or substantial portions of the Software. */
|
|
|
|
/* */
|
|
|
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
|
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
|
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
|
|
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
|
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
|
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
|
|
/**************************************************************************/
|
|
|
|
|
|
|
|
#include "navigation_obstacle_2d.h"
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
#include "core/math/geometry_2d.h"
|
2022-02-12 01:46:22 +00:00
|
|
|
#include "scene/resources/world_2d.h"
|
2020-03-27 18:21:27 +00:00
|
|
|
#include "servers/navigation_server_2d.h"
|
2023-01-10 06:14:16 +00:00
|
|
|
#include "servers/navigation_server_3d.h"
|
2020-01-10 11:22:34 +00:00
|
|
|
|
|
|
|
void NavigationObstacle2D::_bind_methods() {
|
2023-06-10 13:16:04 +00:00
|
|
|
ClassDB::bind_method(D_METHOD("get_rid"), &NavigationObstacle2D::get_rid);
|
|
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_avoidance_enabled", "enabled"), &NavigationObstacle2D::set_avoidance_enabled);
|
|
|
|
ClassDB::bind_method(D_METHOD("get_avoidance_enabled"), &NavigationObstacle2D::get_avoidance_enabled);
|
2022-05-14 21:33:09 +00:00
|
|
|
|
2022-08-14 14:23:27 +00:00
|
|
|
ClassDB::bind_method(D_METHOD("set_navigation_map", "navigation_map"), &NavigationObstacle2D::set_navigation_map);
|
|
|
|
ClassDB::bind_method(D_METHOD("get_navigation_map"), &NavigationObstacle2D::get_navigation_map);
|
|
|
|
|
2021-10-21 20:25:06 +00:00
|
|
|
ClassDB::bind_method(D_METHOD("set_radius", "radius"), &NavigationObstacle2D::set_radius);
|
|
|
|
ClassDB::bind_method(D_METHOD("get_radius"), &NavigationObstacle2D::get_radius);
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
ClassDB::bind_method(D_METHOD("set_velocity", "velocity"), &NavigationObstacle2D::set_velocity);
|
|
|
|
ClassDB::bind_method(D_METHOD("get_velocity"), &NavigationObstacle2D::get_velocity);
|
2021-10-21 20:25:06 +00:00
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
ClassDB::bind_method(D_METHOD("set_vertices", "vertices"), &NavigationObstacle2D::set_vertices);
|
|
|
|
ClassDB::bind_method(D_METHOD("get_vertices"), &NavigationObstacle2D::get_vertices);
|
|
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_avoidance_layers", "layers"), &NavigationObstacle2D::set_avoidance_layers);
|
|
|
|
ClassDB::bind_method(D_METHOD("get_avoidance_layers"), &NavigationObstacle2D::get_avoidance_layers);
|
|
|
|
ClassDB::bind_method(D_METHOD("set_avoidance_layer_value", "layer_number", "value"), &NavigationObstacle2D::set_avoidance_layer_value);
|
|
|
|
ClassDB::bind_method(D_METHOD("get_avoidance_layer_value", "layer_number"), &NavigationObstacle2D::get_avoidance_layer_value);
|
|
|
|
|
2023-06-10 13:16:04 +00:00
|
|
|
ADD_GROUP("Avoidance", "");
|
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "avoidance_enabled"), "set_avoidance_enabled", "get_avoidance_enabled");
|
2023-01-10 06:14:16 +00:00
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_velocity", "get_velocity");
|
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.0,500,0.01,suffix:px"), "set_radius", "get_radius");
|
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "vertices"), "set_vertices", "get_vertices");
|
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "avoidance_layers", PROPERTY_HINT_LAYERS_AVOIDANCE), "set_avoidance_layers", "get_avoidance_layers");
|
2020-01-10 11:22:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void NavigationObstacle2D::_notification(int p_what) {
|
|
|
|
switch (p_what) {
|
2022-08-14 14:23:27 +00:00
|
|
|
case NOTIFICATION_POST_ENTER_TREE: {
|
2023-01-10 06:14:16 +00:00
|
|
|
if (map_override.is_valid()) {
|
|
|
|
_update_map(map_override);
|
|
|
|
} else if (is_inside_tree()) {
|
|
|
|
_update_map(get_world_2d()->get_navigation_map());
|
|
|
|
} else {
|
|
|
|
_update_map(RID());
|
|
|
|
}
|
|
|
|
previous_transform = get_global_transform();
|
|
|
|
// need to trigger map controlled agent assignment somehow for the fake_agent since obstacles use no callback like regular agents
|
2023-06-10 13:16:04 +00:00
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_avoidance_enabled(obstacle, avoidance_enabled);
|
2023-07-12 20:21:58 +00:00
|
|
|
_update_position(get_global_position());
|
2020-01-10 11:22:34 +00:00
|
|
|
set_physics_process_internal(true);
|
|
|
|
} break;
|
2022-02-15 17:06:48 +00:00
|
|
|
|
2020-01-10 11:22:34 +00:00
|
|
|
case NOTIFICATION_EXIT_TREE: {
|
2022-08-14 14:23:27 +00:00
|
|
|
set_physics_process_internal(false);
|
2023-01-10 06:14:16 +00:00
|
|
|
_update_map(RID());
|
2021-03-08 08:47:18 +00:00
|
|
|
} break;
|
2022-02-15 17:06:48 +00:00
|
|
|
|
2022-05-17 18:08:39 +00:00
|
|
|
case NOTIFICATION_PAUSED: {
|
2023-01-10 06:14:16 +00:00
|
|
|
if (!can_process()) {
|
|
|
|
map_before_pause = map_current;
|
|
|
|
_update_map(RID());
|
|
|
|
} else if (can_process() && !(map_before_pause == RID())) {
|
|
|
|
_update_map(map_before_pause);
|
2022-05-17 18:08:39 +00:00
|
|
|
map_before_pause = RID();
|
|
|
|
}
|
2023-06-15 13:35:53 +00:00
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_paused(obstacle, !can_process());
|
2022-05-17 18:08:39 +00:00
|
|
|
} break;
|
|
|
|
|
|
|
|
case NOTIFICATION_UNPAUSED: {
|
2023-01-10 06:14:16 +00:00
|
|
|
if (!can_process()) {
|
|
|
|
map_before_pause = map_current;
|
|
|
|
_update_map(RID());
|
|
|
|
} else if (can_process() && !(map_before_pause == RID())) {
|
|
|
|
_update_map(map_before_pause);
|
2022-05-17 18:08:39 +00:00
|
|
|
map_before_pause = RID();
|
|
|
|
}
|
2023-06-15 13:35:53 +00:00
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_paused(obstacle, !can_process());
|
2022-05-17 18:08:39 +00:00
|
|
|
} break;
|
|
|
|
|
2020-01-10 11:22:34 +00:00
|
|
|
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
|
2023-01-10 06:14:16 +00:00
|
|
|
if (is_inside_tree()) {
|
2023-07-12 20:21:58 +00:00
|
|
|
_update_position(get_global_position());
|
2023-01-10 06:14:16 +00:00
|
|
|
|
|
|
|
if (velocity_submitted) {
|
|
|
|
velocity_submitted = false;
|
|
|
|
// only update if there is a noticeable change, else the rvo agent preferred velocity stays the same
|
|
|
|
if (!previous_velocity.is_equal_approx(velocity)) {
|
2023-06-10 13:16:04 +00:00
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_velocity(obstacle, velocity);
|
2023-01-10 06:14:16 +00:00
|
|
|
}
|
|
|
|
previous_velocity = velocity;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} break;
|
|
|
|
|
|
|
|
case NOTIFICATION_DRAW: {
|
|
|
|
#ifdef DEBUG_ENABLED
|
|
|
|
if (is_inside_tree()) {
|
|
|
|
bool is_debug_enabled = false;
|
|
|
|
if (Engine::get_singleton()->is_editor_hint()) {
|
|
|
|
is_debug_enabled = true;
|
|
|
|
} else if (NavigationServer2D::get_singleton()->get_debug_enabled() && NavigationServer2D::get_singleton()->get_debug_avoidance_enabled()) {
|
|
|
|
is_debug_enabled = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_debug_enabled) {
|
|
|
|
_update_fake_agent_radius_debug();
|
|
|
|
_update_static_obstacle_debug();
|
|
|
|
}
|
2020-01-10 11:22:34 +00:00
|
|
|
}
|
2023-01-10 06:14:16 +00:00
|
|
|
#endif // DEBUG_ENABLED
|
2020-01-10 11:22:34 +00:00
|
|
|
} break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-12 15:01:17 +00:00
|
|
|
NavigationObstacle2D::NavigationObstacle2D() {
|
2023-01-10 06:14:16 +00:00
|
|
|
obstacle = NavigationServer2D::get_singleton()->obstacle_create();
|
|
|
|
|
|
|
|
set_radius(radius);
|
|
|
|
set_vertices(vertices);
|
|
|
|
set_avoidance_layers(avoidance_layers);
|
2023-06-10 13:16:04 +00:00
|
|
|
set_avoidance_enabled(avoidance_enabled);
|
2020-01-10 11:22:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
NavigationObstacle2D::~NavigationObstacle2D() {
|
2022-12-12 17:42:37 +00:00
|
|
|
ERR_FAIL_NULL(NavigationServer2D::get_singleton());
|
2020-01-10 11:22:34 +00:00
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
NavigationServer2D::get_singleton()->free(obstacle);
|
|
|
|
obstacle = RID();
|
2020-01-10 11:22:34 +00:00
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
void NavigationObstacle2D::set_vertices(const Vector<Vector2> &p_vertices) {
|
|
|
|
vertices = p_vertices;
|
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_vertices(obstacle, vertices);
|
2023-07-12 20:21:58 +00:00
|
|
|
#ifdef DEBUG_ENABLED
|
|
|
|
queue_redraw();
|
|
|
|
#endif // DEBUG_ENABLED
|
2021-10-21 20:25:06 +00:00
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
void NavigationObstacle2D::set_navigation_map(RID p_navigation_map) {
|
|
|
|
if (map_override == p_navigation_map) {
|
|
|
|
return;
|
2021-10-21 20:25:06 +00:00
|
|
|
}
|
2023-01-10 06:14:16 +00:00
|
|
|
map_override = p_navigation_map;
|
|
|
|
_update_map(map_override);
|
2021-10-21 20:25:06 +00:00
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
RID NavigationObstacle2D::get_navigation_map() const {
|
|
|
|
if (map_override.is_valid()) {
|
|
|
|
return map_override;
|
|
|
|
} else if (is_inside_tree()) {
|
|
|
|
return get_world_2d()->get_navigation_map();
|
2021-03-08 08:47:18 +00:00
|
|
|
}
|
2023-01-10 06:14:16 +00:00
|
|
|
return RID();
|
2021-10-21 20:25:06 +00:00
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
void NavigationObstacle2D::set_radius(real_t p_radius) {
|
|
|
|
ERR_FAIL_COND_MSG(p_radius < 0.0, "Radius must be positive.");
|
|
|
|
if (Math::is_equal_approx(radius, p_radius)) {
|
2023-02-02 07:38:28 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
radius = p_radius;
|
|
|
|
|
2023-06-10 13:16:04 +00:00
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_radius(obstacle, radius);
|
2023-07-12 20:21:58 +00:00
|
|
|
#ifdef DEBUG_ENABLED
|
|
|
|
queue_redraw();
|
|
|
|
#endif // DEBUG_ENABLED
|
2022-08-14 14:23:27 +00:00
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
void NavigationObstacle2D::set_avoidance_layers(uint32_t p_layers) {
|
2023-06-10 13:16:04 +00:00
|
|
|
if (avoidance_layers == p_layers) {
|
|
|
|
return;
|
|
|
|
}
|
2023-01-10 06:14:16 +00:00
|
|
|
avoidance_layers = p_layers;
|
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_avoidance_layers(obstacle, avoidance_layers);
|
2023-04-06 14:32:49 +00:00
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
uint32_t NavigationObstacle2D::get_avoidance_layers() const {
|
|
|
|
return avoidance_layers;
|
|
|
|
}
|
|
|
|
|
|
|
|
void NavigationObstacle2D::set_avoidance_layer_value(int p_layer_number, bool p_value) {
|
|
|
|
ERR_FAIL_COND_MSG(p_layer_number < 1, "Avoidance layer number must be between 1 and 32 inclusive.");
|
|
|
|
ERR_FAIL_COND_MSG(p_layer_number > 32, "Avoidance layer number must be between 1 and 32 inclusive.");
|
|
|
|
uint32_t avoidance_layers_new = get_avoidance_layers();
|
|
|
|
if (p_value) {
|
|
|
|
avoidance_layers_new |= 1 << (p_layer_number - 1);
|
|
|
|
} else {
|
|
|
|
avoidance_layers_new &= ~(1 << (p_layer_number - 1));
|
2023-02-02 07:38:28 +00:00
|
|
|
}
|
2023-01-10 06:14:16 +00:00
|
|
|
set_avoidance_layers(avoidance_layers_new);
|
|
|
|
}
|
2023-02-02 07:38:28 +00:00
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
bool NavigationObstacle2D::get_avoidance_layer_value(int p_layer_number) const {
|
|
|
|
ERR_FAIL_COND_V_MSG(p_layer_number < 1, false, "Avoidance layer number must be between 1 and 32 inclusive.");
|
|
|
|
ERR_FAIL_COND_V_MSG(p_layer_number > 32, false, "Avoidance layer number must be between 1 and 32 inclusive.");
|
|
|
|
return get_avoidance_layers() & (1 << (p_layer_number - 1));
|
|
|
|
}
|
2023-02-02 07:38:28 +00:00
|
|
|
|
2023-06-10 13:16:04 +00:00
|
|
|
void NavigationObstacle2D::set_avoidance_enabled(bool p_enabled) {
|
|
|
|
if (avoidance_enabled == p_enabled) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
avoidance_enabled = p_enabled;
|
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_avoidance_enabled(obstacle, avoidance_enabled);
|
2023-07-12 20:21:58 +00:00
|
|
|
#ifdef DEBUG_ENABLED
|
|
|
|
queue_redraw();
|
|
|
|
#endif // DEBUG_ENABLED
|
2023-06-10 13:16:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool NavigationObstacle2D::get_avoidance_enabled() const {
|
|
|
|
return avoidance_enabled;
|
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
void NavigationObstacle2D::set_velocity(const Vector2 p_velocity) {
|
|
|
|
velocity = p_velocity;
|
|
|
|
velocity_submitted = true;
|
2022-08-14 14:23:27 +00:00
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
void NavigationObstacle2D::_update_map(RID p_map) {
|
|
|
|
map_current = p_map;
|
2023-06-10 13:16:04 +00:00
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_map(obstacle, p_map);
|
2023-01-10 06:14:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void NavigationObstacle2D::_update_position(const Vector2 p_position) {
|
2023-06-10 13:16:04 +00:00
|
|
|
NavigationServer2D::get_singleton()->obstacle_set_position(obstacle, p_position);
|
2023-07-12 20:21:58 +00:00
|
|
|
#ifdef DEBUG_ENABLED
|
|
|
|
queue_redraw();
|
|
|
|
#endif // DEBUG_ENABLED
|
2022-08-14 14:23:27 +00:00
|
|
|
}
|
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
#ifdef DEBUG_ENABLED
|
|
|
|
void NavigationObstacle2D::_update_fake_agent_radius_debug() {
|
|
|
|
if (radius > 0.0 && NavigationServer2D::get_singleton()->get_debug_navigation_avoidance_enable_obstacles_radius()) {
|
|
|
|
Color debug_radius_color = NavigationServer2D::get_singleton()->get_debug_navigation_avoidance_obstacles_radius_color();
|
2023-07-12 20:21:58 +00:00
|
|
|
RS::get_singleton()->canvas_item_add_circle(get_canvas_item(), Vector2(), radius, debug_radius_color);
|
2023-02-02 07:38:28 +00:00
|
|
|
}
|
2023-01-10 06:14:16 +00:00
|
|
|
}
|
|
|
|
#endif // DEBUG_ENABLED
|
2023-02-02 07:38:28 +00:00
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
#ifdef DEBUG_ENABLED
|
|
|
|
void NavigationObstacle2D::_update_static_obstacle_debug() {
|
|
|
|
if (get_vertices().size() > 2 && NavigationServer2D::get_singleton()->get_debug_navigation_avoidance_enable_obstacles_static()) {
|
|
|
|
bool obstacle_pushes_inward = Geometry2D::is_polygon_clockwise(get_vertices());
|
2023-02-02 07:38:28 +00:00
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
Color debug_static_obstacle_face_color;
|
2021-10-21 20:25:06 +00:00
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
if (obstacle_pushes_inward) {
|
|
|
|
debug_static_obstacle_face_color = NavigationServer2D::get_singleton()->get_debug_navigation_avoidance_static_obstacle_pushin_face_color();
|
|
|
|
} else {
|
|
|
|
debug_static_obstacle_face_color = NavigationServer2D::get_singleton()->get_debug_navigation_avoidance_static_obstacle_pushout_face_color();
|
|
|
|
}
|
2023-02-02 07:38:28 +00:00
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
Vector<Vector2> debug_obstacle_polygon_vertices = get_vertices();
|
|
|
|
|
|
|
|
Vector<Color> debug_obstacle_polygon_colors;
|
|
|
|
debug_obstacle_polygon_colors.resize(debug_obstacle_polygon_vertices.size());
|
|
|
|
debug_obstacle_polygon_colors.fill(debug_static_obstacle_face_color);
|
|
|
|
|
|
|
|
RS::get_singleton()->canvas_item_add_polygon(get_canvas_item(), debug_obstacle_polygon_vertices, debug_obstacle_polygon_colors);
|
|
|
|
|
|
|
|
Color debug_static_obstacle_edge_color;
|
|
|
|
|
|
|
|
if (obstacle_pushes_inward) {
|
|
|
|
debug_static_obstacle_edge_color = NavigationServer2D::get_singleton()->get_debug_navigation_avoidance_static_obstacle_pushin_edge_color();
|
|
|
|
} else {
|
|
|
|
debug_static_obstacle_edge_color = NavigationServer2D::get_singleton()->get_debug_navigation_avoidance_static_obstacle_pushout_edge_color();
|
|
|
|
}
|
|
|
|
|
|
|
|
Vector<Vector2> debug_obstacle_line_vertices = get_vertices();
|
|
|
|
debug_obstacle_line_vertices.push_back(debug_obstacle_line_vertices[0]);
|
|
|
|
debug_obstacle_line_vertices.resize(debug_obstacle_line_vertices.size());
|
2023-02-02 07:38:28 +00:00
|
|
|
|
2023-01-10 06:14:16 +00:00
|
|
|
Vector<Color> debug_obstacle_line_colors;
|
|
|
|
debug_obstacle_line_colors.resize(debug_obstacle_line_vertices.size());
|
|
|
|
debug_obstacle_line_colors.fill(debug_static_obstacle_edge_color);
|
|
|
|
|
|
|
|
RS::get_singleton()->canvas_item_add_polyline(get_canvas_item(), debug_obstacle_line_vertices, debug_obstacle_line_colors, 4.0);
|
|
|
|
}
|
2020-01-10 11:22:34 +00:00
|
|
|
}
|
2023-01-10 06:14:16 +00:00
|
|
|
#endif // DEBUG_ENABLED
|