summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AABB.xml4
-rw-r--r--doc/classes/Button.xml1
-rw-r--r--doc/classes/GraphEdit.xml3
-rw-r--r--doc/classes/LineEdit.xml2
-rw-r--r--doc/classes/Object.xml3
-rw-r--r--doc/classes/PackedVector2Array.xml4
-rw-r--r--doc/classes/PackedVector3Array.xml4
-rw-r--r--doc/classes/Plane.xml1
-rw-r--r--doc/classes/ProjectSettings.xml7
-rw-r--r--doc/classes/Rect2.xml4
-rw-r--r--doc/classes/ScrollBar.xml2
-rw-r--r--doc/classes/Transform2D.xml16
-rw-r--r--doc/classes/Transform3D.xml8
-rw-r--r--doc/classes/Vector2.xml4
-rw-r--r--doc/classes/Vector3.xml9
-rw-r--r--doc/classes/Vector4.xml3
-rw-r--r--doc/classes/VisibleOnScreenEnabler2D.xml10
-rw-r--r--doc/classes/VisibleOnScreenEnabler3D.xml14
-rw-r--r--doc/classes/VisibleOnScreenNotifier2D.xml10
-rw-r--r--doc/classes/VisibleOnScreenNotifier3D.xml18
20 files changed, 80 insertions, 47 deletions
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index a803e4f106..c1c637d2d6 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -245,7 +245,9 @@
<return type="AABB" />
<param index="0" name="right" type="Transform3D" />
<description>
- Inversely transforms (multiplies) the [AABB] by the given [Transform3D] transformation matrix.
+ Inversely transforms (multiplies) the [AABB] by the given [Transform3D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
+ [code]aabb * transform[/code] is equivalent to [code]transform.inverse() * aabb[/code]. See [method Transform3D.inverse].
+ For transforming by inverse of an affine transformation (e.g. with scaling) [code]transform.affine_inverse() * aabb[/code] can be used instead. See [method Transform3D.affine_inverse].
</description>
</operator>
<operator name="operator ==">
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index bf0534ab1e..d7782a816d 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -132,6 +132,7 @@
Font size of the [Button]'s text.
</theme_item>
<theme_item name="icon" data_type="icon" type="Texture2D">
+ Default icon for the [Button]. Appears only if [member icon] is not assigned.
</theme_item>
<theme_item name="disabled" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is disabled.
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index c59b2944bb..410efd6389 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -214,7 +214,7 @@
<param index="3" name="to_port" type="int" />
<param index="4" name="amount" type="float" />
<description>
- Sets the coloration of the connection between [param from_node]'s [param from_port] and [param to_node]'s [param to_port] with the color provided in the [theme_item activity] theme property.
+ Sets the coloration of the connection between [param from_node]'s [param from_port] and [param to_node]'s [param to_port] with the color provided in the [theme_item activity] theme property. The color is linearly interpolated between the connection color and the activity color using [param amount] as weight.
</description>
</method>
<method name="set_selected">
@@ -408,6 +408,7 @@
</constants>
<theme_items>
<theme_item name="activity" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ Color of the connection's activity (see [method set_connection_activity]).
</theme_item>
<theme_item name="grid_major" data_type="color" type="Color" default="Color(1, 1, 1, 0.2)">
Color of major grid lines.
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index e2aa13403a..e706e3d6e0 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -269,7 +269,7 @@
If [code]true[/code], every character is replaced with the secret character (see [member secret_character]).
</member>
<member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default="&quot;•&quot;">
- The character to use to mask secret input (defaults to "•"). Only a single character can be used as the secret character.
+ The character to use to mask secret input. Only a single character can be used as the secret character. If it is longer than one character, only the first one will be used. If it is empty, a space will be used instead.
</member>
<member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false">
If [code]true[/code], the [LineEdit] will select the whole text when it gains focus.
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 88465b2159..2ffb02096d 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -219,6 +219,7 @@
# Storing the value in the fake property.
internal_data["fake_property"] = value
return true
+ return false
func _get_property_list():
return [
@@ -228,7 +229,7 @@
[csharp]
private Godot.Collections.Dictionary _internalData = new Godot.Collections.Dictionary();
- public override void _Set(StringName property, Variant value)
+ public override bool _Set(StringName property, Variant value)
{
if (property == "FakeProperty")
{
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 9f8671f076..0e5bb12d02 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -204,7 +204,9 @@
<return type="PackedVector2Array" />
<param index="0" name="right" type="Transform2D" />
<description>
- Transforms (multiplies) all vectors in the array by the [Transform2D] matrix.
+ Returns a new [PackedVector2Array] with all vectors in this array inversely transformed (multiplied) by the given [Transform2D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
+ [code]array * transform[/code] is equivalent to [code]transform.inverse() * array[/code]. See [method Transform2D.inverse].
+ For transforming by inverse of an affine transformation (e.g. with scaling) [code]transform.affine_inverse() * array[/code] can be used instead. See [method Transform2D.affine_inverse].
</description>
</operator>
<operator name="operator +">
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 54f65a619b..ce7ae4f396 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -203,7 +203,9 @@
<return type="PackedVector3Array" />
<param index="0" name="right" type="Transform3D" />
<description>
- Transforms (multiplies) all vectors in the array by the [Transform3D] matrix.
+ Returns a new [PackedVector3Array] with all vectors in this array inversely transformed (multiplied) by the given [Transform3D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
+ [code]array * transform[/code] is equivalent to [code]transform.inverse() * array[/code]. See [method Transform3D.inverse].
+ For transforming by inverse of an affine transformation (e.g. with scaling) [code]transform.affine_inverse() * array[/code] can be used instead. See [method Transform3D.affine_inverse].
</description>
</operator>
<operator name="operator +">
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index a0da82d1d6..254557b986 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -193,6 +193,7 @@
<param index="0" name="right" type="Transform3D" />
<description>
Inversely transforms (multiplies) the [Plane] by the given [Transform3D] transformation matrix.
+ [code]plane * transform[/code] is equivalent to [code]transform.affine_inverse() * plane[/code]. See [method Transform3D.affine_inverse].
</description>
</operator>
<operator name="operator ==">
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 126f3a88d7..519061e398 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -393,6 +393,13 @@
The base strength of the panning effect for all [AudioStreamPlayer3D] nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer3D.panning_strength]. A value of [code]0.0[/code] disables stereo panning entirely, leaving only volume attenuation in place. A value of [code]1.0[/code] completely mutes one of the channels if the sound is located exactly to the left (or right) of the listener.
The default value of [code]0.5[/code] is tuned for headphones. When using speakers, you may find lower values to sound better as speakers have a lower stereo separation compared to headphones.
</member>
+ <member name="audio/general/ios/mix_with_others" type="bool" setter="" getter="" default="false">
+ Sets the [url=https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1616611-mixwithothers]mixWithOthers[/url] option for the AVAudioSession on iOS. This will override the mix behavior, if the category is set to [code]Play and Record[/code], [code]Playback[/code], or [code]Multi Route[/code].
+ [code]Ambient[/code] always has this set per default.
+ </member>
+ <member name="audio/general/ios/session_category" type="int" setter="" getter="" default="0">
+ Sets the [url=https://developer.apple.com/documentation/avfaudio/avaudiosessioncategory]AVAudioSessionCategory[/url] on iOS. Use the [code]Playback[/code] category to get sound output, even if the phone is in silent mode.
+ </member>
<member name="audio/general/text_to_speech" type="bool" setter="" getter="" default="false">
If [code]true[/code], text-to-speech support is enabled, see [method DisplayServer.tts_get_voices] and [method DisplayServer.tts_speak].
[b]Note:[/b] Enabling TTS can cause addition idle CPU usage and interfere with the sleep mode, so consider disabling it if TTS is not used.
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 4f17e3cf2d..0471d73749 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -237,7 +237,9 @@
<return type="Rect2" />
<param index="0" name="right" type="Transform2D" />
<description>
- Inversely transforms (multiplies) the [Rect2] by the given [Transform2D] transformation matrix.
+ Inversely transforms (multiplies) the [Rect2] by the given [Transform2D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
+ [code]rect * transform[/code] is equivalent to [code]transform.inverse() * rect[/code]. See [method Transform2D.inverse].
+ For transforming by inverse of an affine transformation (e.g. with scaling) [code]transform.affine_inverse() * rect[/code] can be used instead. See [method Transform2D.affine_inverse].
</description>
</operator>
<operator name="operator ==">
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
index e8d2753a9a..4ee05632a5 100644
--- a/doc/classes/ScrollBar.xml
+++ b/doc/classes/ScrollBar.xml
@@ -49,8 +49,6 @@
<theme_item name="grabber_pressed" data_type="style" type="StyleBox">
Used when the grabber is being dragged.
</theme_item>
- <theme_item name="hscroll" data_type="style" type="StyleBox">
- </theme_item>
<theme_item name="scroll" data_type="style" type="StyleBox">
Used as background of this [ScrollBar].
</theme_item>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index abb81b95cb..aee70f6b59 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -59,7 +59,7 @@
<method name="affine_inverse" qualifiers="const">
<return type="Transform2D" />
<description>
- Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.
+ Returns the inverse of the transform, under the assumption that the basis is invertible (must have non-zero determinant).
</description>
</method>
<method name="basis_xform" qualifiers="const">
@@ -67,15 +67,17 @@
<param index="0" name="v" type="Vector2" />
<description>
Returns a vector transformed (multiplied) by the basis matrix.
- This method does not account for translation (the origin vector).
+ This method does not account for translation (the [member origin] vector).
</description>
</method>
<method name="basis_xform_inv" qualifiers="const">
<return type="Vector2" />
<param index="0" name="v" type="Vector2" />
<description>
- Returns a vector transformed (multiplied) by the inverse basis matrix.
- This method does not account for translation (the origin vector).
+ Returns a vector transformed (multiplied) by the inverse basis matrix, under the assumption that the basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
+ This method does not account for translation (the [member origin] vector).
+ [code]transform.basis_xform_inv(vector)[/code] is equivalent to [code]transform.inverse().basis_xform(vector)[/code]. See [method inverse].
+ For non-orthonormal transforms (e.g. with scaling) [code]transform.affine_inverse().basis_xform(vector)[/code] can be used instead. See [method affine_inverse].
</description>
</method>
<method name="determinant" qualifiers="const">
@@ -120,7 +122,7 @@
<method name="inverse" qualifiers="const">
<return type="Transform2D" />
<description>
- Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling).
+ Returns the inverse of the transform, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). Use [method affine_inverse] for non-orthonormal transforms (e.g. with scaling).
</description>
</method>
<method name="is_conformal" qualifiers="const">
@@ -274,14 +276,14 @@
<return type="Transform2D" />
<param index="0" name="right" type="float" />
<description>
- This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
+ This operator multiplies all components of the [Transform2D], including the [member origin] vector, which scales it uniformly.
</description>
</operator>
<operator name="operator *">
<return type="Transform2D" />
<param index="0" name="right" type="int" />
<description>
- This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
+ This operator multiplies all components of the [Transform2D], including the [member origin] vector, which scales it uniformly.
</description>
</operator>
<operator name="operator ==">
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index c96be5124e..85da629d70 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -59,7 +59,7 @@
<method name="affine_inverse" qualifiers="const">
<return type="Transform3D" />
<description>
- Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.
+ Returns the inverse of the transform, under the assumption that the basis is invertible (must have non-zero determinant).
</description>
</method>
<method name="interpolate_with" qualifiers="const">
@@ -73,7 +73,7 @@
<method name="inverse" qualifiers="const">
<return type="Transform3D" />
<description>
- Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling).
+ Returns the inverse of the transform, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). Use [method affine_inverse] for non-orthonormal transforms (e.g. with scaling).
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
@@ -235,14 +235,14 @@
<return type="Transform3D" />
<param index="0" name="right" type="float" />
<description>
- This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
+ This operator multiplies all components of the [Transform3D], including the [member origin] vector, which scales it uniformly.
</description>
</operator>
<operator name="operator *">
<return type="Transform3D" />
<param index="0" name="right" type="int" />
<description>
- This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
+ This operator multiplies all components of the [Transform3D], including the [member origin] vector, which scales it uniformly.
</description>
</operator>
<operator name="operator ==">
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index fdaaf239f8..3fa7bb46fc 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -419,7 +419,9 @@
<return type="Vector2" />
<param index="0" name="right" type="Transform2D" />
<description>
- Inversely transforms (multiplies) the [Vector2] by the given [Transform2D] transformation matrix.
+ Inversely transforms (multiplies) the [Vector2] by the given [Transform2D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
+ [code]vector * transform[/code] is equivalent to [code]transform.inverse() * vector[/code]. See [method Transform2D.inverse].
+ For transforming by inverse of an affine transformation (e.g. with scaling) [code]transform.affine_inverse() * vector[/code] can be used instead. See [method Transform2D.affine_inverse].
</description>
</operator>
<operator name="operator *">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 92fbdf6850..83a8c6af73 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -442,7 +442,9 @@
<return type="Vector3" />
<param index="0" name="right" type="Basis" />
<description>
- Inversely transforms (multiplies) the [Vector3] by the given [Basis] matrix.
+ Inversely transforms (multiplies) the [Vector3] by the given [Basis] matrix, under the assumption that the basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
+ [code]vector * basis[/code] is equivalent to [code]basis.transposed() * vector[/code]. See [method Basis.transposed].
+ For transforming by inverse of a non-orthonormal basis (e.g. with scaling) [code]basis.inverse() * vector[/code] can be used instead. See [method Basis.inverse].
</description>
</operator>
<operator name="operator *">
@@ -450,13 +452,16 @@
<param index="0" name="right" type="Quaternion" />
<description>
Inversely transforms (multiplies) the [Vector3] by the given [Quaternion].
+ [code]vector * quaternion[/code] is equivalent to [code]quaternion.inverse() * vector[/code]. See [method Quaternion.inverse].
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
<param index="0" name="right" type="Transform3D" />
<description>
- Inversely transforms (multiplies) the [Vector3] by the given [Transform3D] transformation matrix.
+ Inversely transforms (multiplies) the [Vector3] by the given [Transform3D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not).
+ [code]vector * transform[/code] is equivalent to [code]transform.inverse() * vector[/code]. See [method Transform3D.inverse].
+ For transforming by inverse of an affine transformation (e.g. with scaling) [code]transform.affine_inverse() * vector[/code] can be used instead. See [method Transform3D.affine_inverse].
</description>
</operator>
<operator name="operator *">
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index e5ad5631e8..c5503a9357 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -280,7 +280,8 @@
<return type="Vector4" />
<param index="0" name="right" type="Projection" />
<description>
- Inversely transforms (multiplies) the [Vector4] by the given [Projection] matrix.
+ Transforms (multiplies) the [Vector4] by the transpose of the given [Projection] matrix.
+ For transforming by inverse of a projection [code]projection.inverse() * vector[/code] can be used instead. See [method Projection.inverse].
</description>
</operator>
<operator name="operator *">
diff --git a/doc/classes/VisibleOnScreenEnabler2D.xml b/doc/classes/VisibleOnScreenEnabler2D.xml
index 9f8b07261e..e9017a389b 100644
--- a/doc/classes/VisibleOnScreenEnabler2D.xml
+++ b/doc/classes/VisibleOnScreenEnabler2D.xml
@@ -1,19 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisibleOnScreenEnabler2D" inherits="VisibleOnScreenNotifier2D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Automatically disables another node if not visible on screen.
+ A rectangular region of 2D space that, when visible on screen, enables a target node.
</brief_description>
<description>
- VisibleOnScreenEnabler2D detects when it is visible on screen (just like [VisibleOnScreenNotifier2D]) and automatically enables or disables the target node. The target node is disabled when [VisibleOnScreenEnabler2D] is not visible on screen (including when [member CanvasItem.visible] is [code]false[/code]), and enabled when the enabler is visible. The disabling is achieved by changing [member Node.process_mode].
+ [VisibleOnScreenEnabler2D] contains a rectangular region of 2D space and a target node. The target node will be automatically enabled (via its [member Node.process_mode] property) when any part of this region becomes visible on the screen, and automatically disabled otherwise. This can for example be used to activate enemies only when the player approaches them.
+ See [VisibleOnScreenNotifier2D] if you only want to be notified when the region is visible on screen.
+ [b]Note:[/b] [VisibleOnScreenEnabler2D] uses the render culling code to determine whether it's visible on screen, so it won't function unless [member CanvasItem.visible] is set to [code]true[/code].
</description>
<tutorials>
</tutorials>
<members>
<member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler2D.EnableMode" default="0">
- Determines how the node is enabled. Corresponds to [enum Node.ProcessMode]. Disabled node uses [constant Node.PROCESS_MODE_DISABLED].
+ Determines how the target node is enabled. Corresponds to [enum Node.ProcessMode]. When the node is disabled, it always uses [constant Node.PROCESS_MODE_DISABLED].
</member>
<member name="enable_node_path" type="NodePath" setter="set_enable_node_path" getter="get_enable_node_path" default="NodePath(&quot;..&quot;)">
- The path to the target node, relative to the [VisibleOnScreenEnabler2D]. The target node is cached; it's only assigned when setting this property (if the [VisibleOnScreenEnabler2D] is inside scene tree) and every time the [VisibleOnScreenEnabler2D] enters the scene tree. If the path is invalid, nothing will happen.
+ The path to the target node, relative to the [VisibleOnScreenEnabler2D]. The target node is cached; it's only assigned when setting this property (if the [VisibleOnScreenEnabler2D] is inside the scene tree) and every time the [VisibleOnScreenEnabler2D] enters the scene tree. If the path is invalid, an error will be printed in the editor and no node will be affected.
</member>
</members>
<constants>
diff --git a/doc/classes/VisibleOnScreenEnabler3D.xml b/doc/classes/VisibleOnScreenEnabler3D.xml
index 1808953fcc..a26a47ac92 100644
--- a/doc/classes/VisibleOnScreenEnabler3D.xml
+++ b/doc/classes/VisibleOnScreenEnabler3D.xml
@@ -1,28 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisibleOnScreenEnabler3D" inherits="VisibleOnScreenNotifier3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Enables certain nodes only when approximately visible.
+ A box-shaped region of 3D space that, when visible on screen, enables a target node.
</brief_description>
<description>
- The VisibleOnScreenEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself.
- If you just want to receive notifications, use [VisibleOnScreenNotifier3D] instead.
- [b]Note:[/b] VisibleOnScreenEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot].
- [b]Note:[/b] VisibleOnScreenEnabler3D will not affect nodes added after scene initialization.
+ [VisibleOnScreenEnabler3D] contains a box-shaped region of 3D space and a target node. The target node will be automatically enabled (via its [member Node.process_mode] property) when any part of this region becomes visible on the screen, and automatically disabled otherwise. This can for example be used to activate enemies only when the player approaches them.
+ See [VisibleOnScreenNotifier3D] if you only want to be notified when the region is visible on screen.
+ [b]Note:[/b] [VisibleOnScreenEnabler3D] uses an approximate heuristic that doesn't take walls and other occlusion into account, unless occlusion culling is used. It also won't function unless [member Node3D.visible] is set to [code]true[/code].
</description>
<tutorials>
</tutorials>
<members>
<member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler3D.EnableMode" default="0">
+ Determines how the target node is enabled. Corresponds to [enum Node.ProcessMode]. When the node is disabled, it always uses [constant Node.PROCESS_MODE_DISABLED].
</member>
<member name="enable_node_path" type="NodePath" setter="set_enable_node_path" getter="get_enable_node_path" default="NodePath(&quot;..&quot;)">
+ The path to the target node, relative to the [VisibleOnScreenEnabler3D]. The target node is cached; it's only assigned when setting this property (if the [VisibleOnScreenEnabler3D] is inside the scene tree) and every time the [VisibleOnScreenEnabler3D] enters the scene tree. If the path is invalid, an error will be printed in the editor and no node will be affected.
</member>
</members>
<constants>
<constant name="ENABLE_MODE_INHERIT" value="0" enum="EnableMode">
+ Corresponds to [constant Node.PROCESS_MODE_INHERIT].
</constant>
<constant name="ENABLE_MODE_ALWAYS" value="1" enum="EnableMode">
+ Corresponds to [constant Node.PROCESS_MODE_ALWAYS].
</constant>
<constant name="ENABLE_MODE_WHEN_PAUSED" value="2" enum="EnableMode">
+ Corresponds to [constant Node.PROCESS_MODE_WHEN_PAUSED].
</constant>
</constants>
</class>
diff --git a/doc/classes/VisibleOnScreenNotifier2D.xml b/doc/classes/VisibleOnScreenNotifier2D.xml
index dc36e25003..9d22bf6cff 100644
--- a/doc/classes/VisibleOnScreenNotifier2D.xml
+++ b/doc/classes/VisibleOnScreenNotifier2D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisibleOnScreenNotifier2D" inherits="Node2D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Detects when the node extents are visible on screen.
+ A rectangular region of 2D space that detects whether it is visible on screen.
</brief_description>
<description>
- The VisibleOnScreenNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
- If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler2D] instead.
- [b]Note:[/b] VisibleOnScreenNotifier2D uses the render culling code to determine whether it's visible on screen, which also means that its [member CanvasItem.visible] must be [code]true[/code] to work correctly.
+ [VisibleOnScreenEnabler2D] represents a rectangular region of 2D space. When any part of this region becomes visible on screen or in a viewport, it will emit a [signal screen_entered] signal, and likewise it will emit a [signal screen_exited] signal when no part of it remains visible.
+ If you want a node to be enabled automatically when this region is visible on screen, use [VisibleOnScreenEnabler2D].
+ [b]Note:[/b] [VisibleOnScreenNotifier2D] uses the render culling code to determine whether it's visible on screen, so it won't function unless [member CanvasItem.visible] is set to [code]true[/code].
</description>
<tutorials>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
@@ -16,7 +16,7 @@
<return type="bool" />
<description>
If [code]true[/code], the bounding rectangle is on the screen.
- [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass.
+ [b]Note:[/b] It takes one frame for the [VisibleOnScreenNotifier2D]'s visibility to be determined once added to the scene tree, so this method will always return [code]false[/code] right after it is instantiated, before the draw pass.
</description>
</method>
</methods>
diff --git a/doc/classes/VisibleOnScreenNotifier3D.xml b/doc/classes/VisibleOnScreenNotifier3D.xml
index ba1fa763d3..38d55cd331 100644
--- a/doc/classes/VisibleOnScreenNotifier3D.xml
+++ b/doc/classes/VisibleOnScreenNotifier3D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisibleOnScreenNotifier3D" inherits="VisualInstance3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Detects approximately when the node is visible on screen.
+ A box-shaped region of 3D space that detects whether it is visible on screen.
</brief_description>
<description>
- The VisibleOnScreenNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view.
- If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler3D] instead.
- [b]Note:[/b] VisibleOnScreenNotifier3D uses the render culling code to determine whether it's visible on screen, which also means that its [member Node3D.visible] must be [code]true[/code] to work correctly.
+ [VisibleOnScreenEnabler3D] represents a box-shaped region of 3D space. When any part of this region becomes visible on screen or in a [Camera3D]'s view, it will emit a [signal screen_entered] signal, and likewise it will emit a [signal screen_exited] signal when no part of it remains visible.
+ If you want a node to be enabled automatically when this region is visible on screen, use [VisibleOnScreenEnabler3D].
+ [b]Note:[/b] [VisibleOnScreenNotifier3D] uses an approximate heuristic that doesn't take walls and other occlusion into account, unless occlusion culling is used. It also won't function unless [member Node3D.visible] is set to [code]true[/code].
</description>
<tutorials>
</tutorials>
@@ -14,25 +14,25 @@
<method name="is_on_screen" qualifiers="const">
<return type="bool" />
<description>
- If [code]true[/code], the bounding box is on the screen.
- [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass.
+ Returns [code]true[/code] if the bounding box is on the screen.
+ [b]Note:[/b] It takes one frame for the [VisibleOnScreenNotifier3D]'s visibility to be assessed once added to the scene tree, so this method will always return [code]false[/code] right after it is instantiated.
</description>
</method>
</methods>
<members>
<member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(-1, -1, -1, 2, 2, 2)">
- The VisibleOnScreenNotifier3D's bounding box.
+ The [VisibleOnScreenNotifier3D]'s bounding box.
</member>
</members>
<signals>
<signal name="screen_entered">
<description>
- Emitted when the VisibleOnScreenNotifier3D enters the screen.
+ Emitted when the [VisibleOnScreenNotifier3D] enters the screen.
</description>
</signal>
<signal name="screen_exited">
<description>
- Emitted when the VisibleOnScreenNotifier3D exits the screen.
+ Emitted when the [VisibleOnScreenNotifier3D] exits the screen.
</description>
</signal>
</signals>