summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/AABB.xml16
-rw-r--r--doc/classes/AESContext.xml2
-rw-r--r--doc/classes/Array.xml8
-rw-r--r--doc/classes/BaseButton.xml3
-rw-r--r--doc/classes/Basis.xml35
-rw-r--r--doc/classes/CodeHighlighter.xml145
-rw-r--r--doc/classes/CollisionObject2D.xml8
-rw-r--r--doc/classes/Color.xml26
-rw-r--r--doc/classes/Control.xml4
-rw-r--r--doc/classes/Decal.xml4
-rw-r--r--doc/classes/Directory.xml4
-rw-r--r--doc/classes/DisplayServer.xml14
-rw-r--r--doc/classes/DynamicFont.xml8
-rw-r--r--doc/classes/EditorFileSystem.xml1
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml12
-rw-r--r--doc/classes/EditorInspector.xml15
-rw-r--r--doc/classes/EditorInterface.xml68
-rw-r--r--doc/classes/EditorNode3DGizmo.xml9
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml2
-rw-r--r--doc/classes/EditorProperty.xml14
-rw-r--r--doc/classes/EditorSettings.xml33
-rw-r--r--doc/classes/EditorSyntaxHighlighter.xml31
-rw-r--r--doc/classes/EditorTranslationParserPlugin.xml25
-rw-r--r--doc/classes/File.xml1
-rw-r--r--doc/classes/HTTPClient.xml1
-rw-r--r--doc/classes/HTTPRequest.xml11
-rw-r--r--doc/classes/InputEventMouseMotion.xml2
-rw-r--r--doc/classes/KinematicBody2D.xml2
-rw-r--r--doc/classes/KinematicBody3D.xml2
-rw-r--r--doc/classes/LineEdit.xml3
-rw-r--r--doc/classes/OS.xml15
-rw-r--r--doc/classes/Object.xml5
-rw-r--r--doc/classes/PackedByteArray.xml16
-rw-r--r--doc/classes/PackedColorArray.xml16
-rw-r--r--doc/classes/PackedFloat32Array.xml16
-rw-r--r--doc/classes/PackedFloat64Array.xml16
-rw-r--r--doc/classes/PackedInt32Array.xml16
-rw-r--r--doc/classes/PackedInt64Array.xml16
-rw-r--r--doc/classes/PackedScene.xml7
-rw-r--r--doc/classes/PackedStringArray.xml16
-rw-r--r--doc/classes/PackedVector2Array.xml16
-rw-r--r--doc/classes/PackedVector3Array.xml16
-rw-r--r--doc/classes/Plane.xml29
-rw-r--r--doc/classes/PrimitiveMesh.xml7
-rw-r--r--doc/classes/ProjectSettings.xml10
-rw-r--r--doc/classes/Quat.xml41
-rw-r--r--doc/classes/RayCast2D.xml2
-rw-r--r--doc/classes/RayCast3D.xml2
-rw-r--r--doc/classes/Rect2.xml7
-rw-r--r--doc/classes/Rect2i.xml7
-rw-r--r--doc/classes/RenderingServer.xml4
-rw-r--r--doc/classes/Resource.xml3
-rw-r--r--doc/classes/RigidBody3D.xml7
-rw-r--r--doc/classes/ScriptEditor.xml28
-rw-r--r--doc/classes/ScriptEditorBase.xml67
-rw-r--r--doc/classes/Skeleton3D.xml2
-rw-r--r--doc/classes/Sky.xml12
-rw-r--r--doc/classes/String.xml22
-rw-r--r--doc/classes/SyntaxHighlighter.xml53
-rw-r--r--doc/classes/TextEdit.xml68
-rw-r--r--doc/classes/Timer.xml1
-rw-r--r--doc/classes/Transform.xml16
-rw-r--r--doc/classes/Transform2D.xml34
-rw-r--r--doc/classes/UDPServer.xml20
-rw-r--r--doc/classes/Vector2.xml65
-rw-r--r--doc/classes/Vector2i.xml12
-rw-r--r--doc/classes/Vector3.xml70
-rw-r--r--doc/classes/Vector3i.xml16
-rw-r--r--doc/classes/VehicleBody3D.xml1
-rw-r--r--doc/classes/VehicleWheel3D.xml1
-rw-r--r--doc/classes/Viewport.xml2
-rw-r--r--doc/classes/VisibilityEnabler2D.xml3
-rw-r--r--doc/classes/VisibilityEnabler3D.xml3
-rw-r--r--doc/classes/VisibilityNotifier2D.xml3
-rw-r--r--doc/classes/VisibilityNotifier3D.xml3
-rw-r--r--doc/classes/VisualShaderNodeMultiplyAdd.xml29
-rw-r--r--doc/classes/VisualShaderNodeOutput.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorRefract.xml2
79 files changed, 1013 insertions, 323 deletions
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 3f2f27d121..ae80abc5d2 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -18,7 +18,14 @@
<argument index="1" name="size" type="Vector3">
</argument>
<description>
- Optional constructor, accepts position and size.
+ Constructs an [AABB] from a position and size.
+ </description>
+ </method>
+ <method name="abs">
+ <return type="AABB">
+ </return>
+ <description>
+ Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive.
</description>
</method>
<method name="encloses">
@@ -197,13 +204,14 @@
</methods>
<members>
<member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
- Ending corner. This is calculated as [code]position + size[/code]. Changing this property changes [member size] accordingly.
+ Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
</member>
<member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
- Beginning corner.
+ Beginning corner. Typically has values lower than [member end].
</member>
<member name="size" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
- Size from position to end.
+ Size from [member position] to [member end]. Typically all components are positive.
+ If the size is negative, you can use [method abs] to fix it.
</member>
</members>
<constants>
diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml
index ab4d0e0bc3..ff433370bd 100644
--- a/doc/classes/AESContext.xml
+++ b/doc/classes/AESContext.xml
@@ -51,7 +51,7 @@
<return type="PackedByteArray">
</return>
<description>
- Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this funciton.
+ Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this function.
Note: This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT].
</description>
</method>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 9a3eccd8dc..b79b24e0bc 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -227,10 +227,10 @@
<description>
Returns [code]true[/code] if the array contains the given value.
[codeblock]
- ["inside", 7].has("inside") == true
- ["inside", 7].has("outside") == false
- ["inside", 7].has(7) == true
- ["inside", 7].has("7") == false
+ print(["inside", 7].has("inside")) # True
+ print(["inside", 7].has("outside")) # False
+ print(["inside", 7].has(7)) # True
+ print(["inside", 7].has("7")) # False
[/codeblock]
[b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows:
[codeblock]
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 5e908b0e53..3812b45b13 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -13,7 +13,7 @@
<return type="void">
</return>
<description>
- Called when the button is pressed.
+ Called when the button is pressed. If you need to know the button's pressed state (and [member toggle_mode] is active), use [method _toggled] instead.
</description>
</method>
<method name="_toggled" qualifiers="virtual">
@@ -89,6 +89,7 @@
<signal name="pressed">
<description>
Emitted when the button is toggled or pressed. This is on [signal button_down] if [member action_mode] is [constant ACTION_MODE_BUTTON_PRESS] and on [signal button_up] otherwise.
+ If you need to know the button's pressed state (and [member toggle_mode] is active), use [signal toggled] instead.
</description>
</signal>
<signal name="toggled">
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 3952ea2d27..47433d7adc 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -4,10 +4,13 @@
3×3 matrix datatype.
</brief_description>
<description>
- 3×3 matrix used for 3D rotation and scale. Contains 3 vector fields X, Y and Z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized (due to scaling). Almost always used as an orthogonal basis for a [Transform].
- For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).
+ 3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a Transform.
+ Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).
+ Can also be accessed as array of 3D vectors. These vectors are normally orthogonal to each other, but are not necessarily normalized (due to scaling).
+ For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link>
</tutorials>
<methods>
@@ -17,7 +20,7 @@
<argument index="0" name="from" type="Quat">
</argument>
<description>
- Create a rotation matrix from the given quaternion.
+ Constructs a pure rotation basis matrix from the given quaternion.
</description>
</method>
<method name="Basis">
@@ -26,7 +29,8 @@
<argument index="0" name="from" type="Vector3">
</argument>
<description>
- Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X angle, Y angle, Z angle).
+ Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle).
+ Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles.
</description>
</method>
<method name="Basis">
@@ -37,7 +41,7 @@
<argument index="1" name="phi" type="float">
</argument>
<description>
- Create a rotation matrix which rotates around the given axis by the specified angle, in radians. The axis must be a normalized vector.
+ Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]phi[/code], in radians. The axis must be a normalized vector.
</description>
</method>
<method name="Basis">
@@ -50,28 +54,30 @@
<argument index="2" name="z_axis" type="Vector3">
</argument>
<description>
- Create a matrix from 3 axis vectors.
+ Constructs a basis matrix from 3 axis vectors (matrix columns).
</description>
</method>
<method name="determinant">
<return type="float">
</return>
<description>
- Returns the determinant of the matrix.
+ Returns the determinant of the basis matrix. If the basis is uniformly scaled, its determinant is the square of the scale.
+ A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid.
</description>
</method>
<method name="get_euler">
<return type="Vector3">
</return>
<description>
- Returns the basis's rotation in the form of Euler angles (in the YXZ convention: first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). See [method get_rotation_quat] if you need a quaternion instead.
+ Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
+ Consider using the [method get_rotation_quat] method instead, which returns a [Quat] quaternion instead of Euler angles.
</description>
</method>
<method name="get_orthogonal_index">
<return type="int">
</return>
<description>
- This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to the Godot source code.
+ This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the [GridMap] editor. For further details, refer to the Godot source code.
</description>
</method>
<method name="get_rotation_quat">
@@ -193,25 +199,26 @@
<argument index="0" name="v" type="Vector3">
</argument>
<description>
- Returns a vector transformed (multiplied) by the transposed matrix.
+ Returns a vector transformed (multiplied) by the transposed basis matrix.
[b]Note:[/b] This results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection.
</description>
</method>
</methods>
<members>
<member name="x" type="Vector3" setter="" getter="" default="Vector3( 1, 0, 0 )">
- The basis matrix's X vector.
+ The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code].
</member>
<member name="y" type="Vector3" setter="" getter="" default="Vector3( 0, 1, 0 )">
- The basis matrix's Y vector.
+ The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code].
</member>
<member name="z" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 1 )">
- The basis matrix's Z vector.
+ The basis matrix's Z vector (column 2). Equivalent to array index [code]2[/code].
</member>
</members>
<constants>
<constant name="IDENTITY" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )">
- The identity basis. This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer.
+ The identity basis, with no rotation or scaling applied.
+ This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
</constant>
<constant name="FLIP_X" value="Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )">
The basis that will flip something along the X axis when used in a transformation.
diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml
new file mode 100644
index 0000000000..7a1dad547b
--- /dev/null
+++ b/doc/classes/CodeHighlighter.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CodeHighlighter" inherits="SyntaxHighlighter" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_color_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="p_start_key" type="String">
+ </argument>
+ <argument index="1" name="p_end_key" type="String">
+ </argument>
+ <argument index="2" name="p_color" type="Color">
+ </argument>
+ <argument index="3" name="p_line_only" type="bool" default="false">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_keyword_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="keyword" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_member_keyword_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="member_keyword" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_color_regions">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="clear_keyword_colors">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="clear_member_keyword_colors">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_keyword_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="keyword" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_member_keyword_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <argument index="0" name="member_keyword" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_color_region" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="p_start_key" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_keyword_color" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="keyword" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="has_member_keyword_color" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="member_keyword" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_color_region">
+ <return type="void">
+ </return>
+ <argument index="0" name="p_start_key" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_keyword_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="keyword" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_member_keyword_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="member_keyword" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="color_regions" type="Dictionary" setter="set_color_regions" getter="get_color_regions" default="{}">
+ </member>
+ <member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color( 0, 0, 0, 1 )">
+ </member>
+ <member name="keyword_colors" type="Dictionary" setter="set_keyword_colors" getter="get_keyword_colors" default="{}">
+ </member>
+ <member name="member_keyword_colors" type="Dictionary" setter="set_member_keyword_colors" getter="get_member_keyword_colors" default="{}">
+ </member>
+ <member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color( 0, 0, 0, 1 )">
+ </member>
+ <member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color( 0, 0, 0, 1 )">
+ </member>
+ <member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color( 0, 0, 0, 1 )">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index e8f7a59e4c..bf82e921fb 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -217,7 +217,7 @@
</methods>
<members>
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" default="true">
- If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [code]collision_layer[/code] bit to be set.
+ If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events.
</member>
</members>
<signals>
@@ -229,17 +229,17 @@
<argument index="2" name="shape_idx" type="int">
</argument>
<description>
- Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details.
+ Emitted when an input event occurs and [code]input_pickable[/code] is [code]true[/code]. See [method _input_event] for details.
</description>
</signal>
<signal name="mouse_entered">
<description>
- Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set.
+ Emitted when the mouse pointer enters any of this object's shapes.
</description>
</signal>
<signal name="mouse_exited">
<description>
- Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set.
+ Emitted when the mouse pointer exits all this object's shapes.
</description>
</signal>
</signals>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 17b474531e..240e70db9f 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Color" version="4.0">
<brief_description>
- Color in RGBA format with some support for ARGB format.
+ Color in RGBA format using floats on the range of 0 to 1.
</brief_description>
<description>
- A color is represented by red, green, and blue [code](r, g, b)[/code] components. Additionally, [code]a[/code] represents the alpha component, often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as [member CanvasItem.modulate]) may accept values greater than 1.
+ A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
@@ -277,37 +277,37 @@
</methods>
<members>
<member name="a" type="float" setter="" getter="" default="1.0">
- Alpha value (range 0 to 1).
+ The color's alpha (transparency) component, typically on the range of 0 to 1.
</member>
<member name="a8" type="int" setter="" getter="" default="255">
- Alpha value (range 0 to 255).
+ Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1.
</member>
<member name="b" type="float" setter="" getter="" default="0.0">
- Blue value (range 0 to 1).
+ The color's blue component, typically on the range of 0 to 1.
</member>
<member name="b8" type="int" setter="" getter="" default="0">
- Blue value (range 0 to 255).
+ Wrapper for [member b] that uses the range 0 to 255 instead of 0 to 1.
</member>
<member name="g" type="float" setter="" getter="" default="0.0">
- Green value (range 0 to 1).
+ The color's green component, typically on the range of 0 to 1.
</member>
<member name="g8" type="int" setter="" getter="" default="0">
- Green value (range 0 to 255).
+ Wrapper for [member g] that uses the range 0 to 255 instead of 0 to 1.
</member>
<member name="h" type="float" setter="" getter="" default="0.0">
- HSV hue value (range 0 to 1).
+ The HSV hue of this color, on the range 0 to 1.
</member>
<member name="r" type="float" setter="" getter="" default="0.0">
- Red value (range 0 to 1).
+ The color's red component, typically on the range of 0 to 1.
</member>
<member name="r8" type="int" setter="" getter="" default="0">
- Red value (range 0 to 255).
+ Wrapper for [member r] that uses the range 0 to 255 instead of 0 to 1.
</member>
<member name="s" type="float" setter="" getter="" default="0.0">
- HSV saturation value (range 0 to 1).
+ The HSV saturation of this color, on the range 0 to 1.
</member>
<member name="v" type="float" setter="" getter="" default="0.0">
- HSV value (range 0 to 1).
+ The HSV value (brightness) of this color, on the range 0 to 1.
</member>
</members>
<constants>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 9dbb843902..1f495bf91a 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -856,7 +856,9 @@
The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position.
</member>
<member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
- The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset].
+ The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value.
+ [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.
+ [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property.
</member>
<member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2( 0, 0 )">
The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically.
diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml
index f7329d1537..f9baa3b09a 100644
--- a/doc/classes/Decal.xml
+++ b/doc/classes/Decal.xml
@@ -17,7 +17,7 @@
<argument index="0" name="type" type="int" enum="Decal.DecalTexture">
</argument>
<description>
- Returns the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly.
+ Returns the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly.
For example, instead of [code]albedo_tex = $Decal.get_texture(Decal.TEXTURE_ALBEDO)[/code], use [code]albedo_tex = $Decal.texture_albedo[/code].
One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example:
[codeblock]
@@ -34,7 +34,7 @@
<argument index="1" name="texture" type="Texture2D">
</argument>
<description>
- Sets the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly.
+ Sets the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly.
For example, instead of [code]$Decal.set_texture(Decal.TEXTURE_ALBEDO, albedo_tex)[/code], use [code]$Decal.texture_albedo = albedo_tex[/code].
One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example:
[codeblock]
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index ed4257a809..a86dbfedde 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Directory type. It is used to manage directories and their content (not restricted to the project folder).
- When creating a new [Directory], its default opened directory will be [code]res://[/code]. This may change in the future, so it is advised to always use [method open] to initialize your [Directory] where you want to operate, with explicit error checking.
+ When creating a new [Directory], it must be explicitly opened using [method open] before most methods can be used. However, [method file_exists] and [method dir_exists] can be used without opening a directory. If so, they use a path relative to [code]res://[/code].
Here is an example on how to iterate through the files of a directory:
[codeblock]
func dir_contents(path):
@@ -63,6 +63,7 @@
</argument>
<description>
Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path.
+ If the [Directory] is not open, the path is relative to [code]res://[/code].
</description>
</method>
<method name="file_exists">
@@ -72,6 +73,7 @@
</argument>
<description>
Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path.
+ If the [Directory] is not open, the path is relative to [code]res://[/code].
</description>
</method>
<method name="get_current_dir">
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 1fb1de2c12..49af8d7de2 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -139,7 +139,7 @@
<description>
</description>
</method>
- <method name="get_swap_ok_cancel">
+ <method name="get_swap_cancel_ok">
<return type="bool">
</return>
<description>
@@ -523,6 +523,15 @@
<description>
</description>
</method>
+ <method name="screen_get_max_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the greatest scale factor of all screens.
+ [b]Note:[/b] On macOS returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases.
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
<method name="screen_get_orientation" qualifiers="const">
<return type="int" enum="DisplayServer.ScreenOrientation">
</return>
@@ -545,6 +554,9 @@
<argument index="0" name="screen" type="int" default="-1">
</argument>
<description>
+ Return the scale factor of the specified screen by index.
+ [b]Note:[/b] On macOS returned value is [code]2.0[/code] for hiDPI (Retina) screen, and [code]1.0[/code] for all other cases.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="screen_get_size" qualifiers="const">
diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml
index 0864c3ba36..24df056c6b 100644
--- a/doc/classes/DynamicFont.xml
+++ b/doc/classes/DynamicFont.xml
@@ -26,6 +26,14 @@
Adds a fallback font.
</description>
</method>
+ <method name="get_available_chars" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns a string containing all the characters available in the main and all the fallback fonts.
+ If a given character is included in more than one font, it appears only once in the returned string.
+ </description>
+ </method>
<method name="get_fallback" qualifiers="const">
<return type="DynamicFontData">
</return>
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index 9bb51af2d0..5461dccd27 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -97,6 +97,7 @@
<argument index="0" name="resources" type="PackedStringArray">
</argument>
<description>
+ Emitted if at least one resource is reloaded when the filesystem is scanned.
</description>
</signal>
<signal name="sources_changed">
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
index 096fe5df8f..b852ae1063 100644
--- a/doc/classes/EditorFileSystemDirectory.xml
+++ b/doc/classes/EditorFileSystemDirectory.xml
@@ -67,6 +67,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the base class of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string.
</description>
</method>
<method name="get_file_script_class_name" qualifiers="const">
@@ -75,6 +76,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Returns the name of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string.
</description>
</method>
<method name="get_file_type" qualifiers="const">
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index 0aac59c727..ea2dfae9a5 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -83,6 +83,16 @@
<argument index="1" name="options" type="Dictionary">
</argument>
<description>
+ This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example:
+ [codeblock]
+ func get_option_visibility(option, options):
+ # Only show the lossy quality setting if the compression mode is set to "Lossy".
+ if option == "compress/lossy_quality" and options.has("compress/mode"):
+ return int(options["compress/mode"]) == COMPRESS_LOSSY
+
+ return true
+ [/codeblock]
+ Return [code]true[/code] to make all options always visible.
</description>
</method>
<method name="get_preset_count" qualifiers="virtual">
@@ -150,6 +160,8 @@
<argument index="4" name="gen_files" type="Array">
</argument>
<description>
+ Imports [code]source_file[/code] into [code]save_path[/code] with the import [code]options[/code] specified. The [code]platform_variants[/code] and [code]gen_files[/code] arrays will be modified by this function.
+ This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index 2f62fe9e40..5fbe427f67 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -14,41 +14,50 @@
<return type="void">
</return>
<description>
+ Refreshes the inspector.
+ [b]Note:[/b] To save on CPU resources, calling this method will do nothing if the time specified in [code]docks/property_editor/auto_refresh_interval[/code] editor setting hasn't passed yet since this method was last called. (By default, this interval is set to 0.3 seconds.)
</description>
</method>
</methods>
<members>
- <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false" />
+ <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false">
+ If [code]true[/code], horizontal scrolling is enabled. An horizontal scroll bar will display at the bottom of the inspector.
+ </member>
</members>
<signals>
<signal name="object_id_selected">
<argument index="0" name="id" type="int">
</argument>
<description>
+ Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree inspector.
</description>
</signal>
<signal name="property_deleted">
<argument index="0" name="property" type="String">
</argument>
<description>
+ Emitted when a property is removed from the inspector.
</description>
</signal>
<signal name="property_edited">
<argument index="0" name="property" type="String">
</argument>
<description>
+ Emitted when a property is edited in the inspector.
</description>
</signal>
<signal name="property_keyed">
<argument index="0" name="property" type="String">
</argument>
<description>
+ Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled.
</description>
</signal>
<signal name="property_selected">
<argument index="0" name="property" type="String">
</argument>
<description>
+ Emitted when a property is selected in the inspector.
</description>
</signal>
<signal name="property_toggled">
@@ -57,6 +66,8 @@
<argument index="1" name="checked" type="bool">
</argument>
<description>
+ Emitted when a boolean property is toggled in the inspector.
+ [b]Note:[/b] This signal is never emitted if the internal [code]autoclear[/code] property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself.
</description>
</signal>
<signal name="resource_selected">
@@ -65,10 +76,12 @@
<argument index="1" name="prop" type="String">
</argument>
<description>
+ Emitted when a resource is selected in the inspector.
</description>
</signal>
<signal name="restart_requested">
<description>
+ Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings.
</description>
</signal>
</signals>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index c2c73a8b83..8b2b9c9350 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -23,13 +23,14 @@
<return type="Control">
</return>
<description>
- Returns the main container of Godot editor's window. You can use it, for example, to retrieve the size of the container and place your controls accordingly.
+ Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly.
</description>
</method>
<method name="get_current_path" qualifiers="const">
<return type="String">
</return>
<description>
+ Returns the current path being viewed in the [FileSystemDock].
</description>
</method>
<method name="get_edited_scene_root">
@@ -43,26 +44,29 @@
<return type="EditorSettings">
</return>
<description>
- Returns the [EditorSettings].
+ Returns the editor's [EditorSettings] instance.
</description>
</method>
<method name="get_editor_viewport">
<return type="Control">
</return>
<description>
- Returns the editor [Viewport].
+ Returns the editor's [Viewport] instance.
+ [b]Note:[/b] This returns the main editor viewport containing the whole editor, not the 2D or 3D viewports specifically.
</description>
</method>
<method name="get_file_system_dock">
<return type="FileSystemDock">
</return>
<description>
+ Returns the editor's [FileSystemDock] instance.
</description>
</method>
<method name="get_inspector" qualifiers="const">
<return type="EditorInspector">
</return>
<description>
+ Returns the editor's [EditorInspector] instance.
</description>
</method>
<method name="get_open_scenes" qualifiers="const">
@@ -72,38 +76,46 @@
Returns an [Array] with the file paths of the currently opened scenes.
</description>
</method>
+ <method name="get_playing_scene" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string.
+ </description>
+ </method>
<method name="get_resource_filesystem">
<return type="EditorFileSystem">
</return>
<description>
- Returns the [EditorFileSystem].
+ Returns the editor's [EditorFileSystem] instance.
</description>
</method>
<method name="get_resource_previewer">
<return type="EditorResourcePreview">
</return>
<description>
- Returns the [EditorResourcePreview].
+ Returns the editor's [EditorResourcePreview] instance.
</description>
</method>
<method name="get_script_editor">
<return type="ScriptEditor">
</return>
<description>
- Returns the [ScriptEditor].
+ Returns the editor's [ScriptEditor] instance.
</description>
</method>
<method name="get_selected_path" qualifiers="const">
<return type="String">
</return>
<description>
+ Returns the path of the directory currently selected in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead.
</description>
</method>
<method name="get_selection">
<return type="EditorSelection">
</return>
<description>
- Returns the [EditorSelection].
+ Returns the editor's [EditorSelection] instance.
</description>
</method>
<method name="inspect_object">
@@ -114,7 +126,14 @@
<argument index="1" name="for_property" type="String" default="&quot;&quot;">
</argument>
<description>
- Shows the given property on the given [code]object[/code] in the Editor's Inspector dock.
+ Shows the given property on the given [code]object[/code] in the editor's Inspector dock.
+ </description>
+ </method>
+ <method name="is_playing_scene" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if a scene is currently being played, [code]false[/code] otherwise. Paused scenes are considered as being played.
</description>
</method>
<method name="is_plugin_enabled" qualifiers="const">
@@ -123,7 +142,7 @@
<argument index="0" name="plugin" type="String">
</argument>
<description>
- Returns the enabled status of a plugin. The plugin name is the same as its directory name.
+ Returns [code]true[/code] if the specified [code]plugin[/code] is enabled. The plugin name is the same as its directory name.
</description>
</method>
<method name="make_mesh_previews">
@@ -146,6 +165,29 @@
Opens the scene at the given path.
</description>
</method>
+ <method name="play_current_scene">
+ <return type="void">
+ </return>
+ <description>
+ Plays the currently active scene.
+ </description>
+ </method>
+ <method name="play_custom_scene">
+ <return type="void">
+ </return>
+ <argument index="0" name="scene_filepath" type="String">
+ </argument>
+ <description>
+ Plays the scene specified by its filepath.
+ </description>
+ </method>
+ <method name="play_main_scene">
+ <return type="void">
+ </return>
+ <description>
+ Plays the main scene.
+ </description>
+ </method>
<method name="reload_scene_from_path">
<return type="void">
</return>
@@ -188,6 +230,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Sets the editor's current main screen to the one specified in [code]name[/code]. [code]name[/code] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]).
</description>
</method>
<method name="set_plugin_enabled">
@@ -201,6 +244,13 @@
Sets the enabled status of a plugin. The plugin name is the same as its directory name.
</description>
</method>
+ <method name="stop_playing_scene">
+ <return type="void">
+ </return>
+ <description>
+ Stops the scene that is currently playing.
+ </description>
+ </method>
</methods>
<members>
<member name="distraction_free_mode" type="bool" setter="set_distraction_free_mode" getter="is_distraction_free_mode_enabled">
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index 6d695ddeea..45541b9263 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -15,6 +15,7 @@
<argument index="0" name="segments" type="PackedVector3Array">
</argument>
<description>
+ Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this function during [method redraw].
</description>
</method>
<method name="add_collision_triangles">
@@ -69,6 +70,7 @@
<argument index="3" name="material" type="Material" default="null">
</argument>
<description>
+ Adds a mesh to the gizmo with the specified [code]billboard[/code] state, [code]skeleton[/code] and [code]material[/code]. If [code]billboard[/code] is [code]true[/code], the mesh will rotate to always face the camera. Call this function during [method redraw].
</description>
</method>
<method name="add_unscaled_billboard">
@@ -88,6 +90,7 @@
<return type="void">
</return>
<description>
+ Removes everything in the gizmo including meshes, collisions and handles.
</description>
</method>
<method name="commit_handle" qualifiers="virtual">
@@ -143,14 +146,14 @@
<argument index="0" name="index" type="int">
</argument>
<description>
- Gets whether a handle is highlighted or not.
+ Returns [code]true[/code] if the handle at index [code]index[/code] is highlighted by being hovered with the mouse.
</description>
</method>
<method name="redraw" qualifiers="virtual">
<return type="void">
</return>
<description>
- This function is called when the Node3D this gizmo refers to changes (the [method Node3D.update_gizmo] is called).
+ This function is called when the [Node3D] this gizmo refers to changes (the [method Node3D.update_gizmo] is called).
</description>
</method>
<method name="set_handle" qualifiers="virtual">
@@ -173,6 +176,7 @@
<argument index="0" name="hidden" type="bool">
</argument>
<description>
+ Sets the gizmo's hidden state. If [code]true[/code], the gizmo will be hidden. If [code]false[/code], it will be shown.
</description>
</method>
<method name="set_spatial_node">
@@ -181,6 +185,7 @@
<argument index="0" name="node" type="Node">
</argument>
<description>
+ Sets the reference [Node3D] node for the gizmo. [code]node[/code] must inherit from [Node3D].
</description>
</method>
</methods>
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index ca75b47fbf..b81281b5b6 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -139,6 +139,8 @@
<return type="String">
</return>
<description>
+ Override this method to set the gizmo's priority. Higher values correspond to higher priority. If a gizmo with higher priority conflicts with another gizmo, only the gizmo with higher priority will be used.
+ All built-in editor gizmos return a priority of [code]-1[/code]. If not overridden, this method will return [code]0[/code], which means custom gizmos will automatically override built-in gizmos.
</description>
</method>
<method name="has_gizmo" qualifiers="virtual">
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index 4da3b58b94..f568263ff8 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -73,24 +73,25 @@
</methods>
<members>
<member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false">
- Used by the inspector, set when property is checkable.
+ Used by the inspector, set to [code]true[/code] when the property is checkable.
</member>
<member name="checked" type="bool" setter="set_checked" getter="is_checked" default="false">
- Used by the inspector, when the property is checked.
+ Used by the inspector, set to [code]true[/code] when the property is checked.
</member>
<member name="deletable" type="bool" setter="set_deletable" getter="is_deletable" default="false">
+ Used by the inspector, set to [code]true[/code] when the property can be deleted by the user.
</member>
<member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red" default="false">
- Used by the inspector, when the property must draw with error color.
+ Used by the inspector, set to [code]true[/code] when the property must draw with error color. This is used for editable children's properties.
</member>
<member name="keying" type="bool" setter="set_keying" getter="is_keying" default="false">
- Used by the inspector, when the property can add keys for animation.
+ Used by the inspector, set to [code]true[/code] when the property can add keys for animation.
</member>
<member name="label" type="String" setter="set_label" getter="get_label" default="&quot;&quot;">
- Sets this property to change the label (if you want to show one).
+ Set this property to change the label (if you want to show one).
</member>
<member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false">
- Used by the inspector, when the property is read-only.
+ Used by the inspector, set to [code]true[/code] when the property is read-only.
</member>
</members>
<signals>
@@ -134,6 +135,7 @@
<argument index="0" name="property" type="StringName">
</argument>
<description>
+ Emitted when a property was deleted. Used internally.
</description>
</signal>
<signal name="property_keyed">
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 19921ff5c8..0c6a2d61cd 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -5,11 +5,16 @@
</brief_description>
<description>
Object that holds the project-independent editor settings. These settings are generally visible in the [b]Editor &gt; Editor Settings[/b] menu.
- Accessing the settings is done by using the regular [Object] API, such as:
+ Property names use slash delimiters to distinguish sections. Setting values can be of any [Variant] type. It's recommended to use [code]snake_case[/code] for editor settings to be consistent with the Godot editor itself.
+ Accessing the settings can be done using the following methods, such as:
[codeblock]
- settings.set(prop,value)
- settings.get(prop)
- list_of_settings = settings.get_property_list()
+ # `settings.set("some/property", value)` also works as this class overrides `_set()` internally.
+ settings.set_setting("some/property",value)
+
+ # `settings.get("some/property", value)` also works as this class overrides `_get()` internally.
+ settings.get_setting("some/property")
+
+ var list_of_settings = settings.get_property_list()
[/codeblock]
[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_editor_settings].
</description>
@@ -47,14 +52,14 @@
<argument index="0" name="property" type="String">
</argument>
<description>
- Erase a given setting (pass full property path).
+ Erases the setting whose name is specified by [code]property[/code].
</description>
</method>
<method name="get_favorites" qualifiers="const">
<return type="PackedStringArray">
</return>
<description>
- Gets the list of favorite files and directories for this project.
+ Returns the list of favorite files and directories for this project.
</description>
</method>
<method name="get_project_metadata" qualifiers="const">
@@ -67,20 +72,21 @@
<argument index="2" name="default" type="Variant" default="null">
</argument>
<description>
+ Returns project-specific metadata for the [code]section[/code] and [code]key[/code] specified. If the metadata doesn't exist, [code]default[/code] will be returned instead. See also [method set_project_metadata].
</description>
</method>
<method name="get_project_settings_dir" qualifiers="const">
<return type="String">
</return>
<description>
- Gets the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved.
+ Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved.
</description>
</method>
<method name="get_recent_dirs" qualifiers="const">
<return type="PackedStringArray">
</return>
<description>
- Gets the list of recently visited folders in the file dialog for this project.
+ Returns the list of recently visited folders in the file dialog for this project.
</description>
</method>
<method name="get_setting" qualifiers="const">
@@ -89,6 +95,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the value of the setting specified by [code]name[/code]. This is equivalent to using [method Object.get] on the EditorSettings instance.
</description>
</method>
<method name="get_settings_dir" qualifiers="const">
@@ -106,6 +113,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns [code]true[/code] if the setting specified by [code]name[/code] exists, [code]false[/code] otherwise.
</description>
</method>
<method name="property_can_revert">
@@ -114,6 +122,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns [code]true[/code] if the setting specified by [code]name[/code] can have its value reverted to the default value, [code]false[/code] otherwise. When this method returns [code]true[/code], a Revert button will display next to the setting in the Editor Settings.
</description>
</method>
<method name="property_get_revert">
@@ -122,6 +131,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the default value of the setting specified by [code]name[/code]. This is the value that would be applied when clicking the Revert button in the Editor Settings.
</description>
</method>
<method name="set_favorites">
@@ -143,6 +153,7 @@
<argument index="2" name="update_current" type="bool">
</argument>
<description>
+ Sets the initial value of the setting specified by [code]name[/code] to [code]value[/code]. This is used to provide a value for the Revert button in the Editor Settings. If [code]update_current[/code] is true, the current value of the setting will be set to [code]value[/code] as well.
</description>
</method>
<method name="set_project_metadata">
@@ -155,6 +166,7 @@
<argument index="2" name="data" type="Variant">
</argument>
<description>
+ Sets project-specific metadata with the [code]section[/code], [code]key[/code] and [code]data[/code] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata].
</description>
</method>
<method name="set_recent_dirs">
@@ -174,19 +186,20 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
+ Sets the [code]value[/code] of the setting specified by [code]name[/code]. This is equivalent to using [method Object.set] on the EditorSettings instance.
</description>
</method>
</methods>
<signals>
<signal name="settings_changed">
<description>
- Emitted when editor settings change.
+ Emitted after any editor setting has changed.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_EDITOR_SETTINGS_CHANGED" value="10000">
- Emitted when editor settings change. It used by various editor plugins to update their visuals on theme changes or logic on configuration changes.
+ Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes.
</constant>
</constants>
</class>
diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml
new file mode 100644
index 0000000000..103d95e1d6
--- /dev/null
+++ b/doc/classes/EditorSyntaxHighlighter.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSyntaxHighlighter" inherits="SyntaxHighlighter" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_get_supported_extentions" qualifiers="virtual">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="_get_supported_languages" qualifiers="virtual">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml
index 73098efd99..a40ef45916 100644
--- a/doc/classes/EditorTranslationParserPlugin.xml
+++ b/doc/classes/EditorTranslationParserPlugin.xml
@@ -4,22 +4,39 @@
Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.).
</brief_description>
<description>
- Plugins are registered via [method EditorPlugin.add_translation_parser_plugin] method. To define the parsing and string extraction logic, override the [method parse_text] method in script.
+ Plugins are registered via [method EditorPlugin.add_translation_parser_plugin] method. To define the parsing and string extraction logic, override the [method parse_file] method in script.
The extracted strings will be written into a POT file selected by user under "POT Generation" in "Localization" tab in "Project Settings" menu.
Below shows an example of a custom parser that extracts strings in a CSV file to write into a POT.
[codeblock]
tool
extends EditorTranslationParserPlugin
- func parse_text(text, extracted_strings):
+
+ func parse_file(path, extracted_strings):
+ var file = File.new()
+ file.open(path, File.READ)
+ var text = file.get_as_text()
var split_strs = text.split(",", false, 0)
for s in split_strs:
extracted_strings.append(s)
#print("Extracted string: " + s)
+
func get_recognized_extensions():
return ["csv"]
[/codeblock]
+ [b]Note:[/b] If you override parsing logic for standard script types (GDScript, C#, etc.), it would be better to load the [code]path[/code] argument using [method ResourceLoader.load]. This is because built-in scripts are loaded as [Resource] type, not [File] type.
+ For example:
+ [codeblock]
+ func parse_file(path, extracted_strings):
+ var res = ResourceLoader.load(path, "Script")
+ var text = res.get_source_code()
+ # Parsing logic.
+
+
+ func get_recognized_extensions():
+ return ["gd"]
+ [/codeblock]
</description>
<tutorials>
</tutorials>
@@ -31,10 +48,10 @@
Gets the list of file extensions to associate with this parser, e.g. [code]["csv"][/code].
</description>
</method>
- <method name="parse_text" qualifiers="virtual">
+ <method name="parse_file" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="text" type="String">
+ <argument index="0" name="path" type="String">
</argument>
<argument index="1" name="extracted_strings" type="Array">
</argument>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index b90039e496..20bc39ef1f 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -20,6 +20,7 @@
file.close()
return content
[/codeblock]
+ In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 76153ae041..7e8f0807ac 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -8,6 +8,7 @@
[b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started.
A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side.
For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616).
+ [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 53ca1fc6a9..61e0d2e2b9 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -14,11 +14,19 @@
add_child(http_request)
http_request.connect("request_completed", self, "_http_request_completed")
- # Perform the HTTP request. The URL below returns some JSON as of writing.
+ # Perform a GET request. The URL below returns JSON as of writing.
var error = http_request.request("https://httpbin.org/get")
if error != OK:
push_error("An error occurred in the HTTP request.")
+ # Perform a POST request. The URL below returns JSON as of writing.
+ # Note: Don't make simultaneous requests using a single HTTPRequest node.
+ # The snippet below is provided for reference only.
+ var body = {"name": "Godette"}
+ var error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body)
+ if error != OK:
+ push_error("An error occurred in the HTTP request.")
+
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
@@ -56,6 +64,7 @@
add_child(texture_rect)
texture_rect.texture = texture
[/codeblock]
+ [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link>
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 97b9d5247a..53e6517c7a 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -16,7 +16,7 @@
Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code].
</member>
<member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )">
- The mouse position relative to the previous position (position at the last frame).
+ The mouse position relative to the previous position (position at the last frame).
[b]Note:[/b] Since [InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of [code]Vector2(0, 0)[/code] when the user stops moving the mouse.
</member>
<member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )">
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index f0f4d83821..455fdad771 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -104,7 +104,7 @@
<description>
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
+ [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml
index 5477c6bab6..01cce907f9 100644
--- a/doc/classes/KinematicBody3D.xml
+++ b/doc/classes/KinematicBody3D.xml
@@ -106,7 +106,7 @@
<description>
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
+ [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall.
If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index c1c54dd11b..feac483fc4 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -167,6 +167,9 @@
String value of the [LineEdit].
[b]Note:[/b] Changing text using this property won't emit the [signal text_changed] signal.
</member>
+ <member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true">
+ If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it.
+ </member>
</members>
<signals>
<signal name="text_change_rejected">
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 105def21ca..5b4b5d02fb 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -112,7 +112,18 @@
<return type="PackedStringArray">
</return>
<description>
- Returns the command line arguments passed to the engine.
+ Returns the command-line arguments passed to the engine.
+ Command-line arguments can be written in any form, including both [code]--key value[/code] and [code]--key=value[/code] forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments.
+ You can also incorporate environment variables using the [method get_environment] method.
+ You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project.
+ Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments:
+ [codeblock]
+ var arguments = {}
+ for argument in OS.get_cmdline_args():
+ if argument.find("=") > -1:
+ var key_value = argument.split("=")
+ arguments[key_value[0].lstrip("--")] = key_value[1]
+ [/codeblock]
</description>
</method>
<method name="get_connected_midi_inputs">
@@ -505,7 +516,7 @@
The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
</member>
<member name="tablet_driver" type="String" setter="set_current_tablet_driver" getter="get_current_tablet_driver" default="&quot;&quot;">
- The current tablet drvier in use.
+ The current tablet driver in use.
</member>
</members>
<constants>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 8d08688b41..3d8c2c5eb0 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -97,6 +97,7 @@
[codeblock]
call("set", "position", Vector2(42.0, 0.0))
[/codeblock]
+ [b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
<method name="call_deferred" qualifiers="vararg">
@@ -109,6 +110,7 @@
[codeblock]
call_deferred("set", "position", Vector2(42.0, 0.0))
[/codeblock]
+ [b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
<method name="callv">
@@ -203,6 +205,7 @@
</argument>
<description>
Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code].
+ [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
<method name="get_class" qualifiers="const">
@@ -402,6 +405,7 @@
</argument>
<description>
Assigns a new value to the given property. If the [code]property[/code] does not exist, nothing will happen.
+ [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
<method name="set_block_signals">
@@ -422,6 +426,7 @@
</argument>
<description>
Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", property, value)[/code].
+ [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
<method name="set_indexed">
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index b08357e278..08f8558881 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -78,6 +78,15 @@
Returns a copy of the array's contents as [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred.
</description>
</method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the array contains [code]value[/code].
+ </description>
+ </method>
<method name="hex_encode">
<return type="String">
</return>
@@ -152,6 +161,13 @@
Returns the size of the array.
</description>
</method>
+ <method name="sort">
+ <return type="void">
+ </return>
+ <description>
+ Sorts the elements of the array in ascending order.
+ </description>
+ </method>
<method name="subarray">
<return type="PackedByteArray">
</return>
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index 06228e4dac..ec087e1b39 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -44,6 +44,15 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="Color">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the array contains [code]value[/code].
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
@@ -107,6 +116,13 @@
Returns the size of the array.
</description>
</method>
+ <method name="sort">
+ <return type="void">
+ </return>
+ <description>
+ Sorts the elements of the array in ascending order.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index ee82586cdb..a6b726944b 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -45,6 +45,15 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the array contains [code]value[/code].
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
@@ -108,6 +117,13 @@
Returns the size of the array.
</description>
</method>
+ <method name="sort">
+ <return type="void">
+ </return>
+ <description>
+ Sorts the elements of the array in ascending order.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index ce2300c65a..f867cda3b6 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -45,6 +45,15 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the array contains [code]value[/code].
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
@@ -108,6 +117,13 @@
Returns the size of the array.
</description>
</method>
+ <method name="sort">
+ <return type="void">
+ </return>
+ <description>
+ Sorts the elements of the array in ascending order.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index 176c624956..b796d9cacb 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -45,6 +45,15 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the array contains [code]value[/code].
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
@@ -108,6 +117,13 @@
Returns the array size.
</description>
</method>
+ <method name="sort">
+ <return type="void">
+ </return>
+ <description>
+ Sorts the elements of the array in ascending order.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index d8a8071590..3d0d9a1360 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -45,6 +45,15 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the array contains [code]value[/code].
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
@@ -108,6 +117,13 @@
Returns the array size.
</description>
</method>
+ <method name="sort">
+ <return type="void">
+ </return>
+ <description>
+ Sorts the elements of the array in ascending order.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 2d70dea012..bb56330248 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -7,6 +7,13 @@
A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself.
Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]).
[b]Note:[/b] The node doesn't need to own itself.
+ [b]Example of loading a saved scene:[/b]
+ [codeblock]
+ # Use `load()` instead of `preload()` if the path isn't known at compile-time.
+ var scene = preload("res://scene.tscn").instance()
+ # Add the node as a child of the node the script is attached to.
+ add_child(scene)
+ [/codeblock]
[b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
[codeblock]
# Create the objects.
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index 9526f5899d..f36af66d6d 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -44,6 +44,15 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the array contains [code]value[/code].
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
@@ -107,6 +116,13 @@
Returns the size of the array.
</description>
</method>
+ <method name="sort">
+ <return type="void">
+ </return>
+ <description>
+ Sorts the elements of the array in ascending order.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 87f202357c..ecc535e488 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -44,6 +44,15 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="Vector2">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the array contains [code]value[/code].
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
@@ -107,6 +116,13 @@
Returns the size of the array.
</description>
</method>
+ <method name="sort">
+ <return type="void">
+ </return>
+ <description>
+ Sorts the elements of the array in ascending order.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 7bfa684ff5..f268fbcc83 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -44,6 +44,15 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="value" type="Vector3">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the array contains [code]value[/code].
+ </description>
+ </method>
<method name="insert">
<return type="int">
</return>
@@ -107,6 +116,13 @@
Returns the size of the array.
</description>
</method>
+ <method name="sort">
+ <return type="void">
+ </return>
+ <description>
+ Sorts the elements of the array in ascending order.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index 292acd8b5d..ce0680523c 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -65,13 +65,6 @@
Returns the shortest distance from the plane to the position [code]point[/code].
</description>
</method>
- <method name="get_any_point">
- <return type="Vector3">
- </return>
- <description>
- Returns a point on the plane.
- </description>
- </method>
<method name="has_point">
<return type="bool">
</return>
@@ -80,7 +73,7 @@
<argument index="1" name="epsilon" type="float" default="1e-05">
</argument>
<description>
- Returns [code]true[/code] if [code]point[/code] is inside the plane (by a very minimum [code]epsilon[/code] threshold).
+ Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]epsilon[/code] threshold.
</description>
</method>
<method name="intersect_3">
@@ -147,36 +140,38 @@
<argument index="0" name="point" type="Vector3">
</argument>
<description>
- Returns the orthogonal projection of point [code]p[/code] into a point in the plane.
+ Returns the orthogonal projection of [code]point[/code] into a point in the plane.
</description>
</method>
</methods>
<members>
<member name="d" type="float" setter="" getter="" default="0.0">
- Distance from the origin to the plane, in the direction of [member normal].
+ The distance from the origin to the plane, in the direction of [member normal]. This value is typically non-negative.
+ In the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property.
</member>
<member name="normal" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
- The normal of the plane. "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
+ The normal of the plane, which must be normalized.
+ In the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code]d[/code] is the [member d] property.
</member>
<member name="x" type="float" setter="" getter="" default="0.0">
- The [member normal]'s X component.
+ The X component of the plane's [member normal] vector.
</member>
<member name="y" type="float" setter="" getter="" default="0.0">
- The [member normal]'s Y component.
+ The Y component of the plane's [member normal] vector.
</member>
<member name="z" type="float" setter="" getter="" default="0.0">
- The [member normal]'s Z component.
+ The Z component of the plane's [member normal] vector.
</member>
</members>
<constants>
<constant name="PLANE_YZ" value="Plane( 1, 0, 0, 0 )">
- A plane that extends in the Y and Z axes.
+ A plane that extends in the Y and Z axes (normal vector points +X).
</constant>
<constant name="PLANE_XZ" value="Plane( 0, 1, 0, 0 )">
- A plane that extends in the X and Z axes.
+ A plane that extends in the X and Z axes (normal vector points +Y).
</constant>
<constant name="PLANE_XY" value="Plane( 0, 0, 1, 0 )">
- A plane that extends in the X and Y axes.
+ A plane that extends in the X and Y axes (normal vector points +Z).
</constant>
</constants>
</class>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 77915bc538..9e7f26ed4f 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -13,7 +13,12 @@
<return type="Array">
</return>
<description>
- Returns mesh arrays used to constitute surface of [Mesh]. Mesh arrays can be used with [ArrayMesh] to create new surfaces.
+ Returns mesh arrays used to constitute surface of [Mesh]. The result can be passed to [method ArrayMesh.add_surface_from_arrays] to create a new surface. For example:
+ [codeblock]
+ var c := CylinderMesh.new()
+ var arr_mesh := ArrayMesh.new()
+ arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, c.get_mesh_arrays())
+ [/codeblock]
</description>
</method>
</methods>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 6a7a6b84f6..e255ce2e1a 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -472,8 +472,8 @@
<member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0">
Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden.
</member>
- <member name="gui/common/swap_ok_cancel" type="bool" setter="" getter="" default="false">
- If [code]true[/code], swaps OK and Cancel buttons in dialogs on Windows and UWP to follow interface conventions.
+ <member name="gui/common/swap_cancel_ok" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], swaps Cancel and OK buttons in dialogs on Windows and UWP to follow interface conventions.
</member>
<member name="gui/common/text_edit_undo_stack_max_size" type="int" setter="" getter="" default="1024">
</member>
@@ -802,10 +802,12 @@
<member name="logging/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false">
If [code]true[/code], logs all output to files.
</member>
- <member name="logging/file_logging/log_path" type="String" setter="" getter="" default="&quot;user://logs/log.txt&quot;">
+ <member name="logging/file_logging/enable_file_logging.pc" type="bool" setter="" getter="" default="true">
+ </member>
+ <member name="logging/file_logging/log_path" type="String" setter="" getter="" default="&quot;user://logs/godot.log&quot;">
Path to logs within the project. Using an [code]user://[/code] path is recommended.
</member>
- <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="10">
+ <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="5">
Specifies the maximum amount of log files allowed (used for rotation).
</member>
<member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="1024">
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index 327fa882e5..730edb00d9 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -4,9 +4,9 @@
Quaternion.
</brief_description>
<description>
- A unit quaternion used for representing 3D rotations.
- It is similar to [Basis], which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. But due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors.
- Quaternions need to be (re)normalized.
+ A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation.
+ It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quat only stores rotation.
+ Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
@@ -18,7 +18,7 @@
<argument index="0" name="from" type="Basis">
</argument>
<description>
- Returns the rotation matrix corresponding to the given quaternion.
+ Constructs a quaternion from the given [Basis].
</description>
</method>
<method name="Quat">
@@ -27,7 +27,7 @@
<argument index="0" name="euler" type="Vector3">
</argument>
<description>
- Returns a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle).
+ Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle).
</description>
</method>
<method name="Quat">
@@ -38,7 +38,7 @@
<argument index="1" name="angle" type="float">
</argument>
<description>
- Returns a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
+ Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
</description>
</method>
<method name="Quat">
@@ -53,7 +53,7 @@
<argument index="3" name="w" type="float">
</argument>
<description>
- Returns a quaternion defined by these values.
+ Constructs a quaternion defined by the given values.
</description>
</method>
<method name="cubic_slerp">
@@ -68,7 +68,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
- Performs a cubic spherical-linear interpolation with another quaternion.
+ Performs a cubic spherical interpolation between quaternions [code]preA[/code], this vector, [code]b[/code], and [code]postB[/code], by the given amount [code]t[/code].
</description>
</method>
<method name="dot">
@@ -84,7 +84,7 @@
<return type="Vector3">
</return>
<description>
- Returns Euler angles (in the YXZ convention: first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
+ Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
</description>
</method>
<method name="inverse">
@@ -148,7 +148,7 @@
<argument index="0" name="euler" type="Vector3">
</argument>
<description>
- Sets the quaternion to a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle).
+ Sets the quaternion to a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle).
</description>
</method>
<method name="slerp">
@@ -159,7 +159,8 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Performs a spherical-linear interpolation with another quaternion.
+ Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code].
+ [b]Note:[/b] Both quaternions must be normalized.
</description>
</method>
<method name="slerpni">
@@ -170,7 +171,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Performs a spherical-linear interpolation with another quaterion without checking if the rotation path is not bigger than 90°.
+ Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees.
</description>
</method>
<method name="xform">
@@ -179,27 +180,31 @@
<argument index="0" name="v" type="Vector3">
</argument>
<description>
- Transforms the vector [code]v[/code] by this quaternion.
+ Returns a vector transformed (multiplied) by this quaternion.
</description>
</method>
</methods>
<members>
<member name="w" type="float" setter="" getter="" default="1.0">
- W component of the quaternion.
+ W component of the quaternion (real part).
+ Quaternion components should usually not be manipulated directly.
</member>
<member name="x" type="float" setter="" getter="" default="0.0">
- X component of the quaternion.
+ X component of the quaternion (imaginary [code]i[/code] axis part).
+ Quaternion components should usually not be manipulated directly.
</member>
<member name="y" type="float" setter="" getter="" default="0.0">
- Y component of the quaternion.
+ Y component of the quaternion (imaginary [code]j[/code] axis part).
+ Quaternion components should usually not be manipulated directly.
</member>
<member name="z" type="float" setter="" getter="" default="0.0">
- Z component of the quaternion.
+ Z component of the quaternion (imaginary [code]k[/code] axis part).
+ Quaternion components should usually not be manipulated directly.
</member>
</members>
<constants>
<constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )">
- The identity rotation. Equivalent to an identity matrix. If a vector is transformed by an identity quaternion, it will not change.
+ The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change.
</constant>
</constants>
</class>
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index 4a594d3e1a..6a11630c0e 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -44,7 +44,7 @@
</return>
<description>
Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
- [b]Note:[/b] [code]enabled == true[/code] is not required for this to work.
+ [b]Note:[/b] [member enabled] does not need to be [code]true[/code] for this to work.
</description>
</method>
<method name="get_collider" qualifiers="const">
diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml
index 3512da9d77..e7ee1d284f 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -45,7 +45,7 @@
<description>
Updates the collision information for the ray.
Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
- [b]Note:[/b] [code]enabled == true[/code] is not required for this to work.
+ [b]Note:[/b] [member enabled] does not need to be [code]true[/code] for this to work.
</description>
</method>
<method name="get_collider" qualifiers="const">
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index dbf461cdf1..8599aad95e 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -171,13 +171,14 @@
</methods>
<members>
<member name="end" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
- Ending corner.
+ Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
</member>
<member name="position" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
- Position (starting corner).
+ Beginning corner. Typically has values lower than [member end].
</member>
<member name="size" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
- Size from position to end.
+ Size from [member position] to [member end]. Typically all components are positive.
+ If the size is negative, you can use [method abs] to fix it.
</member>
</members>
<constants>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index f3a7ba0476..7362580c02 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -160,13 +160,14 @@
</methods>
<members>
<member name="end" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
- Ending corner.
+ Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size.
</member>
<member name="position" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
- Position (starting corner).
+ Beginning corner. Typically has values lower than [member end].
</member>
<member name="size" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
- Size from position to end.
+ Size from [member position] to [member end]. Typically all components are positive.
+ If the size is negative, you can use [method abs] to fix it.
</member>
</members>
<constants>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 7539f8ff43..85eaac454f 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -3431,10 +3431,10 @@
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="17" enum="ViewportDebugDraw">
</constant>
- <constant name="SKY_MODE_QUALITY" value="0" enum="SkyMode">
+ <constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode">
Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples].
</constant>
- <constant name="SKY_MODE_REALTIME" value="1" enum="SkyMode">
+ <constant name="SKY_MODE_REALTIME" value="3" enum="SkyMode">
Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times.
[b]Note:[/b] The fast filtering algorithm is limited to 256x256 cubemaps, so [member Sky.radiance_size] must be set to [constant Sky.RADIANCE_SIZE_256].
</constant>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 5bc34772c8..0aa40dffb3 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -23,7 +23,8 @@
<argument index="0" name="subresources" type="bool" default="false">
</argument>
<description>
- Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency, this can be changed by passing [code]true[/code] to the [code]subresources[/code] argument.
+ Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources.
+ [b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
</description>
</method>
<method name="get_local_scene" qualifiers="const">
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml
index efd55f5566..370e6bd19c 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -100,6 +100,13 @@
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead.
</description>
</method>
+ <method name="get_inverse_inertia_tensor">
+ <return type="Basis">
+ </return>
+ <description>
+ Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D].
+ </description>
+ </method>
<method name="set_axis_lock">
<return type="void">
</return>
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index f0ad781f77..20b0750431 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -33,6 +33,12 @@
<description>
</description>
</method>
+ <method name="get_current_editor" qualifiers="const">
+ <return type="ScriptEditorBase">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_current_script">
<return type="Script">
</return>
@@ -50,6 +56,12 @@
<description>
</description>
</method>
+ <method name="get_open_script_editors" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_open_scripts" qualifiers="const">
<return type="Array">
</return>
@@ -76,6 +88,22 @@
<description>
</description>
</method>
+ <method name="register_syntax_highlighter">
+ <return type="void">
+ </return>
+ <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="unregister_syntax_highlighter">
+ <return type="void">
+ </return>
+ <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<signals>
<signal name="editor_script_changed">
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
new file mode 100644
index 0000000000..9968ae06c3
--- /dev/null
+++ b/doc/classes/ScriptEditorBase.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ScriptEditorBase" inherits="VBoxContainer" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_syntax_highlighter" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="highlighter" type="Object">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="edited_script_changed">
+ <description>
+ </description>
+ </signal>
+ <signal name="go_to_help">
+ <argument index="0" name="what" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="name_changed">
+ <description>
+ </description>
+ </signal>
+ <signal name="replace_in_files_requested">
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="request_help">
+ <argument index="0" name="topic" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="request_open_script_at_line">
+ <argument index="0" name="script" type="Object">
+ </argument>
+ <argument index="1" name="line" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="request_save_history">
+ <description>
+ </description>
+ </signal>
+ <signal name="search_in_files_requested">
+ <argument index="0" name="text" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index 183fd5396f..050d7056af 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -239,7 +239,7 @@
</argument>
<description>
Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
- [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
+ [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
[b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space.
</description>
</method>
diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml
index 78c75d9c2b..a77515b3e6 100644
--- a/doc/classes/Sky.xml
+++ b/doc/classes/Sky.xml
@@ -48,11 +48,17 @@
<constant name="RADIANCE_SIZE_MAX" value="7" enum="RadianceSize">
Represents the size of the [enum RadianceSize] enum.
</constant>
- <constant name="PROCESS_MODE_QUALITY" value="0" enum="ProcessMode">
+ <constant name="PROCESS_MODE_AUTOMATIC" value="0" enum="ProcessMode">
+ Automatically selects the appropriate process mode based on your sky shader. If your shader uses [code]TIME[/code] or [code]POSITION[/code], this will use [constant PROCESS_MODE_REALTIME]. If your shader uses any of the [code]LIGHT_*[/code] variables or any custom uniforms, this uses [constant PROCESS_MODE_INCREMENTAL]. Otherwise, this defaults to [constant PROCESS_MODE_QUALITY].
+ </constant>
+ <constant name="PROCESS_MODE_QUALITY" value="1" enum="ProcessMode">
Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples].
</constant>
- <constant name="PROCESS_MODE_REALTIME" value="1" enum="ProcessMode">
- Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times.
+ <constant name="PROCESS_MODE_INCREMENTAL" value="2" enum="ProcessMode">
+ Uses the same high quality importance sampling to process the radiance map as [constant PROCESS_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/quality/reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly.
+ </constant>
+ <constant name="PROCESS_MODE_REALTIME" value="3" enum="ProcessMode">
+ Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [member ProjectSettings.rendering/quality/reflections/fast_filter_high_quality].
[b]Note:[/b] The fast filtering algorithm is limited to 256x256 cubemaps, so [member radiance_size] must be set to [constant RADIANCE_SIZE_256].
</constant>
</constants>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 6d9def7ccb..71db03e84f 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -325,14 +325,15 @@
<return type="String">
</return>
<description>
- Returns a copy of the string with escaped characters replaced by their meanings according to the C language standard.
+ Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\?[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code].
+ [b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\uXXXX[/code] escape sequence.
</description>
</method>
<method name="capitalize">
<return type="String">
</return>
<description>
- Changes the case of some letters. Replaces underscores with spaces, converts all letters to lowercase, then capitalizes first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code], it will return [code]Capitalize Camelcase Mixed With Underscores[/code].
+ Changes the case of some letters. Replaces underscores with spaces, adds spaces before in-word uppercase characters, converts all letters to lowercase, then capitalizes the first letter and every letter following a space character. For [code]capitalize camelCase mixed_with_underscores[/code], it will return [code]Capitalize Camel Case Mixed With Underscores[/code].
</description>
</method>
<method name="casecmp_to">
@@ -412,7 +413,7 @@
<argument index="1" name="from" type="int" default="0">
</argument>
<description>
- Finds the first occurrence of a substring. Returns the starting position of the substring or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ Returns the index of the [b]first[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string.
[b]Note:[/b] If you just want to know whether a string contains a substring, use the [code]in[/code] operator as follows:
[codeblock]
# Will evaluate to `false`.
@@ -421,15 +422,6 @@
[/codeblock]
</description>
</method>
- <method name="find_last">
- <return type="int">
- </return>
- <argument index="0" name="what" type="String">
- </argument>
- <description>
- Finds the last occurrence of a substring. Returns the starting position of the substring or [code]-1[/code] if not found.
- </description>
- </method>
<method name="findn">
<return type="int">
</return>
@@ -438,7 +430,7 @@
<argument index="1" name="from" type="int" default="0">
</argument>
<description>
- Finds the first occurrence of a substring, ignoring case. Returns the starting position of the substring or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ Returns the index of the [b]first[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string.
</description>
</method>
<method name="format">
@@ -801,7 +793,7 @@
<argument index="1" name="from" type="int" default="-1">
</argument>
<description>
- Performs a case-sensitive search for a substring, but starts from the end of the string instead of the beginning.
+ Returns the index of the [b]last[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string.
</description>
</method>
<method name="rfindn">
@@ -812,7 +804,7 @@
<argument index="1" name="from" type="int" default="-1">
</argument>
<description>
- Performs a case-insensitive search for a substring, but starts from the end of the string instead of the beginning.
+ Returns the index of the [b]last[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string.
</description>
</method>
<method name="right">
diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml
new file mode 100644
index 0000000000..2d6e3de02a
--- /dev/null
+++ b/doc/classes/SyntaxHighlighter.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SyntaxHighlighter" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_line_syntax_highlighting" qualifiers="virtual">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="p_line" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_update_cache" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="clear_highlighting_cache">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_line_syntax_highlighting">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="p_line" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_text_edit">
+ <return type="TextEdit">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="update_cache">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index b7b4278da0..b7240655af 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -9,32 +9,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="add_color_region">
- <return type="void">
- </return>
- <argument index="0" name="begin_key" type="String">
- </argument>
- <argument index="1" name="end_key" type="String">
- </argument>
- <argument index="2" name="color" type="Color">
- </argument>
- <argument index="3" name="line_only" type="bool" default="false">
- </argument>
- <description>
- Adds color region (given the delimiters) and its colors.
- </description>
- </method>
- <method name="add_keyword_color">
- <return type="void">
- </return>
- <argument index="0" name="keyword" type="String">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Adds a [code]keyword[/code] and its [Color].
- </description>
- </method>
<method name="can_fold" qualifiers="const">
<return type="bool">
</return>
@@ -51,13 +25,6 @@
Centers the viewport on the line the editing cursor is at. This also resets the [member scroll_horizontal] value to [code]0[/code].
</description>
</method>
- <method name="clear_colors">
- <return type="void">
- </return>
- <description>
- Clears all custom syntax coloring information previously added with [method add_color_region] or [method add_keyword_color].
- </description>
- </method>
<method name="clear_undo_history">
<return type="void">
</return>
@@ -152,15 +119,6 @@
Returns an array containing the line number of each breakpoint.
</description>
</method>
- <method name="get_keyword_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="keyword" type="String">
- </argument>
- <description>
- Returns the [Color] of the specified [code]keyword[/code].
- </description>
- </method>
<method name="get_line" qualifiers="const">
<return type="String">
</return>
@@ -226,15 +184,6 @@
Returns a [String] text with the word under the mouse cursor location.
</description>
</method>
- <method name="has_keyword_color" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="keyword" type="String">
- </argument>
- <description>
- Returns whether the specified [code]keyword[/code] has a color set to it or not.
- </description>
- </method>
<method name="insert_text_at_cursor">
<return type="void">
</return>
@@ -473,8 +422,7 @@
<member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false">
If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling.
</member>
- <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled" default="false">
- If [code]true[/code], any custom color properties that have been set for this [TextEdit] will be visible.
+ <member name="syntax_highlighter" type="SyntaxHighlighter" setter="set_syntax_highlighter" getter="get_syntax_highlighter">
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
String value of the [TextEdit].
@@ -508,6 +456,12 @@
Emitted when the info icon is clicked.
</description>
</signal>
+ <signal name="line_edited_from">
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
<signal name="request_completion">
<description>
</description>
@@ -627,8 +581,6 @@
<theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
</theme_item>
- <theme_item name="function_color" type="Color" default="Color( 0.4, 0.64, 0.81, 1 )">
- </theme_item>
<theme_item name="line_number_color" type="Color" default="Color( 0.67, 0.67, 0.67, 0.4 )">
Sets the [Color] of the line numbers. [member show_line_numbers] has to be enabled.
</theme_item>
@@ -638,13 +590,9 @@
<theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )">
Sets the [Color] of marked text.
</theme_item>
- <theme_item name="member_variable_color" type="Color" default="Color( 0.9, 0.31, 0.35, 1 )">
- </theme_item>
<theme_item name="normal" type="StyleBox">
Sets the [StyleBox] of this [TextEdit].
</theme_item>
- <theme_item name="number_color" type="Color" default="Color( 0.92, 0.58, 0.2, 1 )">
- </theme_item>
<theme_item name="read_only" type="StyleBox">
Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled.
</theme_item>
@@ -655,8 +603,6 @@
</theme_item>
<theme_item name="space" type="Texture2D">
</theme_item>
- <theme_item name="symbol_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
- </theme_item>
<theme_item name="tab" type="Texture2D">
Sets a custom [Texture2D] for tab text characters.
</theme_item>
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index c1e5987a06..5d684755fa 100644
--- a/doc/classes/Timer.xml
+++ b/doc/classes/Timer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode.
+ [b]Note:[/b] To create an one-shot timer without instantiating a node, use [method SceneTree.create_timer].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index 4175f01eb4..26c190bfa9 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -4,10 +4,12 @@
3D transformation (3×4 matrix).
</brief_description>
<description>
- Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [member basis] and an [member origin]. It is similar to a 3×4 matrix.
+ 3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, or scaling. It consists of a [member basis] (first 3 columns) and a [Vector3] for the [member origin] (last column).
+ For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link>
</tutorials>
<methods>
@@ -23,7 +25,7 @@
<argument index="3" name="origin" type="Vector3">
</argument>
<description>
- Constructs the Transform from four [Vector3]. Each axis corresponds to local basis vectors (some of which may be scaled).
+ Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled).
</description>
</method>
<method name="Transform">
@@ -34,7 +36,7 @@
<argument index="1" name="origin" type="Vector3">
</argument>
<description>
- Constructs the Transform from a [Basis] and [Vector3].
+ Constructs a Transform from a [Basis] and [Vector3].
</description>
</method>
<method name="Transform">
@@ -43,7 +45,7 @@
<argument index="0" name="from" type="Transform2D">
</argument>
<description>
- Constructs the Transform from a [Transform2D].
+ Constructs a Transform from a [Transform2D].
</description>
</method>
<method name="Transform">
@@ -52,7 +54,7 @@
<argument index="0" name="from" type="Quat">
</argument>
<description>
- Constructs the Transform from a [Quat]. The origin will be Vector3(0, 0, 0).
+ Constructs a Transform from a [Quat]. The origin will be [code]Vector3(0, 0, 0)[/code].
</description>
</method>
<method name="Transform">
@@ -79,7 +81,7 @@
<argument index="1" name="weight" type="float">
</argument>
<description>
- Interpolates the transform to other Transform by weight amount (0-1).
+ Interpolates the transform to other Transform by weight amount (on the range of 0.0 to 1.0).
</description>
</method>
<method name="inverse">
@@ -172,7 +174,7 @@
The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
</member>
<member name="origin" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
- The translation offset of the transform.
+ The translation offset of the transform (column 3, the fourth column). Equivalent to array index [code]3[/code].
</member>
</members>
<constants>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index af93d4c654..f630df7afe 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Transform2D" version="4.0">
<brief_description>
- 2D transformation (3×2 matrix).
+ 2D transformation (2×3 matrix).
</brief_description>
<description>
- Represents one or many transformations in 2D space such as translation, rotation, or scaling. It consists of two [member x] and [member y] [Vector2]s and an [member origin]. It is similar to a 3×2 matrix.
+ 2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, or scaling. It consists of a three [Vector2] values: [member x], [member y], and the [member origin].
+ For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
</tutorials>
<methods>
<method name="Transform2D">
@@ -28,7 +30,7 @@
<argument index="2" name="origin" type="Vector2">
</argument>
<description>
- Constructs the transform from 3 [Vector2]s representing x, y, and origin.
+ Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors).
</description>
</method>
<method name="Transform2D">
@@ -46,7 +48,7 @@
<return type="Transform2D">
</return>
<description>
- Returns the inverse of the matrix.
+ Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.
</description>
</method>
<method name="basis_xform">
@@ -55,7 +57,8 @@
<argument index="0" name="v" type="Vector2">
</argument>
<description>
- Transforms the given vector by this transform's basis (no translation).
+ Returns a vector transformed (multiplied) by the basis matrix.
+ This method does not account for translation (the origin vector).
</description>
</method>
<method name="basis_xform_inv">
@@ -64,7 +67,8 @@
<argument index="0" name="v" type="Vector2">
</argument>
<description>
- Inverse-transforms the given vector by this transform's basis (no translation).
+ Returns a vector transformed (multiplied) by the inverse basis matrix.
+ This method does not account for translation (the origin vector).
</description>
</method>
<method name="get_origin">
@@ -96,14 +100,14 @@
<argument index="1" name="weight" type="float">
</argument>
<description>
- Returns a transform interpolated between this transform and another by a given weight (0-1).
+ Returns a transform interpolated between this transform and another by a given weight (on the range of 0.0 to 1.0).
</description>
</method>
<method name="inverse">
<return type="Transform2D">
</return>
<description>
- Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).
+ 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).
</description>
</method>
<method name="is_equal_approx">
@@ -119,7 +123,7 @@
<return type="Transform2D">
</return>
<description>
- Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors.
+ Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1).
</description>
</method>
<method name="rotated">
@@ -171,24 +175,24 @@
</methods>
<members>
<member name="origin" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
- The transform's translation offset.
+ The origin vector (column 2, the third column). Equivalent to array index [code]2[/code]. The origin vector represents translation.
</member>
<member name="x" type="Vector2" setter="" getter="" default="Vector2( 1, 0 )">
- The X axis of 2×2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
+ The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code].
</member>
<member name="y" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )">
- The Y axis of 2×2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
+ The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code].
</member>
</members>
<constants>
<constant name="IDENTITY" value="Transform2D( 1, 0, 0, 1, 0, 0 )">
- [Transform2D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation.
+ The identity [Transform2D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation.
</constant>
<constant name="FLIP_X" value="Transform2D( -1, 0, 0, 1, 0, 0 )">
- [Transform2D] with mirroring applied parallel to the X axis.
+ The [Transform2D] that will flip something along the X axis.
</constant>
<constant name="FLIP_Y" value="Transform2D( 1, 0, 0, -1, 0, 0 )">
- [Transform2D] with mirroring applied parallel to the Y axis.
+ The [Transform2D] that will flip something along the Y axis.
</constant>
</constants>
</class>
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
index f3c865c392..aabfed85f0 100644
--- a/doc/classes/UDPServer.xml
+++ b/doc/classes/UDPServer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
A simple server that opens a UDP socket and returns connected [PacketPeerUDP] upon receiving new packets. See also [method PacketPeerUDP.connect_to_host].
+ After starting the server ([method listen]), you will need to [method poll] it at regular intervals (e.g. inside [method Node._process]) for it to process new packets, delivering them to the appropriate [PacketPeerUDP], and taking new connections.
Below a small example of how it can be used:
[codeblock]
# server.gd
@@ -17,6 +18,7 @@
server.listen(4242)
func _process(delta):
+ server.poll() # Important!
if server.is_connection_available():
var peer : PacketPeerUDP = server.take_connection()
var pkt = peer.get_packet()
@@ -57,7 +59,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if a packet with a new address/port combination is received on the socket.
+ Returns [code]true[/code] if a packet with a new address/port combination was received on the socket.
</description>
</method>
<method name="is_listening" qualifiers="const">
@@ -78,21 +80,33 @@
Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.listen].
</description>
</method>
+ <method name="poll">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ Call this method at regular intervals (e.g. inside [method Node._process]) to process new packets. And packet from known address/port pair will be delivered to the appropriate [PacketPeerUDP], any packet received from an unknown address/port pair will be added as a pending connection (see [method is_connection_available], [method take_connection]). The maximum number of pending connection is defined via [member max_pending_connections].
+ </description>
+ </method>
<method name="stop">
<return type="void">
</return>
<description>
- Stops the server, closing the UDP socket if open. Will not disconnect any connected [PacketPeerUDP].
+ Stops the server, closing the UDP socket if open. Will close all connected [PacketPeerUDP] accepted via [method take_connection] (remote peers will not be notified).
</description>
</method>
<method name="take_connection">
<return type="PacketPeerUDP">
</return>
<description>
- Returns a [PacketPeerUDP] connected to the address/port combination of the first packet in queue. Will return [code]null[/code] if no packet is in queue. See also [method PacketPeerUDP.connect_to_host].
+ Returns the first pending connection (connected to the appropriate address/port). Will return [code]null[/code] if no new connection is available. See also [method is_connection_available], [method PacketPeerUDP.connect_to_host].
</description>
</method>
</methods>
+ <members>
+ <member name="max_pending_connections" type="int" setter="set_max_pending_connections" getter="get_max_pending_connections" default="16">
+ Define the maximum number of pending connections, during [method poll], any new pending connection exceeding that value will be automatically dropped. Setting this value to [code]0[/code] effectively prevents any new pending connection to be accepted (e.g. when all your players have connected).
+ </member>
+ </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 32895310d1..c0d8628d88 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -43,7 +43,7 @@
<return type="float">
</return>
<description>
- Returns the vector's angle in radians with respect to the X axis, or [code](1, 0)[/code] vector.
+ Returns this vector's angle with respect to the X axis, or [code](1, 0)[/code] vector, in radians.
Equivalent to the result of [method @GDScript.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code].
</description>
</method>
@@ -53,7 +53,7 @@
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns the angle in radians between the two vectors.
+ Returns the angle to the given vector, in radians.
</description>
</method>
<method name="angle_to_point">
@@ -62,14 +62,14 @@
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns the angle in radians between the line connecting the two points and the X coordinate.
+ Returns the angle between the line connecting the two points and the X axis, in radians.
</description>
</method>
<method name="aspect">
<return type="float">
</return>
<description>
- Returns the ratio of [member x] to [member y].
+ Returns the aspect ratio of this vector, the ratio of [member x] to [member y].
</description>
</method>
<method name="bounce">
@@ -85,7 +85,7 @@
<return type="Vector2">
</return>
<description>
- Returns the vector with all components rounded up.
+ Returns the vector with all components rounded up (towards positive infinity).
</description>
</method>
<method name="clamped">
@@ -94,7 +94,7 @@
<argument index="0" name="length" type="float">
</argument>
<description>
- Returns the vector with a maximum length.
+ Returns the vector with a maximum length by limiting its length to [code]length[/code].
</description>
</method>
<method name="cross">
@@ -103,7 +103,7 @@
<argument index="0" name="with" type="Vector2">
</argument>
<description>
- Returns the 2-dimensional analog of the cross product with the given vector.
+ Returns the cross product of this vector and [code]with[/code].
</description>
</method>
<method name="cubic_interpolate">
@@ -118,7 +118,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
- Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
+ Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="direction_to">
@@ -136,7 +136,8 @@
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns the squared distance to vector [code]b[/code]. Prefer this function over [method distance_to] if you need to sort vectors or need the squared distance for some formula.
+ Returns the squared distance between this vector and [code]b[/code].
+ This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to">
@@ -145,7 +146,7 @@
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns the distance to vector [code]b[/code].
+ Returns the distance between this vector and [code]to[/code].
</description>
</method>
<method name="dot">
@@ -154,14 +155,17 @@
<argument index="0" name="with" type="Vector2">
</argument>
<description>
- Returns the dot product with vector [code]b[/code].
+ Returns the dot product of this vector and [code]with[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
+ The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees.
+ When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned.
+ [b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code].
</description>
</method>
<method name="floor">
<return type="Vector2">
</return>
<description>
- Returns the vector with all components rounded down.
+ Returns the vector with all components rounded down (towards negative infinity).
</description>
</method>
<method name="is_equal_approx">
@@ -177,21 +181,22 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the vector is normalized.
+ Returns [code]true[/code] if the vector is normalized, and false otherwise.
</description>
</method>
<method name="length">
<return type="float">
</return>
<description>
- Returns the vector's length.
+ Returns the length (magnitude) of this vector.
</description>
</method>
<method name="length_squared">
<return type="float">
</return>
<description>
- Returns the vector's length squared. Prefer this method over [method length] if you need to sort vectors or need the squared length for some formula.
+ Returns the squared length (squared magnitude) of this vector.
+ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
<method name="lerp">
@@ -202,7 +207,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
+ Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="move_toward">
@@ -229,7 +234,7 @@
<argument index="0" name="mod" type="float">
</argument>
<description>
- Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]mod[/code].
+ Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]mod[/code].
</description>
</method>
<method name="posmodv">
@@ -238,7 +243,7 @@
<argument index="0" name="modv" type="Vector2">
</argument>
<description>
- Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]modv[/code]'s components.
+ Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]modv[/code]'s components.
</description>
</method>
<method name="project">
@@ -279,7 +284,7 @@
<return type="Vector2">
</return>
<description>
- Returns the vector with each component set to one or negative one, depending on the signs of the components.
+ Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GDScript.sign] on each component.
</description>
</method>
<method name="slerp">
@@ -290,7 +295,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
+ Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
[b]Note:[/b] Both vectors must be normalized.
</description>
</method>
@@ -300,7 +305,7 @@
<argument index="0" name="n" type="Vector2">
</argument>
<description>
- Returns the component of the vector along a plane defined by the given normal.
+ Returns this vector slid along a plane defined by the given normal.
</description>
</method>
<method name="snapped">
@@ -309,14 +314,14 @@
<argument index="0" name="by" type="Vector2">
</argument>
<description>
- Returns the vector snapped to a grid with the given size.
+ Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals.
</description>
</method>
<method name="tangent">
<return type="Vector2">
</return>
<description>
- Returns a perpendicular vector.
+ Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length.
</description>
</method>
</methods>
@@ -336,25 +341,25 @@
Enumerated value for the Y axis.
</constant>
<constant name="ZERO" value="Vector2( 0, 0 )">
- Zero vector.
+ Zero vector, a vector with all components set to [code]0[/code].
</constant>
<constant name="ONE" value="Vector2( 1, 1 )">
- One vector.
+ One vector, a vector with all components set to [code]1[/code].
</constant>
<constant name="INF" value="Vector2( inf, inf )">
- Infinity vector.
+ Infinity vector, a vector with all components set to [constant @GDScript.INF].
</constant>
<constant name="LEFT" value="Vector2( -1, 0 )">
- Left unit vector.
+ Left unit vector. Represents the direction of left.
</constant>
<constant name="RIGHT" value="Vector2( 1, 0 )">
- Right unit vector.
+ Right unit vector. Represents the direction of right.
</constant>
<constant name="UP" value="Vector2( 0, -1 )">
- Up unit vector.
+ Up unit vector. Y is down in 2D, so this vector points -Y.
</constant>
<constant name="DOWN" value="Vector2( 0, 1 )">
- Down unit vector.
+ Down unit vector. Y is down in 2D, so this vector points +Y.
</constant>
</constants>
</class>
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 2f7ca985b2..d03db712fc 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -70,22 +70,22 @@
Enumerated value for the Y axis.
</constant>
<constant name="ZERO" value="Vector2i( 0, 0 )">
- Zero vector.
+ Zero vector, a vector with all components set to [code]0[/code].
</constant>
<constant name="ONE" value="Vector2i( 1, 1 )">
- One vector.
+ One vector, a vector with all components set to [code]1[/code].
</constant>
<constant name="LEFT" value="Vector2i( -1, 0 )">
- Left unit vector.
+ Left unit vector. Represents the direction of left.
</constant>
<constant name="RIGHT" value="Vector2i( 1, 0 )">
- Right unit vector.
+ Right unit vector. Represents the direction of right.
</constant>
<constant name="UP" value="Vector2i( 0, -1 )">
- Up unit vector.
+ Up unit vector. Y is down in 2D, so this vector points -Y.
</constant>
<constant name="DOWN" value="Vector2i( 0, 1 )">
- Down unit vector.
+ Down unit vector. Y is down in 2D, so this vector points +Y.
</constant>
</constants>
</class>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 0c861e5ee2..776dfd929e 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -47,7 +47,7 @@
<argument index="0" name="to" type="Vector3">
</argument>
<description>
- Returns the minimum angle to the given vector.
+ Returns the minimum angle to the given vector, in radians.
</description>
</method>
<method name="bounce">
@@ -63,7 +63,7 @@
<return type="Vector3">
</return>
<description>
- Returns a new vector with all components rounded up.
+ Returns a new vector with all components rounded up (towards positive infinity).
</description>
</method>
<method name="cross">
@@ -72,7 +72,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Returns the cross product with [code]b[/code].
+ Returns the cross product of this vector and [code]b[/code].
</description>
</method>
<method name="cubic_interpolate">
@@ -87,7 +87,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
- Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
+ Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="direction_to">
@@ -105,7 +105,8 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Returns the squared distance to [code]b[/code]. Prefer this function over [method distance_to] if you need to sort vectors or need the squared distance for some formula.
+ Returns the squared distance between this vector and [code]b[/code].
+ This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to">
@@ -114,7 +115,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Returns the distance to [code]b[/code].
+ Returns the distance between this vector and [code]b[/code].
</description>
</method>
<method name="dot">
@@ -123,14 +124,17 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Returns the dot product with [code]b[/code].
+ Returns the dot product of this vector and [code]b[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
+ The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees.
+ When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned.
+ [b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code].
</description>
</method>
<method name="floor">
<return type="Vector3">
</return>
<description>
- Returns a new vector with all components rounded down.
+ Returns a new vector with all components rounded down (towards negative infinity).
</description>
</method>
<method name="inverse">
@@ -153,21 +157,22 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the vector is normalized.
+ Returns [code]true[/code] if the vector is normalized, and false otherwise.
</description>
</method>
<method name="length">
<return type="float">
</return>
<description>
- Returns the vector's length.
+ Returns the length (magnitude) of this vector.
</description>
</method>
<method name="length_squared">
<return type="float">
</return>
<description>
- Returns the vector's length squared. Prefer this function over [method length] if you need to sort vectors or need the squared length for some formula.
+ Returns the squared length (squared magnitude) of this vector.
+ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
<method name="lerp">
@@ -178,21 +183,21 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation..
+ Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="max_axis">
<return type="int">
</return>
<description>
- Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants.
+ Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
<method name="min_axis">
<return type="int">
</return>
<description>
- Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants.
+ Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
</description>
</method>
<method name="move_toward">
@@ -203,7 +208,7 @@
<argument index="1" name="delta" type="float">
</argument>
<description>
- Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount.
+ Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount.
</description>
</method>
<method name="normalized">
@@ -228,7 +233,7 @@
<argument index="0" name="mod" type="float">
</argument>
<description>
- Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]mod[/code].
+ Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]mod[/code].
</description>
</method>
<method name="posmodv">
@@ -237,7 +242,7 @@
<argument index="0" name="modv" type="Vector3">
</argument>
<description>
- Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]modv[/code]'s components.
+ Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]modv[/code]'s components.
</description>
</method>
<method name="project">
@@ -246,7 +251,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Returns the vector projected onto the vector [code]b[/code].
+ Returns this vector projected onto another vector [code]b[/code].
</description>
</method>
<method name="reflect">
@@ -255,7 +260,7 @@
<argument index="0" name="n" type="Vector3">
</argument>
<description>
- Returns the vector reflected from a plane defined by the given normal.
+ Returns this vector reflected from a plane defined by the given normal.
</description>
</method>
<method name="rotated">
@@ -266,21 +271,21 @@
<argument index="1" name="phi" type="float">
</argument>
<description>
- Rotates the vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector.
+ Rotates this vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector.
</description>
</method>
<method name="round">
<return type="Vector3">
</return>
<description>
- Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
+ Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
</description>
</method>
<method name="sign">
<return type="Vector3">
</return>
<description>
- Returns the vector with each component set to one or negative one, depending on the signs of the components.
+ Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GDScript.sign] on each component.
</description>
</method>
<method name="slerp">
@@ -291,7 +296,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
+ Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
[b]Note:[/b] Both vectors must be normalized.
</description>
</method>
@@ -301,7 +306,7 @@
<argument index="0" name="n" type="Vector3">
</argument>
<description>
- Returns the component of the vector along a plane defined by the given normal.
+ Returns this vector slid along a plane defined by the given normal.
</description>
</method>
<method name="snapped">
@@ -310,7 +315,7 @@
<argument index="0" name="by" type="Vector3">
</argument>
<description>
- Returns the vector snapped to a grid with the given size.
+ Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals.
</description>
</method>
<method name="to_diagonal_matrix">
@@ -318,6 +323,7 @@
</return>
<description>
Returns a diagonal matrix with the vector as main diagonal.
+ This is equivalent to a Basis with no rotation or shearing and this vector's components set as the scale.
</description>
</method>
</methods>
@@ -343,19 +349,19 @@
Enumerated value for the Z axis. Returned by [method max_axis] and [method min_axis].
</constant>
<constant name="ZERO" value="Vector3( 0, 0, 0 )">
- Zero vector.
+ Zero vector, a vector with all components set to [code]0[/code].
</constant>
<constant name="ONE" value="Vector3( 1, 1, 1 )">
- One vector.
+ One vector, a vector with all components set to [code]1[/code].
</constant>
<constant name="INF" value="Vector3( inf, inf, inf )">
- Infinity vector.
+ Infinity vector, a vector with all components set to [constant @GDScript.INF].
</constant>
<constant name="LEFT" value="Vector3( -1, 0, 0 )">
- Left unit vector.
+ Left unit vector. Represents the local direction of left, and the global direction of west.
</constant>
<constant name="RIGHT" value="Vector3( 1, 0, 0 )">
- Right unit vector.
+ Right unit vector. Represents the local direction of right, and the global direction of east.
</constant>
<constant name="UP" value="Vector3( 0, 1, 0 )">
Up unit vector.
@@ -364,10 +370,10 @@
Down unit vector.
</constant>
<constant name="FORWARD" value="Vector3( 0, 0, -1 )">
- Forward unit vector.
+ Forward unit vector. Represents the local direction of forward, and the global direction of north.
</constant>
<constant name="BACK" value="Vector3( 0, 0, 1 )">
- Back unit vector.
+ Back unit vector. Represents the local direction of back, and the global direction of south.
</constant>
</constants>
</class>
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index 91d64ea609..94551e1c2f 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -38,14 +38,14 @@
<return type="int">
</return>
<description>
- Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants.
+ Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
<method name="min_axis">
<return type="int">
</return>
<description>
- Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants.
+ Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
</description>
</method>
<method name="sign">
@@ -78,16 +78,16 @@
Enumerated value for the Z axis.
</constant>
<constant name="ZERO" value="Vector3i( 0, 0, 0 )">
- Zero vector.
+ Zero vector, a vector with all components set to [code]0[/code].
</constant>
<constant name="ONE" value="Vector3i( 1, 1, 1 )">
- One vector.
+ One vector, a vector with all components set to [code]1[/code].
</constant>
<constant name="LEFT" value="Vector3i( -1, 0, 0 )">
- Left unit vector.
+ Left unit vector. Represents the local direction of left, and the global direction of west.
</constant>
<constant name="RIGHT" value="Vector3i( 1, 0, 0 )">
- Right unit vector.
+ Right unit vector. Represents the local direction of right, and the global direction of east.
</constant>
<constant name="UP" value="Vector3i( 0, 1, 0 )">
Up unit vector.
@@ -96,10 +96,10 @@
Down unit vector.
</constant>
<constant name="FORWARD" value="Vector3i( 0, 0, -1 )">
- Forward unit vector.
+ Forward unit vector. Represents the local direction of forward, and the global direction of north.
</constant>
<constant name="BACK" value="Vector3i( 0, 0, 1 )">
- Back unit vector.
+ Back unit vector. Represents the local direction of back, and the global direction of south.
</constant>
</constants>
</class>
diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml
index b8b85ff605..5a2cce376e 100644
--- a/doc/classes/VehicleBody3D.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -6,6 +6,7 @@
<description>
This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a [CollisionShape3D] for the main body of your vehicle and add [VehicleWheel3D] nodes for the wheels. You should also add a [MeshInstance3D] to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the [member brake], [member engine_force], and [member steering] properties and not change the position or orientation of this node directly.
[b]Note:[/b] The origin point of your VehicleBody3D will determine the center of gravity of your vehicle so it is better to keep this low and move the [CollisionShape3D] and [MeshInstance3D] upwards.
+ [b]Note:[/b] This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another [PhysicsBody3D] class.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml
index c71d797eff..97b2abfa92 100644
--- a/doc/classes/VehicleWheel3D.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
This node needs to be used as a child node of [VehicleBody3D] and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface.
+ [b]Note:[/b] This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another [PhysicsBody3D] class.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 8a2c6b73d8..3294ab4cc7 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -315,7 +315,7 @@
Do not perform any antialiasing in the full screen post-process.
</constant>
<constant name="SCREEN_SPACE_AA_FXAA" value="1" enum="ScreenSpaceAA">
- Use fast approximate antialiasing. FXAA is a popular screen-space antialising method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K.
+ Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K.
</constant>
<constant name="SCREEN_SPACE_AA_MAX" value="2" enum="ScreenSpaceAA">
Represents the size of the [enum ScreenSpaceAA] enum.
diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml
index a5abf16a8d..02fe7a7cd0 100644
--- a/doc/classes/VisibilityEnabler2D.xml
+++ b/doc/classes/VisibilityEnabler2D.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself.
- [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
+ If you just want to receive notifications, use [VisibilityNotifier2D] instead.
+ [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
[b]Note:[/b] VisibilityEnabler2D will not affect nodes added after scene initialization.
</description>
<tutorials>
diff --git a/doc/classes/VisibilityEnabler3D.xml b/doc/classes/VisibilityEnabler3D.xml
index 342a37e7a4..d78ebb55f2 100644
--- a/doc/classes/VisibilityEnabler3D.xml
+++ b/doc/classes/VisibilityEnabler3D.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
The VisibilityEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler3D itself.
- [b]Note:[/b] VisibilityEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node.
+ If you just want to receive notifications, use [VisibilityNotifier3D] instead.
+ [b]Note:[/b] VisibilityEnabler3D 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] VisibilityEnabler3D will not affect nodes added after scene initialization.
</description>
<tutorials>
diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml
index 391163ef94..314a100989 100644
--- a/doc/classes/VisibilityNotifier2D.xml
+++ b/doc/classes/VisibilityNotifier2D.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
- [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
+ If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler2D] instead.
+ [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisibilityNotifier3D.xml b/doc/classes/VisibilityNotifier3D.xml
index eb7bb91f26..e5d3116612 100644
--- a/doc/classes/VisibilityNotifier3D.xml
+++ b/doc/classes/VisibilityNotifier3D.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
The VisibilityNotifier3D 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.
- [b]Note:[/b] VisibilityNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node.
+ If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler3D] instead.
+ [b]Note:[/b] VisibilityNotifier3D 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].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeMultiplyAdd.xml b/doc/classes/VisualShaderNodeMultiplyAdd.xml
new file mode 100644
index 0000000000..ba79b3fe8f
--- /dev/null
+++ b/doc/classes/VisualShaderNodeMultiplyAdd.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeMultiplyAdd" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Performs a fused multiply-add operation within the visual shader graph.
+ </brief_description>
+ <description>
+ Uses three operands to compute [code](a * b + c)[/code] expression.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="type" type="int" setter="set_type" getter="get_type" enum="VisualShaderNodeMultiplyAdd.Type" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
+ <constants>
+ <constant name="TYPE_SCALAR" value="0" enum="Type">
+ A scalar type.
+ </constant>
+ <constant name="TYPE_VECTOR" value="1" enum="Type">
+ A vector type.
+ </constant>
+ <constant name="TYPE_MAX" value="2" enum="Type">
+ Represents the size of the [enum Type] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeOutput.xml b/doc/classes/VisualShaderNodeOutput.xml
index 2b4aed9ae4..83da6f29f9 100644
--- a/doc/classes/VisualShaderNodeOutput.xml
+++ b/doc/classes/VisualShaderNodeOutput.xml
@@ -4,7 +4,7 @@
Represents the output shader parameters within the visual shader graph.
</brief_description>
<description>
- This visual shader node is present in all shader graphs in form of "Output" block with mutliple output value ports.
+ This visual shader node is present in all shader graphs in form of "Output" block with multiple output value ports.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeVectorRefract.xml b/doc/classes/VisualShaderNodeVectorRefract.xml
index 0fa90a69cf..178c35f49a 100644
--- a/doc/classes/VisualShaderNodeVectorRefract.xml
+++ b/doc/classes/VisualShaderNodeVectorRefract.xml
@@ -4,7 +4,7 @@
Returns the [Vector3] that points in the direction of refraction. For use within the visual shader graph.
</brief_description>
<description>
- Translated to [code]refract(I, N, eta)[/code] in the shader language, where [code]I[/code] is the incident vector, [code]N[/code] is the normal vector and [code]eta[/code] is the ratio of the indicies of the refraction.
+ Translated to [code]refract(I, N, eta)[/code] in the shader language, where [code]I[/code] is the incident vector, [code]N[/code] is the normal vector and [code]eta[/code] is the ratio of the indices of the refraction.
</description>
<tutorials>
</tutorials>