summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-23 06:07:05 +0200
committerGitHub <noreply@github.com>2022-05-23 06:07:05 +0200
commit603de7a0557cdbdd5405e345b55901f506cc5b40 (patch)
tree11727e79a98e86bbfd83fc9d859a5db40d11832f
parent01d383a8ff11791e823bb5283dc797ea37abe198 (diff)
parentf008e98ea2392070053f13cd3fcac64c5430588d (diff)
Merge pull request #61270 from Calinou/sphereshape3d-decrease-default-radius
Decrease SphereShape3D's default radius to 0.5 to match primitive mesh
-rw-r--r--doc/classes/SphereShape3D.xml2
-rw-r--r--scene/resources/sphere_shape_3d.cpp2
-rw-r--r--scene/resources/sphere_shape_3d.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/doc/classes/SphereShape3D.xml b/doc/classes/SphereShape3D.xml
index 63084f024e..b4713b1d41 100644
--- a/doc/classes/SphereShape3D.xml
+++ b/doc/classes/SphereShape3D.xml
@@ -11,7 +11,7 @@
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
<members>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
The sphere's radius. The shape's diameter is double the radius.
</member>
</members>
diff --git a/scene/resources/sphere_shape_3d.cpp b/scene/resources/sphere_shape_3d.cpp
index fc1e610e98..92efe3ce6f 100644
--- a/scene/resources/sphere_shape_3d.cpp
+++ b/scene/resources/sphere_shape_3d.cpp
@@ -83,5 +83,5 @@ void SphereShape3D::_bind_methods() {
SphereShape3D::SphereShape3D() :
Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_SPHERE)) {
- set_radius(1.0);
+ set_radius(0.5);
}
diff --git a/scene/resources/sphere_shape_3d.h b/scene/resources/sphere_shape_3d.h
index 20887dd092..8f77378ef4 100644
--- a/scene/resources/sphere_shape_3d.h
+++ b/scene/resources/sphere_shape_3d.h
@@ -35,7 +35,7 @@
class SphereShape3D : public Shape3D {
GDCLASS(SphereShape3D, Shape3D);
- float radius = 1.0f;
+ float radius = 0.5f;
protected:
static void _bind_methods();