diff options
-rw-r--r-- | modules/bullet/space_bullet.cpp | 2 | ||||
-rw-r--r-- | modules/csg/csg_gizmos.cpp | 12 | ||||
-rw-r--r-- | modules/csg/csg_shape.cpp | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index 4a11bec5af..b12925b073 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -980,7 +980,7 @@ int SpaceBullet::test_ray_separation(RigidBodyBullet *p_body, const Transform &p btVector3 recover_motion(0, 0, 0); - int rays_found; + int rays_found = 0; for (int t(RECOVERING_MOVEMENT_CYCLES); 0 < t; --t) { int last_ray_index = recover_from_penetration_ray(p_body, body_transform, RECOVERING_MOVEMENT_SCALE, p_infinite_inertia, p_result_max, recover_motion, r_results); 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); } diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 258c628d93..714be16db7 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -917,7 +917,7 @@ CSGBrush *CSGBox::_build_brush() { int face = 0; - Vector3 vertex_mul(width, height, depth); + Vector3 vertex_mul(width * 0.5, height * 0.5, depth * 0.5); { @@ -1051,9 +1051,9 @@ Ref<Material> CSGBox::get_material() const { CSGBox::CSGBox() { // defaults - width = 1.0; - height = 1.0; - depth = 1.0; + width = 2.0; + height = 2.0; + depth = 2.0; } /////////////// |