Godot Engine – Multi-platform 2D and 3D game engine
Improve documentation on collision/visibility layer setter methods
Hugo Locurcio0f547d6c494f
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xmlindex a24641d3968..65e4e99d633 100644--- a/doc/classes/CanvasItem.xml+++ b/doc/classes/CanvasItem.xml@@ -643,7 +643,7 @@<param index="0" name="layer" type="int" /><param index="1" name="enabled" type="bool" /><description>- Set/clear individual bits on the rendering visibility layer. This simplifies editing this [CanvasItem]'s visibility layer.+ Set/clear individual bits on the rendering visibility layer ([param layer] is between [code]0[/code] and [code]31[/code]). This simplifies editing this [CanvasItem]'s visibility layer compared to assigning the [member visibility_layer] property directly.</description></method><method name="show">@@ -693,7 +693,7 @@If [code]true[/code], the parent [CanvasItem]'s [member material] is used as this node's material.</member><member name="visibility_layer" type="int" setter="set_visibility_layer" getter="get_visibility_layer" default="1">- The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask.+ The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask. For an easier way to change this value from a script, see [method set_visibility_layer_bit].[b]Note:[/b] A [CanvasItem] does not inherit its parents' visibility layers. This means that if a parent [CanvasItem] does not have all the same layers as its child, the child may not be visible even if both the parent and child have [member visible] set to [code]true[/code]. For example, if a parent has layer 1 and a child has layer 2, the child will not be visible in a [Viewport] with the canvas cull mask set to layer 1 or 2 (see [member Viewport.canvas_cull_mask]). To ensure that both the parent and child are visible, the parent must have both layers 1 and 2, or the child must have [member top_level] set to [code]true[/code].</member><member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xmlindex 65aa4a913af..e840455bb4e 100644--- a/doc/classes/CollisionObject2D.xml+++ b/doc/classes/CollisionObject2D.xml@@ -59,14 +59,14 @@<return type="bool" /><param index="0" name="layer_number" type="int" /><description>- Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.+ Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32. This simplifies editing this [CollisionObject2D]'s collision layer compared to assigning the [member collision_layer] property directly.</description></method><method name="get_collision_mask_value" qualifiers="const"><return type="bool" /><param index="0" name="layer_number" type="int" /><description>- Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32. This simplifies editing this [CollisionObject2D]'s collision mask compared to assigning the [member collision_mask] property directly.</description></method><method name="get_rid" qualifiers="const">@@ -242,11 +242,11 @@</methods><members><member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">- The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].+ The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. For an easier way to change this value from a script, see [method set_collision_layer_value].[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.</member><member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">- The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].+ The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. For an easier way to change this value from a script, see [method set_collision_mask_value].[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.</member><member name="collision_priority" type="float" setter="set_collision_priority" getter="get_collision_priority" default="1.0">diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xmlindex 3b491fffe18..a24f97a606f 100644--- a/doc/classes/CollisionObject3D.xml+++ b/doc/classes/CollisionObject3D.xml@@ -88,7 +88,7 @@<param index="0" name="layer_number" type="int" /><param index="1" name="value" type="bool" /><description>- Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.+ Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32. This simplifies editing this [CollisionObject3D]'s collision layer compared to assigning the [member collision_layer] property directly.</description></method><method name="set_collision_mask_value">@@ -96,7 +96,7 @@<param index="0" name="layer_number" type="int" /><param index="1" name="value" type="bool" /><description>- Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.+ Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. This simplifies editing this [CollisionObject3D]'s collision mask compared to assigning the [member collision_mask] property directly.</description></method><method name="shape_find_owner" qualifiers="const">@@ -185,11 +185,11 @@</methods><members><member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">- The physics layers this CollisionObject3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].+ The physics layers this CollisionObject3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. For an easier way to change this value from a script, see [method set_collision_layer_value].[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.</member><member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">- The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].+ The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. For an easier way to change this value from a script, see [method set_collision_mask_value].[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.</member><member name="collision_priority" type="float" setter="set_collision_priority" getter="get_collision_priority" default="1.0">