summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-09-18 23:10:58 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-09-18 23:10:58 -0300
commit3f9e5afe68df1e3b4bcf34a21468ed55a57a7973 (patch)
treeb4f5fa413429dc9e9aa50d82a6c47e641f6e433b /scene/2d
parent89a901c4b6a2fe24e781e497ec1a8e8fd69dd59c (diff)
begin work on debugging collisions....
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/collision_shape_2d.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index 5012c54b17..02e4c79a08 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -92,8 +92,12 @@ void CollisionShape2D::_notification(int p_what) {
} break;*/
case NOTIFICATION_DRAW: {
+ if (!get_tree()->is_editor_hint() && !get_tree()->is_debugging_collisions_hint())
+ break;
+
rect=Rect2();
+
Color draw_col=Color(0,0.6,0.7,0.5);
if (shape->cast_to<LineShape2D>()) {