diff options
Diffstat (limited to 'scene/2d/collision_polygon_2d.cpp')
-rw-r--r-- | scene/2d/collision_polygon_2d.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index 9bc3226851..2923b287be 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -164,15 +164,15 @@ void CollisionPolygon2D::_notification(int p_what) { dcol.a = 1.0; Vector2 line_to(0, 20); draw_line(Vector2(), line_to, dcol, 3); - Vector<Vector2> pts; real_t tsize = 8; - pts.push_back(line_to + (Vector2(0, tsize))); - pts.push_back(line_to + (Vector2(Math_SQRT12 * tsize, 0))); - pts.push_back(line_to + (Vector2(-Math_SQRT12 * tsize, 0))); - Vector<Color> cols; - for (int i = 0; i < 3; i++) { - cols.push_back(dcol); - } + + Vector<Vector2> pts = { + line_to + Vector2(0, tsize), + line_to + Vector2(Math_SQRT12 * tsize, 0), + line_to + Vector2(-Math_SQRT12 * tsize, 0) + }; + + Vector<Color> cols{ dcol, dcol, dcol }; draw_primitive(pts, cols, Vector<Vector2>()); //small arrow } |