Merge pull request #61270 from Calinou/sphereshape3d-decrease-default-radius

Decrease SphereShape3D's default radius to 0.5 to match primitive mesh
This commit is contained in:
Rémi Verschelde 2022-05-23 06:07:05 +02:00 committed by GitHub
commit 603de7a055
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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>

View File

@ -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);
}

View File

@ -35,7 +35,7 @@
class SphereShape3D : public Shape3D {
GDCLASS(SphereShape3D, Shape3D);
float radius = 1.0f;
float radius = 0.5f;
protected:
static void _bind_methods();