Skip to content

Commit d0d13b5

Browse files
committed
Merge pull request #101732 from Yelloween10/update-capsule-docs
Update capsule documentations for size constraint clarifications
2 parents d7bdc0b + 48d1c95 commit d0d13b5

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

doc/classes/CapsuleMesh.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
<members>
1212
<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
1313
Total height of the capsule mesh (including the hemispherical ends).
14+
[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.
1415
</member>
1516
<member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64">
1617
Number of radial segments on the capsule mesh.
1718
</member>
1819
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
1920
Radius of the capsule mesh.
21+
[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.
2022
</member>
2123
<member name="rings" type="int" setter="set_rings" getter="get_rings" default="8">
2224
Number of rings along the height of the capsule.

doc/classes/CapsuleShape2D.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
<members>
1313
<member name="height" type="float" setter="set_height" getter="get_height" default="30.0">
1414
The capsule's full height, including the semicircles.
15+
[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.
1516
</member>
1617
<member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height">
1718
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].
1819
</member>
1920
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
2021
The capsule's radius.
22+
[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.
2123
</member>
2224
</members>
2325
</class>

doc/classes/CapsuleShape3D.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
<members>
1414
<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
1515
The capsule's full height, including the hemispheres.
16+
[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.
1617
</member>
1718
<member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height">
1819
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].
1920
</member>
2021
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
2122
The capsule's radius.
23+
[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.
2224
</member>
2325
</members>
2426
</class>

doc/classes/SpringBoneCollisionCapsule3D.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<members>
1212
<member name="height" type="float" setter="set_height" getter="get_height" default="0.5">
1313
The capsule's full height, including the hemispheres.
14+
[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.
1415
</member>
1516
<member name="inside" type="bool" setter="set_inside" getter="is_inside" default="false">
1617
If [code]true[/code], the collision acts to trap the joint within the collision.
@@ -20,6 +21,7 @@
2021
</member>
2122
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.1">
2223
The capsule's radius.
24+
[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.
2325
</member>
2426
</members>
2527
</class>

0 commit comments

Comments
 (0)