summaryrefslogtreecommitdiff
path: root/scene/3d/collision_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/collision_object.cpp')
-rw-r--r--scene/3d/collision_object.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp
index b246fe75f4..73770a2dd2 100644
--- a/scene/3d/collision_object.cpp
+++ b/scene/3d/collision_object.cpp
@@ -365,6 +365,20 @@ bool CollisionObject::get_capture_input_on_drag() const {
return capture_input_on_drag;
}
+String CollisionObject::get_configuration_warning() const {
+
+ String warning = Spatial::get_configuration_warning();
+
+ if (shapes.empty()) {
+ if (warning == String()) {
+ warning += "\n";
+ }
+ warning += TTR("This node has no children shapes, so it can't interact with the space.\nConsider adding CollisionShape or CollisionPolygon children nodes to define it's shape.");
+ }
+
+ return warning;
+}
+
CollisionObject::CollisionObject() {
capture_input_on_drag = false;