diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-05-17 18:27:15 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-05-17 18:28:44 -0300 |
commit | c195c0df6b36debc870216dd42e49fbda70fa861 (patch) | |
tree | 194a26e39ace86d7a471f3e86159c2aed6be261c /scene/3d/collision_polygon.cpp | |
parent | 3a26e14a2bab777c9ba6aedceff6e4ef2666faf0 (diff) | |
download | redot-engine-c195c0df6b36debc870216dd42e49fbda70fa861.tar.gz |
-Added configuration warning system for nodes
-Added a new "add" and "instance" buttons for scene tree
-Added a vformat() function to ease translation work
Diffstat (limited to 'scene/3d/collision_polygon.cpp')
-rw-r--r-- | scene/3d/collision_polygon.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp index 3b14e1d767..e05f29714b 100644 --- a/scene/3d/collision_polygon.cpp +++ b/scene/3d/collision_polygon.cpp @@ -231,6 +231,19 @@ float CollisionPolygon::get_depth() const { return depth; } +String CollisionPolygon::get_configuration_warning() const { + + if (!get_parent()->cast_to<CollisionObject>()) { + return TTR("CollisionPolygon only serves to provide a collision shape to a CollisionObject derived node. Please only use it as a child of Area, StaticBody, RigidBody, KinematicBody, etc. to give them a shape."); + } + + if (polygon.empty()) { + return TTR("An empty CollisionPolygon has no effect on collision."); + + } + + return String(); +} void CollisionPolygon::_bind_methods() { |