diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-08-29 15:03:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-29 15:03:01 +0200 |
commit | 907b7a389736f10b22bb4f63688f489ed1d7f30a (patch) | |
tree | d93d97dba464a60e8a953f855f9bba73a64430ce /modules/csg/csg_gizmos.cpp | |
parent | 27ae49ea29467d3e4bf1129d2ac6203522f8748a (diff) | |
parent | 11c90b0bb3a663887c0138501668950602189b4d (diff) |
Merge pull request #21538 from jmf/master
Fix CSGBox size
Diffstat (limited to 'modules/csg/csg_gizmos.cpp')
-rw-r--r-- | modules/csg/csg_gizmos.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp index f9744c72af..07c33ed670 100644 --- a/modules/csg/csg_gizmos.cpp +++ b/modules/csg/csg_gizmos.cpp @@ -139,9 +139,9 @@ void CSGShapeSpatialGizmoPlugin::set_handle(EditorSpatialGizmo *p_gizmo, int p_i d = 0.001; switch (p_idx) { - case 0: s->set_width(d); break; - case 1: s->set_height(d); break; - case 2: s->set_depth(d); break; + case 0: s->set_width(d * 2); break; + case 1: s->set_height(d * 2); break; + case 2: s->set_depth(d * 2); break; } } @@ -329,9 +329,9 @@ void CSGShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { CSGBox *s = Object::cast_to<CSGBox>(cs); Vector<Vector3> handles; - handles.push_back(Vector3(s->get_width(), 0, 0)); - handles.push_back(Vector3(0, s->get_height(), 0)); - handles.push_back(Vector3(0, 0, s->get_depth())); + handles.push_back(Vector3(s->get_width() * 0.5, 0, 0)); + handles.push_back(Vector3(0, s->get_height() * 0.5, 0)); + handles.push_back(Vector3(0, 0, s->get_depth() * 0.5)); p_gizmo->add_handles(handles, handles_material); } |