소스 검색

Decrease SphereShape3D's default radius to 0.5 to match primitive mesh

The SphereMesh primitive mesh's size was recently decreased, but
unlike other primitive meshes, the sphere shape's radius wasn't
adjusted accordingly.
Hugo Locurcio 3 년 전
부모
커밋
f008e98ea2
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      doc/classes/SphereShape3D.xml
  2. 1 1
      scene/resources/sphere_shape_3d.cpp
  3. 1 1
      scene/resources/sphere_shape_3d.h

+ 1 - 1
doc/classes/SphereShape3D.xml

@@ -11,7 +11,7 @@
 		<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
 		<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
 	</tutorials>
 	</tutorials>
 	<members>
 	<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.
 			The sphere's radius. The shape's diameter is double the radius.
 		</member>
 		</member>
 	</members>
 	</members>

+ 1 - 1
scene/resources/sphere_shape_3d.cpp

@@ -83,5 +83,5 @@ void SphereShape3D::_bind_methods() {
 
 
 SphereShape3D::SphereShape3D() :
 SphereShape3D::SphereShape3D() :
 		Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_SPHERE)) {
 		Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_SPHERE)) {
-	set_radius(1.0);
+	set_radius(0.5);
 }
 }

+ 1 - 1
scene/resources/sphere_shape_3d.h

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