diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2019-11-13 23:48:43 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2020-02-09 17:37:30 -0500 |
commit | ef9b4ee2e25453fdee555d0a0894e73b8ff391f7 (patch) | |
tree | a83857fd0a57821b555010098c1d039b9d53fee1 /editor | |
parent | 8cb2de524373566bd0faffe1c70e9a201b20e6be (diff) |
Fix 2D CollisionShape controls pointing the wrong way
They now point down, matching Godot's 2D coordinate system.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/collision_shape_2d_editor_plugin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp index be9e5b0e3a..179ebca562 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -448,8 +448,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, height); + handles.write[1] = Point2(0, height + radius); p_overlay->draw_texture(h, gt.xform(handles[0]) - size); p_overlay->draw_texture(h, gt.xform(handles[1]) - size); @@ -502,8 +502,8 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla handles.resize(3); Vector2 ext = shape->get_extents(); handles.write[0] = Point2(ext.x, 0); - handles.write[1] = Point2(0, -ext.y); - handles.write[2] = Point2(ext.x, -ext.y); + handles.write[1] = Point2(0, ext.y); + handles.write[2] = Point2(ext.x, ext.y); p_overlay->draw_texture(h, gt.xform(handles[0]) - size); p_overlay->draw_texture(h, gt.xform(handles[1]) - size); |