Browse Source

Collision Shape 2D 'Disabled' Visualization Correction

Having white or strongly desaturated debug collision shape color
setting would make it harder to visualize enabled / disabled state.
This change makes it easier to visualize enabled / disabled state
by reducing the alpha color by half when disabled.
Eoin O'Neill 5 years ago
parent
commit
0c4594f6c9
1 changed files with 1 additions and 0 deletions
  1. 1 0
      scene/2d/collision_shape_2d.cpp

+ 1 - 0
scene/2d/collision_shape_2d.cpp

@@ -110,6 +110,7 @@ void CollisionShape2D::_notification(int p_what) {
 				draw_col.r = g;
 				draw_col.g = g;
 				draw_col.b = g;
+				draw_col.a *= 0.5;
 			}
 			shape->draw(get_canvas_item(), draw_col);