diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-08-11 18:16:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 18:16:24 +0200 |
commit | e30be92ce83a87771ddac26e0e4ce7dcf926b811 (patch) | |
tree | 3ed9bc40604d64765e02acabd26616b86291c2b2 /editor | |
parent | aaf556685da905857326b2d6ab41360f095a7596 (diff) | |
parent | f12f5b36b58e3269cfa981744e4702ef68e81b49 (diff) |
Merge pull request #41634 from KoBeWi/the_independence
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/collision_shape_2d_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp index 5a6b7d98d3..4266e0f676 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -120,7 +120,7 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) { if (idx == 0) { capsule->set_radius(parameter); } else if (idx == 1) { - capsule->set_height(parameter * 2 - capsule->get_radius() * 2); + capsule->set_height(parameter * 2); } canvas_item_editor->update_viewport(); @@ -440,8 +440,8 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla float radius = shape->get_radius(); float height = shape->get_height() / 2; - handles.write[0] = Point2(radius, height); - handles.write[1] = Point2(0, height + radius); + handles.write[0] = Point2(radius, 0); + handles.write[1] = Point2(0, height); p_overlay->draw_texture(h, gt.xform(handles[0]) - size); p_overlay->draw_texture(h, gt.xform(handles[1]) - size); |