ソースを参照

Merge pull request #101732 from Yelloween10/update-capsule-docs

Update capsule documentations for size constraint clarifications
Rémi Verschelde 2 ヶ月 前
コミット
d0d13b5f4c

+ 2 - 0
doc/classes/CapsuleMesh.xml

@@ -11,12 +11,14 @@
 	<members>
 		<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
 			Total height of the capsule mesh (including the hemispherical ends).
+			[b]Note:[/b] The [member height] of a capsule must be at least twice its [member radius]. Otherwise, the capsule becomes a circle. If the [member height] is less than twice the [member radius], the properties adjust to a valid value.
 		</member>
 		<member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64">
 			Number of radial segments on the capsule mesh.
 		</member>
 		<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
 			Radius of the capsule mesh.
+			[b]Note:[/b] The [member radius] of a capsule cannot be greater than half of its [member height]. Otherwise, the capsule becomes a circle. If the [member radius] is greater than half of the [member height], the properties adjust to a valid value.
 		</member>
 		<member name="rings" type="int" setter="set_rings" getter="get_rings" default="8">
 			Number of rings along the height of the capsule.

+ 2 - 0
doc/classes/CapsuleShape2D.xml

@@ -12,12 +12,14 @@
 	<members>
 		<member name="height" type="float" setter="set_height" getter="get_height" default="30.0">
 			The capsule's full height, including the semicircles.
+			[b]Note:[/b] The [member height] of a capsule must be at least twice its [member radius]. Otherwise, the capsule becomes a circle. If the [member height] is less than twice the [member radius], the properties adjust to a valid value.
 		</member>
 		<member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height">
 			The capsule's height, excluding the semicircles. This is the height of the central rectangular part in the middle of the capsule, and is the distance between the centers of the two semicircles. This is a wrapper for [member height].
 		</member>
 		<member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
 			The capsule's radius.
+			[b]Note:[/b] The [member radius] of a capsule cannot be greater than half of its [member height]. Otherwise, the capsule becomes a circle. If the [member radius] is greater than half of the [member height], the properties adjust to a valid value.
 		</member>
 	</members>
 </class>

+ 2 - 0
doc/classes/CapsuleShape3D.xml

@@ -13,12 +13,14 @@
 	<members>
 		<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
 			The capsule's full height, including the hemispheres.
+			[b]Note:[/b] The [member height] of a capsule must be at least twice its [member radius]. Otherwise, the capsule becomes a sphere. If the [member height] is less than twice the [member radius], the properties adjust to a valid value.
 		</member>
 		<member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height">
 			The capsule's height, excluding the hemispheres. This is the height of the central cylindrical part in the middle of the capsule, and is the distance between the centers of the two hemispheres. This is a wrapper for [member height].
 		</member>
 		<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
 			The capsule's radius.
+			[b]Note:[/b] The [member radius] of a capsule cannot be greater than half of its [member height]. Otherwise, the capsule becomes a sphere. If the [member radius] is greater than half of the [member height], the properties adjust to a valid value.
 		</member>
 	</members>
 </class>

+ 2 - 0
doc/classes/SpringBoneCollisionCapsule3D.xml

@@ -11,6 +11,7 @@
 	<members>
 		<member name="height" type="float" setter="set_height" getter="get_height" default="0.5">
 			The capsule's full height, including the hemispheres.
+			[b]Note:[/b] The [member height] of a capsule must be at least twice its [member radius]. Otherwise, the capsule becomes a sphere. If the [member height] is less than twice the [member radius], the properties adjust to a valid value.
 		</member>
 		<member name="inside" type="bool" setter="set_inside" getter="is_inside" default="false">
 			If [code]true[/code], the collision acts to trap the joint within the collision.
@@ -20,6 +21,7 @@
 		</member>
 		<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.1">
 			The capsule's radius.
+			[b]Note:[/b] The [member radius] of a capsule cannot be greater than half of its [member height]. Otherwise, the capsule becomes a sphere. If the [member radius] is greater than half of the [member height], the properties adjust to a valid value.
 		</member>
 	</members>
 </class>