From 53b8899be9d79f6b16923e930784d5001532fa15 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 19 Mar 2022 16:54:55 +0100 Subject: [PATCH] Decrease default sizes of some primitive and CSG meshes for consistency --- doc/classes/PrismMesh.xml | 2 +- doc/classes/SphereMesh.xml | 4 ++-- doc/classes/TubeTrailMesh.xml | 2 +- modules/csg/csg_shape.cpp | 2 +- modules/csg/doc_classes/CSGSphere3D.xml | 2 +- scene/resources/primitive_meshes.h | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml index 10c2b11a9a9..a7bfa43c52f 100644 --- a/doc/classes/PrismMesh.xml +++ b/doc/classes/PrismMesh.xml @@ -12,7 +12,7 @@ Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. - + Size of the prism. diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml index d0549d6b520..28c97046261 100644 --- a/doc/classes/SphereMesh.xml +++ b/doc/classes/SphereMesh.xml @@ -9,7 +9,7 @@ - + Full height of the sphere. @@ -19,7 +19,7 @@ Number of radial segments on the sphere. - + Radius of sphere. diff --git a/doc/classes/TubeTrailMesh.xml b/doc/classes/TubeTrailMesh.xml index 05fcbe967a5..ddc544dc97f 100644 --- a/doc/classes/TubeTrailMesh.xml +++ b/doc/classes/TubeTrailMesh.xml @@ -11,7 +11,7 @@ - + diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index be9bf9538f0..0a2427e4e66 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -1110,7 +1110,7 @@ Ref CSGSphere3D::get_material() const { CSGSphere3D::CSGSphere3D() { // defaults - radius = 1.0; + radius = 0.5; radial_segments = 12; rings = 6; smooth_faces = true; diff --git a/modules/csg/doc_classes/CSGSphere3D.xml b/modules/csg/doc_classes/CSGSphere3D.xml index 227f620a4e6..d2f985b3a21 100644 --- a/modules/csg/doc_classes/CSGSphere3D.xml +++ b/modules/csg/doc_classes/CSGSphere3D.xml @@ -17,7 +17,7 @@ Number of vertical slices for the sphere. - + Radius of the sphere. diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h index 8cd05c17400..6b0d5993a1a 100644 --- a/scene/resources/primitive_meshes.h +++ b/scene/resources/primitive_meshes.h @@ -247,7 +247,7 @@ class PrismMesh : public PrimitiveMesh { private: float left_to_right = 0.5; - Vector3 size = Vector3(2.0, 2.0, 2.0); + Vector3 size = Vector3(1.0, 1.0, 1.0); int subdivide_w = 0; int subdivide_h = 0; int subdivide_d = 0; @@ -309,8 +309,8 @@ class SphereMesh : public PrimitiveMesh { GDCLASS(SphereMesh, PrimitiveMesh); private: - float radius = 1.0; - float height = 2.0; + float radius = 0.5; + float height = 1.0; int radial_segments = 64; int rings = 32; bool is_hemisphere = false; @@ -358,7 +358,7 @@ class TubeTrailMesh : public PrimitiveMesh { GDCLASS(TubeTrailMesh, PrimitiveMesh); private: - float radius = 1.0; + float radius = 0.5; int radial_steps = 8; int sections = 5; float section_length = 0.2;