Add debug colours and fills to CollisionPolygon3D.

This brings CollisionPolygon3D up to feature parity with its counterpart
CollisionShape3D. Closes #101414.

In addition, adding this feature fixes the issue that CollisionPolygon3D
would never be rendered in exported builds, even if Visible Collision Shapes
is enabled at runtime. Closes #101413.
This commit is contained in:
BattyBovine 2025-01-18 17:37:06 -05:00
parent 7b1ed520bd
commit a3ef9de6a8
5 changed files with 264 additions and 8 deletions

View file

@ -10,6 +10,13 @@
<tutorials>
</tutorials>
<members>
<member name="debug_color" type="Color" setter="set_debug_color" getter="get_debug_color" default="Color(0, 0, 0, 0)">
The collision shape color that is displayed in the editor, or in the running project if [b]Debug &gt; Visible Collision Shapes[/b] is checked at the top of the editor.
[b]Note:[/b] The default value is [member ProjectSettings.debug/shapes/collision/shape_color]. The [code]Color(0, 0, 0, 0)[/code] value documented here is a placeholder, and not the actual default debug color.
</member>
<member name="debug_fill" type="bool" setter="set_enable_debug_fill" getter="get_enable_debug_fill" default="true">
If [code]true[/code], when the shape is displayed, it will show a solid fill color in addition to its wireframe.
</member>
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
Length that the resulting collision extends in either direction perpendicular to its 2D polygon.
</member>