|
@@ -32,6 +32,7 @@
|
|
|
|
|
|
#include "collision_object_2d.h"
|
|
|
#include "core/engine.h"
|
|
|
+#include "scene/2d/area_2d.h"
|
|
|
#include "scene/resources/capsule_shape_2d.h"
|
|
|
#include "scene/resources/circle_shape_2d.h"
|
|
|
#include "scene/resources/concave_polygon_shape_2d.h"
|
|
@@ -204,6 +205,9 @@ String CollisionShape2D::get_configuration_warning() const {
|
|
|
warning += TTR("Polygon-based shapes are not meant be used nor edited directly through the CollisionShape2D node. Please use the CollisionPolygon2D node instead.");
|
|
|
}
|
|
|
}
|
|
|
+ if (one_way_collision && Object::cast_to<Area2D>(get_parent())) {
|
|
|
+ warning += TTR("The One Way Collision property will be ignored when the parent is an Area2D.");
|
|
|
+ }
|
|
|
|
|
|
return warning;
|
|
|
}
|
|
@@ -226,6 +230,7 @@ void CollisionShape2D::set_one_way_collision(bool p_enable) {
|
|
|
if (parent) {
|
|
|
parent->shape_owner_set_one_way_collision(owner_id, p_enable);
|
|
|
}
|
|
|
+ update_configuration_warning();
|
|
|
}
|
|
|
|
|
|
bool CollisionShape2D::is_one_way_collision_enabled() const {
|