summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GlobalScope.xml37
-rw-r--r--doc/classes/AnimatableBody2D.xml22
-rw-r--r--doc/classes/AnimatableBody3D.xml25
-rw-r--r--doc/classes/Array.xml12
-rw-r--r--doc/classes/AudioStreamPlayback.xml2
-rw-r--r--doc/classes/CanvasItem.xml14
-rw-r--r--doc/classes/CharacterBody2D.xml15
-rw-r--r--doc/classes/CharacterBody3D.xml6
-rw-r--r--doc/classes/EditorPlugin.xml16
-rw-r--r--doc/classes/Font.xml40
-rw-r--r--doc/classes/FontData.xml587
-rw-r--r--doc/classes/HTTPRequest.xml3
-rw-r--r--doc/classes/MultiplayerAPI.xml18
-rw-r--r--doc/classes/MultiplayerPeer.xml13
-rw-r--r--doc/classes/MultiplayerReplicator.xml54
-rw-r--r--doc/classes/Node.xml39
-rw-r--r--doc/classes/Object.xml8
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml3
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml1
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml18
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml4
-rw-r--r--doc/classes/PhysicsServer2D.xml52
-rw-r--r--doc/classes/PhysicsServer3D.xml59
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryParameters3D.xml2
-rw-r--r--doc/classes/ProjectSettings.xml26
-rw-r--r--doc/classes/RigidBody2D.xml23
-rw-r--r--doc/classes/RigidBody3D.xml24
-rw-r--r--doc/classes/SeparationRayShape2D.xml24
-rw-r--r--doc/classes/SeparationRayShape3D.xml24
-rw-r--r--doc/classes/Skeleton2D.xml1
-rw-r--r--doc/classes/SoftBody3D.xml23
-rw-r--r--doc/classes/StaticBody2D.xml23
-rw-r--r--doc/classes/StaticBody3D.xml23
-rw-r--r--doc/classes/String.xml2
-rw-r--r--doc/classes/TabContainer.xml7
-rw-r--r--doc/classes/TextParagraph.xml4
-rw-r--r--doc/classes/TextServer.xml651
-rw-r--r--doc/classes/TextureProgressBar.xml3
-rw-r--r--doc/classes/TileMap.xml26
-rw-r--r--doc/classes/TileSet.xml159
-rw-r--r--doc/classes/TreeItem.xml17
-rw-r--r--doc/classes/Vector2.xml12
-rw-r--r--doc/classes/XRInterface.xml33
-rw-r--r--doc/classes/XRInterfaceExtension.xml127
-rw-r--r--doc/classes/XRServer.xml7
-rw-r--r--doc/translations/ar.po6
-rw-r--r--doc/translations/ca.po6
-rw-r--r--doc/translations/classes.pot6
-rw-r--r--doc/translations/cs.po6
-rw-r--r--doc/translations/de.po6
-rw-r--r--doc/translations/es.po10
-rw-r--r--doc/translations/fa.po6
-rw-r--r--doc/translations/fi.po6
-rw-r--r--doc/translations/fr.po6
-rw-r--r--doc/translations/id.po6
-rw-r--r--doc/translations/it.po6
-rw-r--r--doc/translations/ja.po6
-rw-r--r--doc/translations/ko.po6
-rw-r--r--doc/translations/nl.po6
-rw-r--r--doc/translations/pl.po6
-rw-r--r--doc/translations/pt_BR.po6
-rw-r--r--doc/translations/ro.po6
-rw-r--r--doc/translations/ru.po6
-rw-r--r--doc/translations/sr_Cyrl.po6
-rw-r--r--doc/translations/th.po6
-rw-r--r--doc/translations/tr.po6
-rw-r--r--doc/translations/uk.po6
-rw-r--r--doc/translations/zh_Hans.po6
-rw-r--r--doc/translations/zh_Hant.po6
70 files changed, 1822 insertions, 617 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 585b94a522..0300511eb1 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -99,14 +99,6 @@
[b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
</description>
</method>
- <method name="cartesian2polar">
- <return type="Vector2" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="y" type="float" />
- <description>
- Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle).
- </description>
- </method>
<method name="ceil">
<return type="float" />
<argument index="0" name="x" type="float" />
@@ -521,14 +513,6 @@
[b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2).
</description>
</method>
- <method name="polar2cartesian">
- <return type="Vector2" />
- <argument index="0" name="r" type="float" />
- <argument index="1" name="th" type="float" />
- <description>
- Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis).
- </description>
- </method>
<method name="posmod">
<return type="int" />
<argument index="0" name="x" type="int" />
@@ -2441,6 +2425,8 @@
</constant>
<constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="268435456" enum="PropertyUsageFlags">
</constant>
+ <constant name="PROPERTY_USAGE_ARRAY" value="1073741824" enum="PropertyUsageFlags">
+ </constant>
<constant name="PROPERTY_USAGE_DEFAULT" value="7" enum="PropertyUsageFlags">
Default usage (storage, editor and network).
</constant>
@@ -2474,10 +2460,29 @@
<constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags">
</constant>
<constant name="METHOD_FLAG_OBJECT_CORE" value="512" enum="MethodFlags">
+ Used internally. Allows to not dump core virtuals such as [code]_notification[/code] to the JSON API.
</constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
Default method flags.
</constant>
+ <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
+ Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
+ </constant>
+ <constant name="RPC_MODE_ANY" value="1" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not.
+ </constant>
+ <constant name="RPC_MODE_AUTH" value="2" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely only by the current network authority (which is the server by default). Analogous to the [code]@rpc(auth)[/code] annotation. See [method Node.set_network_authority].
+ </constant>
+ <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
+ </constant>
+ <constant name="TRANSFER_MODE_ORDERED" value="1" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
+ </constant>
+ <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
+ Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
+ </constant>
<constant name="TYPE_NIL" value="0" enum="Variant.Type">
Variable is [code]null[/code].
</constant>
diff --git a/doc/classes/AnimatableBody2D.xml b/doc/classes/AnimatableBody2D.xml
new file mode 100644
index 0000000000..731c702549
--- /dev/null
+++ b/doc/classes/AnimatableBody2D.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimatableBody2D" inherits="StaticBody2D" version="4.0">
+ <brief_description>
+ Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors.
+ </brief_description>
+ <description>
+ Animatable body for 2D physics.
+ An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors.
+ When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
+ If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody2D.move_and_collide].
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AnimatableBody3D.xml b/doc/classes/AnimatableBody3D.xml
new file mode 100644
index 0000000000..8192f26057
--- /dev/null
+++ b/doc/classes/AnimatableBody3D.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimatableBody3D" inherits="StaticBody3D" version="4.0">
+ <brief_description>
+ Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors.
+ </brief_description>
+ <description>
+ Animatable body for 3D physics.
+ An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors.
+ When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ </description>
+ <tutorials>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
+ If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody3D.move_and_collide].
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 7767a1028d..02c6b18d55 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -302,7 +302,7 @@
</description>
</method>
<method name="insert">
- <return type="void" />
+ <return type="int" />
<argument index="0" name="position" type="int" />
<argument index="1" name="value" type="Variant" />
<description>
@@ -393,6 +393,14 @@
<description>
</description>
</method>
+ <method name="pop_at">
+ <return type="Variant" />
+ <argument index="0" name="position" type="int" />
+ <description>
+ Removes and returns the element of the array at index [code]position[/code]. If negative, [code]position[/code] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty.
+ [b]Note:[/b] On large arrays, this method can be slower than [method pop_back] as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower [method pop_at] will be.
+ </description>
+ </method>
<method name="pop_back">
<return type="Variant" />
<description>
@@ -487,7 +495,7 @@
<argument index="2" name="step" type="int" default="1" />
<argument index="3" name="deep" type="bool" default="false" />
<description>
- Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing.
+ Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. If [code]end[/code] is an invalid value, the end of the array is used.
</description>
</method>
<method name="sort">
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index 09d063ed3b..25f3e076b4 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -26,7 +26,7 @@
</description>
</method>
<method name="_mix" qualifiers="virtual">
- <return type="void" />
+ <return type="int" />
<argument index="0" name="buffer" type="AudioFrame*" />
<argument index="1" name="rate_scale" type="float" />
<argument index="2" name="frames" type="int" />
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 2c92ce0185..4641bc52a4 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -106,6 +106,20 @@
Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation.
</description>
</method>
+ <method name="draw_msdf_texture_rect_region">
+ <return type="void" />
+ <argument index="0" name="texture" type="Texture2D" />
+ <argument index="1" name="rect" type="Rect2" />
+ <argument index="2" name="src_rect" type="Rect2" />
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="4" name="outline" type="float" default="0.0" />
+ <argument index="5" name="pixel_range" type="float" default="4.0" />
+ <description>
+ Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color.
+ If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius.
+ Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation.
+ </description>
+ </method>
<method name="draw_multiline">
<return type="void" />
<argument index="0" name="points" type="PackedVector2Array" />
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index e5f60541b9..f98c22a1e9 100644
--- a/doc/classes/CharacterBody2D.xml
+++ b/doc/classes/CharacterBody2D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CharacterBody2D" inherits="PhysicsBody2D" version="4.0">
<brief_description>
- Character body 2D node.
+ Specialized 2D physics body node for characters moved by script.
</brief_description>
<description>
- Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses:
- [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
- [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path.
+ Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a [AnimatableBody2D]. However, they have two main uses:
+ [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody2D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
+ [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody2D]), which allows them to be moved by code and push other bodies on their path.
</description>
<tutorials>
<link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
@@ -152,8 +152,11 @@
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0">
Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes.
</member>
- <member name="moving_platform_ignore_layers" type="int" setter="set_moving_platform_ignore_layers" getter="get_moving_platform_ignore_layers" default="0">
- Collision layers that will be excluded for detecting bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all touching bodies are detected and propagate their velocity. You can add excluded layers to ignore bodies that are contained in these layers.
+ <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
+ Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
+ </member>
+ <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
+ Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored.
</member>
<member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true">
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 85135d5509..81ffbe01c1 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CharacterBody3D" inherits="PhysicsBody3D" version="4.0">
<brief_description>
- Character body 3D node.
+ Specialized 3D physics body node for characters moved by script.
</brief_description>
<description>
- Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses:
+ Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a [AnimatableBody3D]. However, they have two main uses:
[b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
- [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path.
+ [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody3D]), which allows them to be moved by code and push other bodies on their path.
</description>
<tutorials>
<link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index e564e8045c..b8436be76a 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -56,11 +56,11 @@
Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
- func _forward_spatial_3d_over_viewport(overlay):
+ func _forward_3d_draw_over_viewport(overlay):
# Draw a circle at cursor position.
overlay.draw_circle(overlay.get_local_mouse_position(), 64)
- func _forward_spatial_gui_input(camera, event):
+ func _forward_3d_gui_input(camera, event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
@@ -68,13 +68,13 @@
return false
[/gdscript]
[csharp]
- public override void ForwardSpatialDrawOverViewport(Godot.Control overlay)
+ public override void _Forward3dDrawOverViewport(Godot.Control overlay)
{
// Draw a circle at cursor position.
overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White);
}
- public override bool ForwardSpatialGuiInput(Godot.Camera3D camera, InputEvent @event)
+ public override bool _Forward3dGuiInput(Godot.Camera3D camera, InputEvent @event)
{
if (@event is InputEventMouseMotion)
{
@@ -104,12 +104,12 @@
[codeblocks]
[gdscript]
# Prevents the InputEvent to reach other Editor classes.
- func _forward_spatial_gui_input(camera, event):
+ func _forward_3d_gui_input(camera, event):
return true
[/gdscript]
[csharp]
// Prevents the InputEvent to reach other Editor classes.
- public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event)
+ public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
return true;
}
@@ -119,12 +119,12 @@
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
- func _forward_spatial_gui_input(camera, event):
+ func _forward_3d_gui_input(camera, event):
return event is InputEventMouseMotion
[/gdscript]
[csharp]
// Consumes InputEventMouseMotion and forwards other InputEvent types.
- public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event)
+ public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
return @event is InputEventMouseMotion;
}
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 06dcaca846..aa70856e32 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -70,6 +70,12 @@
Add font data source to the set.
</description>
</method>
+ <method name="clear_data">
+ <return type="void" />
+ <description>
+ Removes all font data sourcers for the set.
+ </description>
+ </method>
<method name="draw_char" qualifiers="const">
<return type="float" />
<argument index="0" name="canvas_item" type="RID" />
@@ -151,6 +157,13 @@
Returns the number of font data sources.
</description>
</method>
+ <method name="get_data_rid" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="idx" type="int" />
+ <description>
+ Returns TextServer RID of the font data resources.
+ </description>
+ </method>
<method name="get_descent" qualifiers="const">
<return type="float" />
<argument index="0" name="size" type="int" default="-1" />
@@ -180,15 +193,18 @@
</method>
<method name="get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="type" type="int" />
+ <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
<description>
- Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
+ Returns the spacing for the given [code]type[/code] (see [enum TextServer.SpacingType]).
</description>
</method>
<method name="get_string_size" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="text" type="String" />
<argument index="1" name="size" type="int" default="-1" />
+ <argument index="2" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="width" type="float" default="-1" />
+ <argument index="4" name="flags" type="int" default="3" />
<description>
Returns the size of a bounding box of a string, taking kerning and advance into account.
[b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height].
@@ -242,10 +258,10 @@
</method>
<method name="set_spacing">
<return type="void" />
- <argument index="0" name="type" type="int" />
+ <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
<argument index="1" name="value" type="int" />
<description>
- Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
</description>
</method>
<method name="update_changes">
@@ -256,19 +272,19 @@
</method>
</methods>
<members>
- <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ <member name="base_size" type="int" setter="set_base_size" getter="get_base_size" default="16">
+ Default font size.
+ </member>
+ <member name="spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
Extra spacing at the bottom of the line in pixels.
</member>
- <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ <member name="spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
Extra spacing at the top of the line in pixels.
</member>
+ <member name="variation_coordinates" type="Dictionary" setter="set_variation_coordinates" getter="get_variation_coordinates" default="{}">
+ Default font [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url].
+ </member>
</members>
<constants>
- <constant name="SPACING_TOP" value="0" enum="SpacingType">
- Spacing at the top of the line.
- </constant>
- <constant name="SPACING_BOTTOM" value="1" enum="SpacingType">
- Spacing at the bottom of the line.
- </constant>
</constants>
</class>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index 7a845a698f..72af7ca485 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -1,122 +1,179 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FontData" inherits="Resource" version="4.0">
<brief_description>
- Font data source, file or memory buffer.
+ Font source data and prerendered glyph cache, imported from dynamic or bitmap font.
+ Supported font formats:
+ - Dynamic font importer: TrueType (.ttf), OpenType (.otf), WOFF (.woff), Type 1 (.pfb, .pfm).
+ - Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants.
+ - Monospace image font importer: All supported image formats.
</brief_description>
<description>
- Built-in text servers support font data sources of the following formats:
- - Bitmap fonts in the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format. Handles [code].fnt, *.font[/code] fonts containing texture atlases. Non-scalable. Supports distance fields. Complex text shaping support is limited.
- - Dynamic fonts using the [url=https://www.freetype.org/]FreeType[/url] and [url=https://github.com/silnrsi/graphite/]Graphite[/url] library for rasterization. Handles [code]*.ttf, *.otf[/code] fonts. Scalable. Doesn't support distance fields. Supports complex text shaping and OpenType features.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="bitmap_add_char">
+ <method name="clear_cache">
<return type="void" />
- <argument index="0" name="char" type="int" />
- <argument index="1" name="texture_idx" type="int" />
- <argument index="2" name="rect" type="Rect2" />
- <argument index="3" name="align" type="Vector2" />
- <argument index="4" name="advance" type="float" />
<description>
- Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance.
+ Removes all font cache entries.
</description>
</method>
- <method name="bitmap_add_kerning_pair">
+ <method name="clear_glyphs">
<return type="void" />
- <argument index="0" name="A" type="int" />
- <argument index="1" name="B" type="int" />
- <argument index="2" name="kerning" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
</description>
</method>
- <method name="bitmap_add_texture">
+ <method name="clear_kerning_map">
<return type="void" />
- <argument index="0" name="texture" type="Texture" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Adds a texture to the bitmap font.
+ Removes all kerning overrides.
</description>
</method>
- <method name="draw_glyph" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="pos" type="Vector2" />
- <argument index="3" name="index" type="int" />
- <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <method name="clear_size_cache">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
<description>
- Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
- Returns advance of the glyph for horizontal and vertical layouts.
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Removes all font sizes from the cache entry
</description>
</method>
- <method name="draw_glyph_outline" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="outline_size" type="int" />
- <argument index="3" name="pos" type="Vector2" />
- <argument index="4" name="index" type="int" />
- <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <method name="clear_textures">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually.
+ </description>
+ </method>
+ <method name="find_cache" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="variation_coordinates" type="Dictionary" />
<description>
- Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. If outline drawing is not supported, nothing is drawn.
- Returns advance of the glyph for horizontal and vertical layouts (regardless of outline drawing support).
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Returns existing or creates a new font cache entry for the specified variation coordinates.
</description>
</method>
<method name="get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="get_base_size" qualifiers="const">
- <return type="float" />
+ <method name="get_cache_count" qualifiers="const">
+ <return type="int" />
<description>
- Returns the base size of the font (the only size supported for non-scalable fonts, meaningless for scalable fonts).
+ Returns number of the font cache entries.
+ </description>
+ </method>
+ <method name="get_cache_rid" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="cache_index" type="int" />
+ <description>
+ Returns text server font cache entry resource id.
+ </description>
+ </method>
+ <method name="get_data" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Returns contents of the dynamic font source file.
</description>
</method>
<method name="get_descent" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns the font descent (number of pixels below the baseline).
+ Returns font descent (number of pixels below the baseline).
</description>
</method>
<method name="get_glyph_advance" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="index" type="int" />
+ <argument index="0" name="cache_index" type="int" />
<argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns advance of the glyph for horizontal and vertical layouts.
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
</description>
</method>
<method name="get_glyph_index" qualifiers="const">
<return type="int" />
<argument index="0" name="char" type="int" />
- <argument index="1" name="variation_selector" type="int" default="0" />
+ <argument index="1" name="variation_selector" type="int" />
+ <argument index="2" name="arg2" type="int" />
<description>
- Return the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
+ Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
</description>
</method>
- <method name="get_glyph_kerning" qualifiers="const">
+ <method name="get_glyph_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns list of rendered glyphs in the cache entry.
+ </description>
+ </method>
+ <method name="get_glyph_offset" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="index_a" type="int" />
- <argument index="1" name="index_b" type="int" />
- <argument index="2" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns a kerning of the pair of glyphs for horizontal and vertical layouts.
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Returns glyph offset from the baseline.
</description>
</method>
- <method name="get_height" qualifiers="const">
- <return type="float" />
- <argument index="0" name="size" type="int" />
+ <method name="get_glyph_size" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns the total font height (ascent plus descent) in pixels.
+ Returns glyph size.
+ </description>
+ </method>
+ <method name="get_glyph_texture_idx" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="get_glyph_uv_rect" qualifiers="const">
+ <return type="Rect2" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns rectangle in the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="get_hinting" qualifiers="const">
+ <return type="int" enum="TextServer.Hinting" />
+ <description>
+ Returns the font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="get_kerning" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Returns kerning for the pair of glyphs.
+ </description>
+ </method>
+ <method name="get_kerning_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns list of the kerning overrides.
</description>
</method>
<method name="get_language_support_override" qualifiers="const">
@@ -132,6 +189,32 @@
Returns list of language support overrides.
</description>
</method>
+ <method name="get_msdf_pixel_range" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="get_msdf_size" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns source font size used to generate MSDF textures.
+ </description>
+ </method>
+ <method name="get_oversampling" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="get_scale" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns scaling factor of the color bitmap font.
+ </description>
+ </method>
<method name="get_script_support_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="script" type="String" />
@@ -145,11 +228,20 @@
Returns list of script support overrides.
</description>
</method>
+ <method name="get_size_cache_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <description>
+ Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ </description>
+ </method>
<method name="get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="type" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="arg2" type="int" enum="TextServer.SpacingType" />
<description>
- Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
+ Returns extra spacing added between glyphs in pixels.
</description>
</method>
<method name="get_supported_chars" qualifiers="const">
@@ -158,32 +250,66 @@
Returns a string containing all the characters available in the font.
</description>
</method>
- <method name="get_underline_position" qualifiers="const">
- <return type="float" />
- <argument index="0" name="size" type="int" />
+ <method name="get_supported_feature_list" qualifiers="const">
+ <return type="Dictionary" />
<description>
- Returns underline offset (number of pixels below the baseline).
+ Returns list of OpenType features supported by font.
</description>
</method>
- <method name="get_underline_thickness" qualifiers="const">
+ <method name="get_supported_variation_list" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
+ Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ </description>
+ </method>
+ <method name="get_texture_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns number of textures used by font cache entry.
+ </description>
+ </method>
+ <method name="get_texture_image" qualifiers="const">
+ <return type="Image" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns a copy of the font cache texture image.
+ </description>
+ </method>
+ <method name="get_texture_offsets" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns a copy of the array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="get_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns underline thickness in pixels.
+ Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="get_variation" qualifiers="const">
+ <method name="get_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="tag" type="String" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns variation coordinate [code]tag[/code].
+ Returns thickness of the underline in pixels.
</description>
</method>
- <method name="get_variation_list" qualifiers="const">
+ <method name="get_variation_coordinates" qualifiers="const">
<return type="Dictionary" />
+ <argument index="0" name="cache_index" type="int" />
<description>
- Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
- Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ Returns variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
</description>
</method>
<method name="has_char" qualifiers="const">
@@ -193,10 +319,16 @@
Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
- <method name="has_outline" qualifiers="const">
+ <method name="is_antialiased" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
+ </description>
+ </method>
+ <method name="is_force_autohinter" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code], if font supports drawing glyph outlines.
+ Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="is_language_supported" qualifiers="const">
@@ -206,6 +338,12 @@
Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
</description>
</method>
+ <method name="is_multichannel_signed_distance_field" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
+ </description>
+ </method>
<method name="is_script_supported" qualifiers="const">
<return type="bool" />
<argument index="0" name="script" type="String" />
@@ -213,32 +351,29 @@
Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
</description>
</method>
- <method name="load_memory">
+ <method name="remove_cache">
<return type="void" />
- <argument index="0" name="data" type="PackedByteArray" />
- <argument index="1" name="type" type="String" />
- <argument index="2" name="base_size" type="int" default="16" />
+ <argument index="0" name="cache_index" type="int" />
<description>
- Creates new font from the data in memory.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size.
+ Removes specified font cache entry.
</description>
</method>
- <method name="load_resource">
+ <method name="remove_glyph">
<return type="void" />
- <argument index="0" name="filename" type="String" />
- <argument index="1" name="base_size" type="int" default="16" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Creates new font from the file.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size.
+ Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
</description>
</method>
- <method name="new_bitmap">
+ <method name="remove_kerning">
<return type="void" />
- <argument index="0" name="height" type="float" />
- <argument index="1" name="ascent" type="float" />
- <argument index="2" name="base_size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
<description>
- Creates new, empty bitmap font.
+ Removes kerning override for the pair of glyphs.
</description>
</method>
<method name="remove_language_support_override">
@@ -255,6 +390,148 @@
Removes script support override.
</description>
</method>
+ <method name="remove_size_cache">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes specified font size from the cache entry.
+ </description>
+ </method>
+ <method name="remove_texture">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph].
+ </description>
+ </method>
+ <method name="render_glyph">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="index" type="int" />
+ <description>
+ Renders specified glyph the the font cache texture.
+ </description>
+ </method>
+ <method name="render_range">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="start" type="int" />
+ <argument index="3" name="end" type="int" />
+ <description>
+ Renders the range of characters to the font cache texture.
+ </description>
+ </method>
+ <method name="set_antialiased">
+ <return type="void" />
+ <argument index="0" name="antialiased" type="bool" />
+ <description>
+ If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="set_ascent">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="ascent" type="float" />
+ <description>
+ Sets the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="set_data">
+ <return type="void" />
+ <argument index="0" name="data" type="PackedByteArray" />
+ <description>
+ Sets font source data, e.g contents of the dynamic font source file.
+ </description>
+ </method>
+ <method name="set_descent">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="descent" type="float" />
+ <description>
+ Sets the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="set_force_autohinter">
+ <return type="void" />
+ <argument index="0" name="force_autohinter" type="bool" />
+ <description>
+ If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ </description>
+ </method>
+ <method name="set_glyph_advance">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="advance" type="Vector2" />
+ <description>
+ Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
+ </description>
+ </method>
+ <method name="set_glyph_offset">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="offset" type="Vector2" />
+ <description>
+ Sets glyph offset from the baseline.
+ </description>
+ </method>
+ <method name="set_glyph_size">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="gl_size" type="Vector2" />
+ <description>
+ Sets glyph size.
+ </description>
+ </method>
+ <method name="set_glyph_texture_idx">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="texture_idx" type="int" />
+ <description>
+ Sets index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="set_glyph_uv_rect">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="uv_rect" type="Rect2" />
+ <description>
+ Sets rectangle in the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="set_hinting">
+ <return type="void" />
+ <argument index="0" name="hinting" type="int" enum="TextServer.Hinting" />
+ <description>
+ Sets font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="set_kerning">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <argument index="3" name="kerning" type="Vector2" />
+ <description>
+ Sets kerning for the pair of glyphs.
+ </description>
+ </method>
<method name="set_language_support_override">
<return type="void" />
<argument index="0" name="language" type="String" />
@@ -263,6 +540,43 @@
Adds override for [method is_language_supported].
</description>
</method>
+ <method name="set_msdf_pixel_range">
+ <return type="void" />
+ <argument index="0" name="msdf_pixel_range" type="int" />
+ <description>
+ Sets the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="set_msdf_size">
+ <return type="void" />
+ <argument index="0" name="msdf_size" type="int" />
+ <description>
+ Sets source font size used to generate MSDF textures.
+ </description>
+ </method>
+ <method name="set_multichannel_signed_distance_field">
+ <return type="void" />
+ <argument index="0" name="msdf" type="bool" />
+ <description>
+ If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
+ </description>
+ </method>
+ <method name="set_oversampling">
+ <return type="void" />
+ <argument index="0" name="oversampling" type="float" />
+ <description>
+ Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="set_scale">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="scale" type="float" />
+ <description>
+ Sets scaling factor of the color bitmap font.
+ </description>
+ </method>
<method name="set_script_support_override">
<return type="void" />
<argument index="0" name="script" type="String" />
@@ -273,52 +587,61 @@
</method>
<method name="set_spacing">
<return type="void" />
- <argument index="0" name="type" type="int" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="3" name="arg3" type="int" />
+ <description>
+ Sets extra spacing added between glyphs in pixels.
+ </description>
+ </method>
+ <method name="set_texture_image">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="image" type="Image" />
+ <description>
+ Sets font cache texture image.
+ </description>
+ </method>
+ <method name="set_texture_offsets">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="offset" type="PackedInt32Array" />
+ <description>
+ Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty (for the fonts without dynamic glyph generation support).
+ </description>
+ </method>
+ <method name="set_underline_position">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_position" type="float" />
+ <description>
+ Sets pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="set_underline_thickness">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_thickness" type="float" />
<description>
- Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ Sets thickness of the underline in pixels.
</description>
</method>
- <method name="set_variation">
+ <method name="set_variation_coordinates">
<return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="float" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="variation_coordinates" type="Dictionary" />
<description>
- Sets variation coordinate [code]tag[/code].
+ Sets variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
</description>
</method>
</methods>
- <members>
- <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false">
- If [code]true[/code], the font is rendered with anti-aliasing.
- </member>
- <member name="data_path" type="String" setter="set_data_path" getter="get_data_path" default="&quot;&quot;">
- The path to the font data file. If font data was loaded from memory location is set to [code]"(Memory)"[/code].
- </member>
- <member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false">
- If [code]true[/code], distance field hint is enabled.
- </member>
- <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing for each glyph in pixels.
- This can be a negative number to make the distance between glyphs smaller.
- </member>
- <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing for the space character in pixels.
- This can be a negative number to make the distance between words smaller.
- </member>
- <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false">
- If [code]true[/code], default autohinter is used for font hinting.
- </member>
- <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="0">
- The font hinting mode used by FreeType. See [enum TextServer.Hinting] for options.
- </member>
- </members>
<constants>
- <constant name="SPACING_GLYPH" value="0" enum="SpacingType">
- Spacing for each glyph.
- </constant>
- <constant name="SPACING_SPACE" value="1" enum="SpacingType">
- Spacing for the space character.
- </constant>
</constants>
</class>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index f45ddd0abb..00927b98c5 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -192,7 +192,8 @@
<description>
Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request].
Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host.
- [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.
+ [b]Note:[/b] When [code]method[/code] is [constant HTTPClient.METHOD_GET], the payload sent via [code]request_data[/code] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example).
+ [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead.
</description>
</method>
<method name="request_raw">
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index 610b00efe9..9c688f7b8b 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -30,7 +30,7 @@
Returns the unique peer ID of this MultiplayerAPI's [member network_peer].
</description>
</method>
- <method name="get_rpc_sender_id" qualifiers="const">
+ <method name="get_remote_sender_id" qualifiers="const">
<return type="int" />
<description>
Returns the sender's peer ID for the RPC currently being executed.
@@ -60,7 +60,7 @@
<return type="int" enum="Error" />
<argument index="0" name="bytes" type="PackedByteArray" />
<argument index="1" name="id" type="int" default="0" />
- <argument index="2" name="mode" type="int" enum="MultiplayerPeer.TransferMode" default="2" />
+ <argument index="2" name="mode" type="int" enum="TransferMode" default="2" />
<argument index="3" name="channel" type="int" default="0" />
<description>
Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers.
@@ -73,7 +73,7 @@
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
</member>
<member name="network_peer" type="MultiplayerPeer" setter="set_network_peer" getter="get_network_peer">
- The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals.
+ The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals.
</member>
<member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false">
If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections.
@@ -122,17 +122,5 @@
</signal>
</signals>
<constants>
- <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
- Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
- </constant>
- <constant name="RPC_MODE_REMOTE" value="1" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets.
- </constant>
- <constant name="RPC_MODE_MASTER" value="2" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master].
- </constant>
- <constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master].
- </constant>
</constants>
</class>
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index adaa359168..6ee6fce49f 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -57,9 +57,9 @@
</member>
<member name="transfer_channel" type="int" setter="set_transfer_channel" getter="get_transfer_channel" default="0">
The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send [b]different and independent[/b] state updates is a common way to optimize network usage and decrease latency in fast-paced games.
- [b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly.
+ [b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly.
</member>
- <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="0">
+ <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="TransferMode" default="0">
The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
</member>
</members>
@@ -93,15 +93,6 @@
</signal>
</signals>
<constants>
- <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
- </constant>
- <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
- </constant>
- <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
- </constant>
<constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus">
The ongoing connection disconnected.
</constant>
diff --git a/doc/classes/MultiplayerReplicator.xml b/doc/classes/MultiplayerReplicator.xml
index 15029e181f..2657f835c4 100644
--- a/doc/classes/MultiplayerReplicator.xml
+++ b/doc/classes/MultiplayerReplicator.xml
@@ -12,6 +12,7 @@
<argument index="0" name="scene_id" type="int" />
<argument index="1" name="object" type="Object" />
<argument index="2" name="data" type="PackedByteArray" />
+ <argument index="3" name="initial" type="bool" default="true" />
<description>
Decode the given [code]data[/code] representing a spawnable state into [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when a client receives a server spawn for a scene with [constant REPLICATION_MODE_SERVER]. See [method spawn_config].
Tip: You may find this function useful in servers when parsing spawn requests from clients, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM].
@@ -23,12 +24,14 @@
<argument index="1" name="object" type="Object" />
<argument index="2" name="peer_id" type="int" default="0" />
<description>
+ Request a despawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_despawn] for the default behavior.
</description>
</method>
<method name="encode_state">
<return type="PackedByteArray" />
<argument index="0" name="scene_id" type="int" />
<argument index="1" name="object" type="Object" />
+ <argument index="2" name="initial" type="bool" default="true" />
<description>
Encode the given [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when the server spawns scenes with [constant REPLICATION_MODE_SERVER]. See [method spawn_config].
Tip: You may find this function useful when requesting spawns from clients to server, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM].
@@ -54,12 +57,24 @@
Sends a spawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_network_server]), the receiving peer(s) will automatically instantiate that scene, add it to the [SceneTree] at the given [code]path[/code] and emit the signal [signal spawned]. In all other cases no instantiation happens, and the signal [signal spawn_requested] is emitted instead.
</description>
</method>
+ <method name="send_sync">
+ <return type="int" enum="Error" />
+ <argument index="0" name="peer_id" type="int" />
+ <argument index="1" name="scene_id" type="int" />
+ <argument index="2" name="data" type="PackedByteArray" />
+ <argument index="3" name="transfer_mode" type="int" enum="TransferMode" default="2" />
+ <argument index="4" name="channel" type="int" default="0" />
+ <description>
+ Sends a sync request for the instances of the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). This function can only be called manually when overriding the send and receive sync functions (see [method sync_config]).
+ </description>
+ </method>
<method name="spawn">
<return type="int" enum="Error" />
<argument index="0" name="scene_id" type="int" />
<argument index="1" name="object" type="Object" />
<argument index="2" name="peer_id" type="int" default="0" />
<description>
+ Request a spawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_spawn] for the default behavior.
</description>
</method>
<method name="spawn_config">
@@ -70,10 +85,47 @@
<argument index="3" name="custom_send" type="Callable" />
<argument index="4" name="custom_receive" type="Callable" />
<description>
- Configures the MultiplayerAPI to track instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. When [code]mode[/code] is [constant REPLICATION_MODE_SERVER], the specified [code]properties[/code] will also be replicated to clients during the initial spawn.
+ Configures the MultiplayerReplicator to track instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. When [code]mode[/code] is [constant REPLICATION_MODE_SERVER], the specified [code]properties[/code] will also be replicated to clients during the initial spawn. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the spawn/despawn proecess.
Tip: You can use a custom property in the scene main script to return a customly optimized state representation.
</description>
</method>
+ <method name="sync_all">
+ <return type="int" enum="Error" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="peer_id" type="int" default="0" />
+ <description>
+ Manually request a sync for all the instances of the scene identified by [code]scene_id[/code]. This function will trigger the default sync behaviour, or call your send custom send callable if specified in [method sync_config].
+ Note: The default implementation only allow syncing from server to clients.
+ </description>
+ </method>
+ <method name="sync_config">
+ <return type="int" enum="Error" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="interval" type="int" />
+ <argument index="2" name="properties" type="StringName[]" default="[]" />
+ <argument index="3" name="custom_send" type="Callable" />
+ <argument index="4" name="custom_receive" type="Callable" />
+ <description>
+ Configures the MultiplayerReplicator to sync instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication at the desired [code]interval[/code] (in milliseconds). The specified [code]properties[/code] will be part of the state sync. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the syncronization proecess.
+ Tip: You can use a custom property in the scene main script to return a customly optimized state representation (having a single property that returns a PackedByteArray is higly recommended when dealing with many instances).
+ </description>
+ </method>
+ <method name="track">
+ <return type="void" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <description>
+ Track the given [code]object[/code] as an instance of the scene identified by [code]scene_id[/code]. This object will be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER].
+ </description>
+ </method>
+ <method name="untrack">
+ <return type="void" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <description>
+ Untrack the given [code]object[/code]. This object will no longer be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER].
+ </description>
+ </method>
</methods>
<signals>
<signal name="despawn_requested">
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index f5bc705ecb..1f5823c37c 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -109,9 +109,11 @@
<return type="void" />
<argument index="0" name="node" type="Node" />
<argument index="1" name="legible_unique_name" type="bool" default="false" />
+ <argument index="2" name="internal" type="int" enum="Node.InternalMode" default="0" />
<description>
Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
+ If [code]internal[/code] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. Such nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code].The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes.
[b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example:
[codeblocks]
[gdscript]
@@ -141,6 +143,7 @@
Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it.
If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children.
+ [b]Note:[/b] If this node is internal, the new sibling will be internal too (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="add_to_group">
@@ -200,22 +203,28 @@
<method name="get_child" qualifiers="const">
<return type="Node" />
<argument index="0" name="idx" type="int" />
+ <argument index="1" name="include_internal" type="bool" default="false" />
<description>
Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node.
Negative indices access the children from the last one.
+ If [code]include_internal[/code] is [code]true[/code], internal children are skipped (see [code]internal[/code] parameter in [method add_child]).
To access a child node via its name, use [method get_node].
</description>
</method>
<method name="get_child_count" qualifiers="const">
<return type="int" />
+ <argument index="0" name="include_internal" type="bool" default="false" />
<description>
Returns the number of child nodes.
+ If [code]include_internal[/code] is [code]false[/code], internal children aren't counted (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="get_children" qualifiers="const">
<return type="Node[]" />
+ <argument index="0" name="include_internal" type="bool" default="false" />
<description>
Returns an array of references to node's children.
+ If [code]include_internal[/code] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="get_editor_description" qualifiers="const">
@@ -231,14 +240,16 @@
</method>
<method name="get_index" qualifiers="const">
<return type="int" />
+ <argument index="0" name="include_internal" type="bool" default="false" />
<description>
Returns the node's order in the scene tree branch. For example, if called on the first child node the position is [code]0[/code].
+ If [code]include_internal[/code] is [code]false[/code], the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
- <method name="get_network_master" qualifiers="const">
+ <method name="get_network_authority" qualifiers="const">
<return type="int" />
<description>
- Returns the peer ID of the network master for this node. See [method set_network_master].
+ Returns the peer ID of the network authority for this node. See [method set_network_authority].
</description>
</method>
<method name="get_node" qualifiers="const">
@@ -406,10 +417,10 @@
Returns [code]true[/code] if this node is currently inside a [SceneTree].
</description>
</method>
- <method name="is_network_master" qualifiers="const">
+ <method name="is_network_authority" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the local system is the master of this node.
+ Returns [code]true[/code] if the local system is the authority of this node.
</description>
</method>
<method name="is_physics_processing" qualifiers="const">
@@ -460,6 +471,7 @@
<argument index="1" name="to_position" type="int" />
<description>
Moves a child node to a different position (order) among the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.
+ [b]Note:[/b] Internal children can only be moved within their expected "internal range" (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="print_stray_nodes">
@@ -572,11 +584,11 @@
<method name="rpc_config">
<return type="int" />
<argument index="0" name="method" type="StringName" />
- <argument index="1" name="rpc_mode" type="int" enum="MultiplayerAPI.RPCMode" />
- <argument index="2" name="transfer_mode" type="int" enum="MultiplayerPeer.TransferMode" default="2" />
+ <argument index="1" name="rpc_mode" type="int" enum="RPCMode" />
+ <argument index="2" name="transfer_mode" type="int" enum="TransferMode" default="2" />
<argument index="3" name="channel" type="int" default="0" />
<description>
- Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum MultiplayerAPI.RPCMode] and [enum MultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs).
+ Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum RPCMode] and [enum TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(auth)[/code]). By default, methods are not exposed to networking (and RPCs).
</description>
</method>
<method name="rpc_id" qualifiers="vararg">
@@ -608,12 +620,12 @@
<description>
</description>
</method>
- <method name="set_network_master">
+ <method name="set_network_authority">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="recursive" type="bool" default="true" />
<description>
- Sets the node's network master to the peer with the given peer ID. The network master is the peer that has authority over the node on the network. Useful in conjunction with the [code]master[/code] and [code]puppet[/code] keywords. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the master for all children of this node.
+ Sets the node's network authority to the peer with the given peer ID. The network authority is the peer that has authority over the node on the network. Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the authority for all children of this node.
</description>
</method>
<method name="set_physics_process">
@@ -888,5 +900,14 @@
Duplicate using instancing.
An instance stays linked to the original so when the original changes, the instance changes too.
</constant>
+ <constant name="INTERNAL_MODE_DISABLED" value="0" enum="InternalMode">
+ Node will not be internal.
+ </constant>
+ <constant name="INTERNAL_MODE_FRONT" value="1" enum="InternalMode">
+ Node will be placed at the front of parent's node list, before any non-internal sibling.
+ </constant>
+ <constant name="INTERNAL_MODE_BACK" value="2" enum="InternalMode">
+ Node will be placed at the back of parent's node list, after any non-internal sibling.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 9ad79dc17a..c9e9a0699c 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -13,15 +13,15 @@
[codeblocks]
[gdscript]
var n = Node2D.new()
- print("position" in n) # Prints "True".
- print("other_property" in n) # Prints "False".
+ print("position" in n) # Prints "true".
+ print("other_property" in n) # Prints "false".
[/gdscript]
[csharp]
var node = new Node2D();
// C# has no direct equivalent to GDScript's `in` operator here, but we
// can achieve the same behavior by performing `Get` with a null check.
- GD.Print(node.Get("position") != null); // Prints "True".
- GD.Print(node.Get("other_property") != null); // Prints "False".
+ GD.Print(node.Get("position") != null); // Prints "true".
+ GD.Print(node.Get("other_property") != null); // Prints "false".
[/csharp]
[/codeblocks]
The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code].
diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index 4c6adfca32..8698fbec61 100644
--- a/doc/classes/PhysicsDirectBodyState2D.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -155,6 +155,9 @@
<member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity">
The body's rotational velocity.
</member>
+ <member name="center_of_mass" type="Vector2" setter="" getter="get_center_of_mass">
+ The body's center of mass.
+ </member>
<member name="inverse_inertia" type="float" setter="" getter="get_inverse_inertia">
The inverse of the inertia of the body.
</member>
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index 271668e339..4599f86423 100644
--- a/doc/classes/PhysicsDirectBodyState3D.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -157,6 +157,7 @@
The body's rotational velocity.
</member>
<member name="center_of_mass" type="Vector3" setter="" getter="get_center_of_mass">
+ The body's center of mass.
</member>
<member name="inverse_inertia" type="Vector3" setter="" getter="get_inverse_inertia">
The inverse of the inertia of the body.
diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index e84b3e0e49..64e0fa4050 100644
--- a/doc/classes/PhysicsDirectSpaceState2D.xml
+++ b/doc/classes/PhysicsDirectSpaceState2D.xml
@@ -47,7 +47,7 @@
<argument index="0" name="point" type="Vector2" />
<argument index="1" name="max_results" type="int" default="32" />
<argument index="2" name="exclude" type="Array" default="[]" />
- <argument index="3" name="collision_mask" type="int" default="2147483647" />
+ <argument index="3" name="collision_mask" type="int" default="4294967295" />
<argument index="4" name="collide_with_bodies" type="bool" default="true" />
<argument index="5" name="collide_with_areas" type="bool" default="false" />
<description>
@@ -57,7 +57,7 @@
[code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data].
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
- Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
[b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected.
</description>
</method>
@@ -67,10 +67,18 @@
<argument index="1" name="canvas_instance_id" type="int" />
<argument index="2" name="max_results" type="int" default="32" />
<argument index="3" name="exclude" type="Array" default="[]" />
- <argument index="4" name="collision_mask" type="int" default="2147483647" />
+ <argument index="4" name="collision_mask" type="int" default="4294967295" />
<argument index="5" name="collide_with_bodies" type="bool" default="true" />
<argument index="6" name="collide_with_areas" type="bool" default="false" />
<description>
+ Checks whether a point is inside any solid shape, in a specific canvas layer given by [code]canvas_instance_id[/code]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
+ [code]collider[/code]: The colliding object.
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data].
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
+ [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected.
</description>
</method>
<method name="intersect_ray">
@@ -78,7 +86,7 @@
<argument index="0" name="from" type="Vector2" />
<argument index="1" name="to" type="Vector2" />
<argument index="2" name="exclude" type="Array" default="[]" />
- <argument index="3" name="collision_mask" type="int" default="2147483647" />
+ <argument index="3" name="collision_mask" type="int" default="4294967295" />
<argument index="4" name="collide_with_bodies" type="bool" default="true" />
<argument index="5" name="collide_with_areas" type="bool" default="false" />
<description>
@@ -91,7 +99,7 @@
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
If the ray did not intersect anything, then an empty dictionary is returned instead.
- Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
</description>
</method>
<method name="intersect_shape">
diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 13db50a2c7..360d6e8e92 100644
--- a/doc/classes/PhysicsDirectSpaceState3D.xml
+++ b/doc/classes/PhysicsDirectSpaceState3D.xml
@@ -47,7 +47,7 @@
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="to" type="Vector3" />
<argument index="2" name="exclude" type="Array" default="[]" />
- <argument index="3" name="collision_mask" type="int" default="2147483647" />
+ <argument index="3" name="collision_mask" type="int" default="4294967295" />
<argument index="4" name="collide_with_bodies" type="bool" default="true" />
<argument index="5" name="collide_with_areas" type="bool" default="false" />
<description>
@@ -59,7 +59,7 @@
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
If the ray did not intersect anything, then an empty dictionary is returned instead.
- Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively.
</description>
</method>
<method name="intersect_shape">
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 1df2fd0158..b3b7fcd956 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -373,7 +373,7 @@
</description>
</method>
<method name="body_get_param" qualifiers="const">
- <return type="float" />
+ <return type="Variant" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
<description>
@@ -449,6 +449,13 @@
Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.
</description>
</method>
+ <method name="body_reset_mass_properties">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param].
+ </description>
+ </method>
<method name="body_set_axis_velocity">
<return type="void" />
<argument index="0" name="body" type="RID" />
@@ -489,6 +496,9 @@
<argument index="2" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
+ The force integration function takes 2 arguments:
+ [code]state:[/code] [PhysicsDirectBodyState2D] used to retrieve and modify the body's state.
+ [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code].
</description>
</method>
<method name="body_set_max_contacts_reported">
@@ -519,7 +529,7 @@
<return type="void" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
- <argument index="2" name="value" type="float" />
+ <argument index="2" name="value" type="Variant" />
<description>
Sets a body parameter. See [enum BodyParameter] for a list of available parameters.
</description>
@@ -595,7 +605,8 @@
<argument index="2" name="motion" type="Vector2" />
<argument index="3" name="margin" type="float" default="0.08" />
<argument index="4" name="result" type="PhysicsTestMotionResult2D" default="null" />
- <argument index="5" name="exclude" type="Array" default="[]" />
+ <argument index="5" name="collide_separation_ray" type="bool" default="false" />
+ <argument index="6" name="exclude" type="Array" default="[]" />
<description>
Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in.
</description>
@@ -726,6 +737,11 @@
<description>
</description>
</method>
+ <method name="separation_ray_shape_create">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
<method name="set_active">
<return type="void" />
<argument index="0" name="active" type="bool" />
@@ -840,25 +856,28 @@
<constant name="SHAPE_WORLD_MARGIN" value="0" enum="ShapeType">
This is the constant for creating world margin shapes. A world margin shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks.
</constant>
- <constant name="SHAPE_SEGMENT" value="1" enum="ShapeType">
+ <constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType">
+ This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers.
+ </constant>
+ <constant name="SHAPE_SEGMENT" value="2" enum="ShapeType">
This is the constant for creating segment shapes. A segment shape is a [i]finite[/i] line from a point A to a point B. It can be checked for intersections.
</constant>
- <constant name="SHAPE_CIRCLE" value="2" enum="ShapeType">
+ <constant name="SHAPE_CIRCLE" value="3" enum="ShapeType">
This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks.
</constant>
- <constant name="SHAPE_RECTANGLE" value="3" enum="ShapeType">
+ <constant name="SHAPE_RECTANGLE" value="4" enum="ShapeType">
This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks.
</constant>
- <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType">
+ <constant name="SHAPE_CAPSULE" value="5" enum="ShapeType">
This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks.
</constant>
- <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType">
+ <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType">
This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the [member CollisionPolygon2D.polygon] property, polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon.
</constant>
- <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType">
+ <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType">
This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks.
</constant>
- <constant name="SHAPE_CUSTOM" value="7" enum="ShapeType">
+ <constant name="SHAPE_CUSTOM" value="8" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
<constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
@@ -901,7 +920,7 @@
This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</constant>
<constant name="BODY_MODE_STATIC" value="0" enum="BodyMode">
- Constant for static bodies. In this mode, a body can be only moved by user code.
+ Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved.
</constant>
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
@@ -924,16 +943,19 @@
<constant name="BODY_PARAM_INERTIA" value="3" enum="BodyParameter">
Constant to set/get a body's inertia.
</constant>
- <constant name="BODY_PARAM_GRAVITY_SCALE" value="4" enum="BodyParameter">
+ <constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter">
+ Constant to set/get a body's center of mass.
+ </constant>
+ <constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter">
Constant to set/get a body's gravity multiplier.
</constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="5" enum="BodyParameter">
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter">
Constant to set/get a body's linear dampening factor.
</constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="6" enum="BodyParameter">
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter">
Constant to set/get a body's angular dampening factor.
</constant>
- <constant name="BODY_PARAM_MAX" value="7" enum="BodyParameter">
+ <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter">
Represents the size of the [enum BodyParameter] enum.
</constant>
<constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState">
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 33eb0de698..2fbe84b8b1 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -347,7 +347,7 @@
</description>
</method>
<method name="body_get_param" qualifiers="const">
- <return type="float" />
+ <return type="Variant" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
<description>
@@ -430,6 +430,13 @@
Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.
</description>
</method>
+ <method name="body_reset_mass_properties">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param].
+ </description>
+ </method>
<method name="body_set_axis_lock">
<return type="void" />
<argument index="0" name="body" type="RID" />
@@ -478,6 +485,9 @@
<argument index="2" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
+ The force integration function takes 2 arguments:
+ [code]state:[/code] [PhysicsDirectBodyState3D] used to retrieve and modify the body's state.
+ [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code].
</description>
</method>
<method name="body_set_max_contacts_reported">
@@ -508,7 +518,7 @@
<return type="void" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
- <argument index="2" name="value" type="float" />
+ <argument index="2" name="value" type="Variant" />
<description>
Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants.
</description>
@@ -571,7 +581,8 @@
<argument index="2" name="motion" type="Vector3" />
<argument index="3" name="margin" type="float" default="0.001" />
<argument index="4" name="result" type="PhysicsTestMotionResult3D" default="null" />
- <argument index="5" name="exclude" type="Array" default="[]" />
+ <argument index="5" name="collide_separation_ray" type="bool" default="false" />
+ <argument index="6" name="exclude" type="Array" default="[]" />
<description>
Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult3D] can be passed to return additional information in.
</description>
@@ -849,6 +860,11 @@
<description>
</description>
</method>
+ <method name="separation_ray_shape_create">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
<method name="set_active">
<return type="void" />
<argument index="0" name="active" type="bool" />
@@ -1171,31 +1187,34 @@
<constant name="SHAPE_PLANE" value="0" enum="ShapeType">
The [Shape3D] is a [WorldMarginShape3D].
</constant>
- <constant name="SHAPE_SPHERE" value="1" enum="ShapeType">
+ <constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType">
+ The [Shape3D] is a [SeparationRayShape3D].
+ </constant>
+ <constant name="SHAPE_SPHERE" value="2" enum="ShapeType">
The [Shape3D] is a [SphereShape3D].
</constant>
- <constant name="SHAPE_BOX" value="2" enum="ShapeType">
+ <constant name="SHAPE_BOX" value="3" enum="ShapeType">
The [Shape3D] is a [BoxShape3D].
</constant>
- <constant name="SHAPE_CAPSULE" value="3" enum="ShapeType">
+ <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType">
The [Shape3D] is a [CapsuleShape3D].
</constant>
- <constant name="SHAPE_CYLINDER" value="4" enum="ShapeType">
+ <constant name="SHAPE_CYLINDER" value="5" enum="ShapeType">
The [Shape3D] is a [CylinderShape3D].
</constant>
- <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType">
+ <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType">
The [Shape3D] is a [ConvexPolygonShape3D].
</constant>
- <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType">
+ <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType">
The [Shape3D] is a [ConcavePolygonShape3D].
</constant>
- <constant name="SHAPE_HEIGHTMAP" value="7" enum="ShapeType">
+ <constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType">
The [Shape3D] is a [HeightMapShape3D].
</constant>
- <constant name="SHAPE_SOFT_BODY" value="8" enum="ShapeType">
+ <constant name="SHAPE_SOFT_BODY" value="9" enum="ShapeType">
The [Shape3D] is a [SoftBody3D].
</constant>
- <constant name="SHAPE_CUSTOM" value="9" enum="ShapeType">
+ <constant name="SHAPE_CUSTOM" value="10" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
<constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
@@ -1250,7 +1269,7 @@
This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</constant>
<constant name="BODY_MODE_STATIC" value="0" enum="BodyMode">
- Constant for static bodies. In this mode, a body can be only moved by user code.
+ Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved.
</constant>
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
@@ -1270,16 +1289,22 @@
<constant name="BODY_PARAM_MASS" value="2" enum="BodyParameter">
Constant to set/get a body's mass.
</constant>
- <constant name="BODY_PARAM_GRAVITY_SCALE" value="3" enum="BodyParameter">
+ <constant name="BODY_PARAM_INERTIA" value="3" enum="BodyParameter">
+ Constant to set/get a body's inertia.
+ </constant>
+ <constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter">
+ Constant to set/get a body's center of mass.
+ </constant>
+ <constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter">
Constant to set/get a body's gravity multiplier.
</constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="4" enum="BodyParameter">
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter">
Constant to set/get a body's linear dampening factor.
</constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="5" enum="BodyParameter">
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter">
Constant to set/get a body's angular dampening factor.
</constant>
- <constant name="BODY_PARAM_MAX" value="6" enum="BodyParameter">
+ <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter">
Represents the size of the [enum BodyParameter] enum.
</constant>
<constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState">
diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml
index 8b006c68e7..b54de15d15 100644
--- a/doc/classes/PhysicsShapeQueryParameters2D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters2D.xml
@@ -17,7 +17,7 @@
<member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
If [code]true[/code], the query will take [PhysicsBody2D]s into account.
</member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647">
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml
index de9b623591..f74d1b5e48 100644
--- a/doc/classes/PhysicsShapeQueryParameters3D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters3D.xml
@@ -17,7 +17,7 @@
<member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
If [code]true[/code], the query will take [PhysicsBody3D]s into account.
</member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647">
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 58c9d9e44b..21d974e233 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -625,19 +625,19 @@
</member>
<member name="input/ui_text_backspace_all_to_left" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_backspace_all_to_left.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_backspace_all_to_left.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_backspace_word" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_backspace_word.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_backspace_word.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_document_end.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_document_end.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_document_start" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_document_start.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_document_start.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_down" type="Dictionary" setter="" getter="">
</member>
@@ -645,11 +645,11 @@
</member>
<member name="input/ui_text_caret_line_end" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_line_end.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_line_end.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_line_start" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_line_start.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_line_start.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_page_down" type="Dictionary" setter="" getter="">
</member>
@@ -661,11 +661,11 @@
</member>
<member name="input/ui_text_caret_word_left" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_word_left.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_word_left.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_word_right" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_word_right.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_word_right.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_completion_accept" type="Dictionary" setter="" getter="">
</member>
@@ -679,11 +679,11 @@
</member>
<member name="input/ui_text_delete_all_to_right" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_delete_all_to_right.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_delete_all_to_right.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_delete_word" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_delete_word.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_delete_word.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_indent" type="Dictionary" setter="" getter="">
</member>
@@ -695,11 +695,11 @@
</member>
<member name="input/ui_text_scroll_down" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_scroll_down.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_scroll_down.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_scroll_up" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_scroll_up.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_scroll_up.osx" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_select_all" type="Dictionary" setter="" getter="">
</member>
@@ -726,7 +726,7 @@
<member name="input_devices/pen_tablet/driver" type="String" setter="" getter="">
Specifies the tablet driver to use. If left empty, the default driver will be used.
</member>
- <member name="input_devices/pen_tablet/driver.Windows" type="String" setter="" getter="">
+ <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter="">
Override for [member input_devices/pen_tablet/driver] on Windows.
</member>
<member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true">
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index db16552db3..0702955495 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RigidBody2D" inherits="PhysicsBody2D" version="4.0">
<brief_description>
- A body that is controlled by the 2D physics engine.
+ Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects.
</brief_description>
<description>
This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties.
@@ -99,6 +99,13 @@
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
</member>
+ <member name="center_of_mass" type="Vector2" setter="set_center_of_mass" getter="get_center_of_mass" default="Vector2(0, 0)">
+ The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration.
+ When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed.
+ </member>
+ <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidBody2D.CenterOfMassMode" default="0">
+ Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
+ </member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported].
</member>
@@ -116,8 +123,9 @@
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
Multiplies the gravity applied to the body. The body's gravity is calculated from the [b]Default Gravity[/b] value in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b] and/or any additional gravity vector applied by [Area2D]s.
</member>
- <member name="inertia" type="float" setter="set_inertia" getter="get_inertia">
- The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 inertia to return to automatically computing it.
+ <member name="inertia" type="float" setter="set_inertia" getter="get_inertia" default="0.0">
+ The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value.
+ If set to [code]0[/code], inertia is automatically computed (default value).
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0">
Damps the body's [member linear_velocity]. If [code]-1[/code], the body will use the [b]Default Linear Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b].
@@ -131,6 +139,7 @@
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody2D.Mode" default="0">
The body's mode. See [enum Mode] for possible values.
+ For a body that uses only Static or Kinematic mode, use [StaticBody2D] or [AnimatableBody2D] instead.
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
@@ -199,7 +208,13 @@
Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate.
</constant>
<constant name="MODE_KINEMATIC" value="3" enum="Mode">
- Kinematic body mode. The body behaves like a [StaticBody2D] with [member StaticBody2D.kinematic_motion] enabled, and must be moved by user code.
+ Kinematic body mode. The body behaves like a [AnimatableBody2D], and must be moved by code.
+ </constant>
+ <constant name="CENTER_OF_MASS_MODE_AUTO" value="0" enum="CenterOfMassMode">
+ In this mode, the body's center of mass is calculated automatically based on its shapes.
+ </constant>
+ <constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode">
+ In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position.
</constant>
<constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode">
Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml
index f4299335bf..1be35b0576 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RigidBody3D" inherits="PhysicsBody3D" version="4.0">
<brief_description>
- Physics Body whose position is determined through physics simulation in 3D space.
+ Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects.
</brief_description>
<description>
This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
@@ -102,6 +102,13 @@
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
</member>
+ <member name="center_of_mass" type="Vector3" setter="set_center_of_mass" getter="get_center_of_mass" default="Vector3(0, 0, 0)">
+ The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration.
+ When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed.
+ </member>
+ <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidBody3D.CenterOfMassMode" default="0">
+ Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
+ </member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. See also [member contacts_reported].
</member>
@@ -119,6 +126,10 @@
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
This is multiplied by the global 3D gravity setting found in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
</member>
+ <member name="inertia" type="Vector3" setter="set_inertia" getter="get_inertia" default="Vector3(0, 0, 0)">
+ The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value.
+ If set to [code]Vector3.ZERO[/code], inertia is automatically computed (default value).
+ </member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0">
The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden.
See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
@@ -130,7 +141,8 @@
The body's mass.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody3D.Mode" default="0">
- The body mode. See [enum Mode] for possible values.
+ The body's mode. See [enum Mode] for possible values.
+ For a body that uses only Static or Kinematic mode, use [StaticBody3D] or [AnimatableBody3D] instead.
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
@@ -201,7 +213,13 @@
Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate.
</constant>
<constant name="MODE_KINEMATIC" value="3" enum="Mode">
- Kinematic body mode. The body behaves like a [StaticBody3D] with [member StaticBody3D.kinematic_motion] enabled, and can only move by user code.
+ Kinematic body mode. The body behaves like a [AnimatableBody3D], and can only move by user code.
+ </constant>
+ <constant name="CENTER_OF_MASS_MODE_AUTO" value="0" enum="CenterOfMassMode">
+ In this mode, the body's center of mass is calculated automatically based on its shapes.
+ </constant>
+ <constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode">
+ In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position.
</constant>
</constants>
</class>
diff --git a/doc/classes/SeparationRayShape2D.xml b/doc/classes/SeparationRayShape2D.xml
new file mode 100644
index 0000000000..fb90606577
--- /dev/null
+++ b/doc/classes/SeparationRayShape2D.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SeparationRayShape2D" inherits="Shape2D" version="4.0">
+ <brief_description>
+ Separation ray shape for 2D collisions.
+ </brief_description>
+ <description>
+ Separation ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="length" type="float" setter="set_length" getter="get_length" default="20.0">
+ The ray's length.
+ </member>
+ <member name="slide_on_slope" type="bool" setter="set_slide_on_slope" getter="get_slide_on_slope" default="false">
+ If [code]false[/code] (default), the shape always separates and returns a normal along its own direction.
+ If [code]true[/code], the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SeparationRayShape3D.xml b/doc/classes/SeparationRayShape3D.xml
new file mode 100644
index 0000000000..ea57e4eb59
--- /dev/null
+++ b/doc/classes/SeparationRayShape3D.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SeparationRayShape3D" inherits="Shape3D" version="4.0">
+ <brief_description>
+ Separation ray shape for 3D collisions.
+ </brief_description>
+ <description>
+ Separation ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="length" type="float" setter="set_length" getter="get_length" default="1.0">
+ The ray's length.
+ </member>
+ <member name="slide_on_slope" type="bool" setter="set_slide_on_slope" getter="get_slide_on_slope" default="false">
+ If [code]false[/code] (default), the shape always separates and returns a normal along its own direction.
+ If [code]true[/code], the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 828d24338b..839193fb61 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Skeleton2D parents a hierarchy of [Bone2D] objects. It is a requirement of [Bone2D]. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones.
+ To setup different types of inverse kinematics for the given Skeleton2D, a [SkeletonModificationStack2D] should be created. They can be applied by creating the desired number of modifications, which can be done by increasing [member SkeletonModificationStack2D.modification_count].
</description>
<tutorials>
<link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link>
diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml
index ddfc14ceac..d5f0e3c95c 100644
--- a/doc/classes/SoftBody3D.xml
+++ b/doc/classes/SoftBody3D.xml
@@ -42,6 +42,20 @@
<description>
</description>
</method>
+ <method name="get_point_transform">
+ <return type="Vector3" />
+ <argument index="0" name="point_index" type="int" />
+ <description>
+ Returns local translation of a vertex in the surface array.
+ </description>
+ </method>
+ <method name="is_point_pinned" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="point_index" type="int" />
+ <description>
+ Returns [code]true[/code] if vertex is set to pinned.
+ </description>
+ </method>
<method name="remove_collision_exception_with">
<return type="void" />
<argument index="0" name="body" type="Node" />
@@ -65,6 +79,15 @@
Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
+ <method name="set_point_pinned">
+ <return type="void" />
+ <argument index="0" name="point_index" type="int" />
+ <argument index="1" name="pinned" type="bool" />
+ <argument index="2" name="attachment_path" type="NodePath" default="NodePath(&quot;&quot;)" />
+ <description>
+ Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [code]attachment_path[/code] can define a [Node3D] the pinned vertex will be attached to.
+ </description>
+ </method>
</methods>
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index 326bf58e22..0344c3e0d1 100644
--- a/doc/classes/StaticBody2D.xml
+++ b/doc/classes/StaticBody2D.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StaticBody2D" inherits="PhysicsBody2D" version="4.0">
<brief_description>
- Static body for 2D physics.
+ Physics body for 2D physics which is static or moves only by script. Useful for floor and walls.
</brief_description>
<description>
- Static body for 2D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], they don't consume any CPU resources as long as they don't move.
- They however have extra functionalities to move and affect other bodies:
- [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
- [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path.
- [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path.
+ Static body for 2D physics.
+ A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], it doesn't consume any CPU resources as long as they don't move.
+ They have extra functionalities to move and affect other bodies:
+ [b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path.
+ [b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels.
</description>
<tutorials>
</tutorials>
@@ -16,22 +16,15 @@
</methods>
<members>
<member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0">
- The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating.
+ The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating.
</member>
<member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2(0, 0)">
- The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving.
- </member>
- <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false">
- If [code]true[/code], the body will act the same as a [RigidBody2D] in [constant RigidBody2D.MODE_KINEMATIC] mode.
- When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving.
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
</member>
- <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
- If [code]true[/code] and [member kinematic_motion] is enabled, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody2D.move_and_collide].
- </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml
index 69c123002f..4cb51b60ec 100644
--- a/doc/classes/StaticBody3D.xml
+++ b/doc/classes/StaticBody3D.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StaticBody3D" inherits="PhysicsBody3D" version="4.0">
<brief_description>
- Static body for 3D physics.
+ Physics body for 3D physics which is static or moves only by script. Useful for floor and walls.
</brief_description>
<description>
- Static body for 3D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move.
- They however have extra functionalities to move and affect other bodies:
- [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
- [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path.
- [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path.
+ Static body for 3D physics.
+ A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], it doesn't consume any CPU resources as long as they don't move.
+ They have extra functionalities to move and affect other bodies:
+ [b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path.
+ [b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
@@ -19,22 +19,15 @@
</methods>
<members>
<member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3(0, 0, 0)">
- The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating.
+ The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating.
</member>
<member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3(0, 0, 0)">
- The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving.
- </member>
- <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false">
- If [code]true[/code], the body will act the same as a [RigidBody3D] in [constant RigidBody3D.MODE_KINEMATIC] mode.
- When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving.
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
</member>
- <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
- If [code]true[/code] and [member kinematic_motion] is enabled, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody3D.move_and_collide].
- </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index de9eb518c6..eb6c52d662 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -248,7 +248,7 @@
Returns [code]true[/code] if the length of the string equals [code]0[/code].
</description>
</method>
- <method name="is_rel_path" qualifiers="const">
+ <method name="is_relative_path" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the string is a path to a file or directory and its starting point is implicitly defined within the context it is being used. The starting point may refer to the current directory ([code]./[/code]), or the current [Node].
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index fbda005865..77bd7b1a0a 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -57,6 +57,13 @@
Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D].
</description>
</method>
+ <method name="get_tab_idx_at_point" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="point" type="Vector2" />
+ <description>
+ Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position.
+ </description>
+ </method>
<method name="get_tab_title" qualifiers="const">
<return type="String" />
<argument index="0" name="tab_idx" type="int" />
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index fb94e14c8d..aa35acdbd2 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -220,13 +220,13 @@
<method name="get_spacing_bottom" qualifiers="const">
<return type="int" />
<description>
- Returns extra spacing at the bottom of the line. See [member Font.extra_spacing_bottom].
+ Returns extra spacing at the bottom of the line. See [member Font.spacing_bottom].
</description>
</method>
<method name="get_spacing_top" qualifiers="const">
<return type="int" />
<description>
- Returns extra spacing at the top of the line. See [member Font.extra_spacing_top].
+ Returns extra spacing at the top of the line. See [member Font.spacing_top].
</description>
</method>
<method name="hit_test" qualifiers="const">
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index ac56be4392..d7af2204cf 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -9,42 +9,10 @@
<tutorials>
</tutorials>
<methods>
- <method name="create_font_bitmap">
+ <method name="create_font">
<return type="RID" />
- <argument index="0" name="height" type="float" />
- <argument index="1" name="ascent" type="float" />
- <argument index="2" name="base_size" type="int" />
<description>
- Creates new, empty bitmap font. To free the resulting font, use [method free_rid] method.
- </description>
- </method>
- <method name="create_font_memory">
- <return type="RID" />
- <argument index="0" name="data" type="PackedByteArray" />
- <argument index="1" name="type" type="String" />
- <argument index="2" name="base_size" type="int" default="16" />
- <description>
- Creates new font from the data in memory. To free the resulting font, use [method free_rid] method.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
- </description>
- </method>
- <method name="create_font_resource">
- <return type="RID" />
- <argument index="0" name="filename" type="String" />
- <argument index="1" name="base_size" type="int" default="16" />
- <description>
- Creates new font from the file. To free the resulting font, use [method free_rid] method.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
- </description>
- </method>
- <method name="create_font_system">
- <return type="RID" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="base_size" type="int" default="16" />
- <description>
- Creates new font from the system font. To free the resulting font, use [method free_rid] method.
- Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
+ Creates new, empty font cache entry resource. To free the resulting resourec, use [method free_rid] method.
</description>
</method>
<method name="create_shaped_text">
@@ -68,52 +36,53 @@
Draws box displaying character hexadecimal code. Used for replacing missing characters.
</description>
</method>
- <method name="font_bitmap_add_char">
+ <method name="font_clear_glyphs">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="char" type="int" />
- <argument index="2" name="texture_idx" type="int" />
- <argument index="3" name="rect" type="Rect2" />
- <argument index="4" name="align" type="Vector2" />
- <argument index="5" name="advance" type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance.
+ Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
</description>
</method>
- <method name="font_bitmap_add_kerning_pair">
+ <method name="font_clear_kerning_map">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="A" type="int" />
- <argument index="2" name="B" type="int" />
- <argument index="3" name="kerning" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
<description>
- Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ Removes all kerning overrides.
</description>
</method>
- <method name="font_bitmap_add_texture">
+ <method name="font_clear_size_cache">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="texture" type="Texture" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Removes all font sizes from the cache entry
+ </description>
+ </method>
+ <method name="font_clear_textures">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Adds a texture to the bitmap font.
+ Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually.
</description>
</method>
<method name="font_draw_glyph" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="font" type="RID" />
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="canvas" type="RID" />
<argument index="2" name="size" type="int" />
<argument index="3" name="pos" type="Vector2" />
<argument index="4" name="index" type="int" />
<argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
+ Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
</description>
</method>
<method name="font_draw_glyph_outline" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="font" type="RID" />
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="canvas" type="RID" />
<argument index="2" name="size" type="int" />
<argument index="3" name="outline_size" type="int" />
@@ -121,68 +90,46 @@
<argument index="5" name="index" type="int" />
<argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
+ Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
</description>
</method>
- <method name="font_get_antialiased" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="font" type="RID" />
- <description>
- Returns [code]true[/code], if font anti-aliasing is supported and enabled.
- </description>
- </method>
<method name="font_get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="size" type="int" />
<description>
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="font_get_base_size" qualifiers="const">
- <return type="float" />
- <argument index="0" name="font" type="RID" />
- <description>
- Returns the default size of the font.
- </description>
- </method>
<method name="font_get_descent" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="size" type="int" />
<description>
Returns the font descent (number of pixels below the baseline).
</description>
</method>
- <method name="font_get_distance_field_hint" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="font" type="RID" />
- <description>
- Returns [code]true[/code], if distance field hint is enabled.
- </description>
- </method>
- <method name="font_get_feature_list" qualifiers="const">
- <return type="Dictionary" />
- <argument index="0" name="font" type="RID" />
+ <method name="font_get_fixed_size" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns list of OpenType features supported by font.
+ Returns bitmap font fixed size.
</description>
</method>
- <method name="font_get_force_autohinter" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <method name="font_get_global_oversampling" qualifiers="const">
+ <return type="float" />
<description>
- Returns [code]true[/code], if autohinter is supported and enabled.
+ Returns the font oversampling factor, shared by all fonts in the TextServer.
</description>
</method>
<method name="font_get_glyph_advance" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="index" type="int" />
- <argument index="2" name="size" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns advance of the glyph.
+ Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
</description>
</method>
<method name="font_get_glyph_contours" qualifiers="const">
@@ -191,7 +138,7 @@
<argument index="1" name="size" type="int" />
<argument index="2" name="index" type="int" />
<description>
- Returns outline contours of the glyph in a Dictionary.
+ Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents:
[code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values.
[code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
[code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
@@ -199,41 +146,85 @@
</method>
<method name="font_get_glyph_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="char" type="int" />
- <argument index="2" name="variation_selector" type="int" default="0" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="char" type="int" />
+ <argument index="3" name="variation_selector" type="int" />
<description>
Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
</description>
</method>
- <method name="font_get_glyph_kerning" qualifiers="const">
+ <method name="font_get_glyph_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns list of rendered glyphs in the cache entry.
+ </description>
+ </method>
+ <method name="font_get_glyph_offset" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="index_a" type="int" />
- <argument index="2" name="index_b" type="int" />
- <argument index="3" name="size" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns a kerning of the pair of glyphs.
+ Returns glyph offset from the baseline.
</description>
</method>
- <method name="font_get_height" qualifiers="const">
- <return type="float" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="size" type="int" />
+ <method name="font_get_glyph_size" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns the total font height (ascent plus descent) in pixels.
+ Returns size of the glyph.
+ </description>
+ </method>
+ <method name="font_get_glyph_texture_idx" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="font_get_glyph_uv_rect" qualifiers="const">
+ <return type="Rect2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns rectangle in the cache texture containing the glyph.
</description>
</method>
<method name="font_get_hinting" qualifiers="const">
<return type="int" enum="TextServer.Hinting" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns the font hinting.
+ Returns the font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_get_kerning" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Returns kerning for the pair of glyphs.
+ </description>
+ </method>
+ <method name="font_get_kerning_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns list of the kerning overrides.
</description>
</method>
<method name="font_get_language_support_override">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<description>
Returns [code]true[/code] if support override is enabled for the [code]language[/code].
@@ -241,20 +232,43 @@
</method>
<method name="font_get_language_support_overrides">
<return type="PackedStringArray" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
Returns list of language support overrides.
</description>
</method>
+ <method name="font_get_msdf_pixel_range" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Return the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="font_get_msdf_size" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns source font size used to generate MSDF textures.
+ </description>
+ </method>
<method name="font_get_oversampling" qualifiers="const">
<return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns the font oversampling factor, shared by all fonts in the TextServer.
+ Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_get_scale" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns scaling factor of the color bitmap font.
</description>
</method>
<method name="font_get_script_support_override">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<description>
Returns [code]true[/code] if support override is enabled for the [code]script[/code].
@@ -262,98 +276,149 @@
</method>
<method name="font_get_script_support_overrides">
<return type="PackedStringArray" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
Returns list of script support overrides.
</description>
</method>
- <method name="font_get_spacing_glyph" qualifiers="const">
- <return type="int" />
- <argument index="0" name="font" type="RID" />
+ <method name="font_get_size_cache_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns extra spacing for each glyph in pixels.
+ Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
- <method name="font_get_spacing_space" qualifiers="const">
+ <method name="font_get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
<description>
- Sets extra spacing for each glyph in pixels.
+ Returns extra spacing added between glyphs in pixels.
</description>
</method>
<method name="font_get_supported_chars" qualifiers="const">
<return type="String" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
Returns a string containing all the characters available in the font.
</description>
</method>
- <method name="font_get_underline_position" qualifiers="const">
- <return type="float" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="size" type="int" />
+ <method name="font_get_texture_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Returns underline offset (number of pixels below the baseline).
+ Returns number of textures used by font cache entry.
</description>
</method>
- <method name="font_get_underline_thickness" qualifiers="const">
+ <method name="font_get_texture_image" qualifiers="const">
+ <return type="Image" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns font cache texture image data.
+ </description>
+ </method>
+ <method name="font_get_texture_offsets" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="font_get_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="size" type="int" />
<description>
- Returns underline thickness in pixels.
+ Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="font_get_variation" qualifiers="const">
+ <method name="font_get_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="tag" type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns variation coordinate [code]tag[/code].
+ Returns thickness of the underline in pixels.
</description>
</method>
- <method name="font_get_variation_list" qualifiers="const">
+ <method name="font_get_variation_coordinates" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
- Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
<method name="font_has_char" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="char" type="int" />
<description>
- Returns [code]true[/code] if [code]char[/code] is available in the font.
+ Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
- <method name="font_has_outline" qualifiers="const">
+ <method name="font_is_antialiased" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
+ </description>
+ </method>
+ <method name="font_is_force_autohinter" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code], if font supports glyph outlines.
+ Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="font_is_language_supported" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<description>
- Returns [code]true[/code], if font supports given language (ISO 639 code).
+ Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
+ </description>
+ </method>
+ <method name="font_is_multichannel_signed_distance_field" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
</description>
</method>
<method name="font_is_script_supported" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<description>
Returns [code]true[/code], if font supports given script (ISO 15924 code).
</description>
</method>
+ <method name="font_remove_glyph">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
+ </description>
+ </method>
+ <method name="font_remove_kerning">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Removes kerning override for the pair of glyphs.
+ </description>
+ </method>
<method name="font_remove_language_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<description>
Remove language support override.
@@ -361,92 +426,299 @@
</method>
<method name="font_remove_script_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<description>
Removes script support override.
</description>
</method>
+ <method name="font_remove_size_cache">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes specified font size from the cache entry.
+ </description>
+ </method>
+ <method name="font_remove_texture">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph].
+ </description>
+ </method>
+ <method name="font_render_glyph">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="index" type="int" />
+ <description>
+ Renders specified glyph the the font cache texture.
+ </description>
+ </method>
+ <method name="font_render_range">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="start" type="int" />
+ <argument index="3" name="end" type="int" />
+ <description>
+ Renders the range of characters to the font cache texture.
+ </description>
+ </method>
<method name="font_set_antialiased">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="antialiased" type="bool" />
<description>
- Sets font anti-aliasing.
+ If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
</description>
</method>
- <method name="font_set_distance_field_hint">
+ <method name="font_set_ascent">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="distance_field" type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="ascent" type="float" />
+ <description>
+ Sets the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="font_set_data">
+ <return type="void" />
+ <argument index="0" name="data" type="RID" />
+ <argument index="1" name="arg1" type="PackedByteArray" />
<description>
- Sets font distance field hint.
+ Sets font source data, e.g contents of the dynamic font source file.
+ </description>
+ </method>
+ <method name="font_set_descent">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="descent" type="float" />
+ <description>
+ Sets the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="font_set_fixed_size">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="fixed_size" type="int" />
+ <description>
+ Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
</description>
</method>
<method name="font_set_force_autohinter">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="enabeld" type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="force_autohinter" type="bool" />
+ <description>
+ If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ </description>
+ </method>
+ <method name="font_set_global_oversampling">
+ <return type="void" />
+ <argument index="0" name="oversampling" type="float" />
+ <description>
+ Sets oversampling factor, shared by all font in the TextServer.
+ Note: This value can be automaticaly changed by display server.
+ </description>
+ </method>
+ <method name="font_set_glyph_advance">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="advance" type="Vector2" />
+ <description>
+ Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
+ </description>
+ </method>
+ <method name="font_set_glyph_offset">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="offset" type="Vector2" />
+ <description>
+ Sets glyph offset from the baseline.
+ </description>
+ </method>
+ <method name="font_set_glyph_size">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="gl_size" type="Vector2" />
<description>
- Enables/disables default autohinter.
+ Sets size of the glyph.
+ </description>
+ </method>
+ <method name="font_set_glyph_texture_idx">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="texture_idx" type="int" />
+ <description>
+ Sets index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="font_set_glyph_uv_rect">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="uv_rect" type="Rect2" />
+ <description>
+ Sets rectangle in the cache texture containing the glyph.
</description>
</method>
<method name="font_set_hinting">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="hinting" type="int" enum="TextServer.Hinting" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="_hinting" type="int" enum="TextServer.Hinting" />
<description>
- Sets font hinting.
+ Sets font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_set_kerning">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <argument index="3" name="kerning" type="Vector2" />
+ <description>
+ Sets kerning for the pair of glyphs.
</description>
</method>
<method name="font_set_language_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<argument index="2" name="supported" type="bool" />
<description>
Adds override for [method font_is_language_supported].
</description>
</method>
+ <method name="font_set_msdf_pixel_range">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf_pixel_range" type="int" />
+ <description>
+ Sets the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="font_set_msdf_size">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf_size" type="int" />
+ <description>
+ Sets source font size used to generate MSDF textures.
+ </description>
+ </method>
+ <method name="font_set_multichannel_signed_distance_field">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf" type="bool" />
+ <description>
+ If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
+ </description>
+ </method>
<method name="font_set_oversampling">
<return type="void" />
- <argument index="0" name="oversampling" type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="oversampling" type="float" />
<description>
- Sets oversampling factor, shared by all font in the TextServer.
+ Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_set_scale">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="scale" type="float" />
+ <description>
+ Sets scaling factor of the color bitmap font.
</description>
</method>
<method name="font_set_script_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<argument index="2" name="supported" type="bool" />
<description>
Adds override for [method font_is_script_supported].
</description>
</method>
- <method name="font_set_spacing_glyph">
+ <method name="font_set_spacing">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="3" name="value" type="int" />
<description>
- Returns extra spacing for the space character in pixels.
+ Sets extra spacing added between glyphs in pixels.
</description>
</method>
- <method name="font_set_spacing_space">
+ <method name="font_set_texture_image">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="image" type="Image" />
<description>
- Sets extra spacing for the space character in pixels.
+ Sets font cache texture image data.
</description>
</method>
- <method name="font_set_variation">
+ <method name="font_set_texture_offsets">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="offset" type="PackedInt32Array" />
+ <description>
+ Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="font_set_underline_position">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_position" type="float" />
+ <description>
+ Sets pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="font_set_underline_thickness">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_thickness" type="float" />
+ <description>
+ Sets thickness of the underline in pixels.
+ </description>
+ </method>
+ <method name="font_set_variation_coordinates">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="variation_coordinates" type="Dictionary" />
+ <description>
+ Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
+ </description>
+ </method>
+ <method name="font_supported_feature_list" qualifiers="const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="font_supported_variation_list" qualifiers="const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Sets variation coordinate [code]name[/code]. Unsupported coordinates will be silently ignored.
</description>
</method>
<method name="format_number" qualifiers="const">
@@ -478,13 +750,6 @@
Returns the name of the server interface.
</description>
</method>
- <method name="get_system_fonts" qualifiers="const">
- <return type="PackedStringArray" />
- <description>
- Returns list of available system fonts.
- Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature.
- </description>
- </method>
<method name="has">
<return type="bool" />
<argument index="0" name="rid" type="RID" />
@@ -514,7 +779,7 @@
Note: This function should be called before any other TextServer functions used, otherwise it won't have any effect.
</description>
</method>
- <method name="name_to_tag">
+ <method name="name_to_tag" qualifiers="const">
<return type="int" />
<argument index="0" name="name" type="String" />
<description>
@@ -890,7 +1155,7 @@
Aligns shaped text to the given tab-stops.
</description>
</method>
- <method name="tag_to_name">
+ <method name="tag_to_name" qualifiers="const">
<return type="String" />
<argument index="0" name="tag" type="int" />
<description>
@@ -1023,5 +1288,17 @@
<constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag">
Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
</constant>
+ <constant name="SPACING_GLYPH" value="0" enum="SpacingType">
+ Spacing for each glyph.
+ </constant>
+ <constant name="SPACING_SPACE" value="1" enum="SpacingType">
+ Spacing for the space character.
+ </constant>
+ <constant name="SPACING_TOP" value="2" enum="SpacingType">
+ Spacing at the top of the line.
+ </constant>
+ <constant name="SPACING_BOTTOM" value="3" enum="SpacingType">
+ Spacing at the bottom of the line.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index 9da89ebe43..ee47557b39 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -60,6 +60,9 @@
[Texture2D] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code].
The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value].
</member>
+ <member name="texture_progress_offset" type="Vector2" setter="set_texture_progress_offset" getter="get_texture_progress_offset" default="Vector2(0, 0)">
+ The offset of [member texture_progress]. Useful for [member texture_over] and [member texture_under] with fancy borders, to avoid transparent margins in your progress texture.
+ </member>
<member name="texture_under" type="Texture2D" setter="set_under_texture" getter="get_under_texture">
[Texture2D] that draws under the progress bar. The bar's background.
</member>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index f3c64c3c7d..e92a7331e6 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -17,6 +17,12 @@
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
+ <method name="add_layer">
+ <return type="void" />
+ <argument index="0" name="arg0" type="int" />
+ <description>
+ </description>
+ </method>
<method name="clear">
<return type="void" />
<description>
@@ -71,6 +77,11 @@
<description>
</description>
</method>
+ <method name="get_layers_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_neighbor_cell" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="coords" type="Vector2i" />
@@ -116,6 +127,19 @@
Returns the local position corresponding to the given tilemap (grid-based) coordinates.
</description>
</method>
+ <method name="move_layer">
+ <return type="void" />
+ <argument index="0" name="arg0" type="int" />
+ <argument index="1" name="arg1" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="remove_layer">
+ <return type="void" />
+ <argument index="0" name="arg0" type="int" />
+ <description>
+ </description>
+ </method>
<method name="set_cell">
<return type="void" />
<argument index="0" name="layer" type="int" />
@@ -176,8 +200,6 @@
</member>
<member name="collision_visibility_mode" type="int" setter="set_collision_visibility_mode" getter="get_collision_visibility_mode" enum="TileMap.VisibilityMode" default="0">
</member>
- <member name="layers_count" type="int" setter="set_layers_count" getter="get_layers_count" default="1">
- </member>
<member name="navigation_visibility_mode" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0">
</member>
<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset">
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 439c6e3830..3e0ab87383 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -17,6 +17,30 @@
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
+ <method name="add_custom_data_layer">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ </description>
+ </method>
+ <method name="add_navigation_layer">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ </description>
+ </method>
+ <method name="add_occlusion_layer">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ </description>
+ </method>
+ <method name="add_physics_layer">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ </description>
+ </method>
<method name="add_source">
<return type="int" />
<argument index="0" name="atlas_source_id_override" type="TileSetSource" />
@@ -24,6 +48,19 @@
<description>
</description>
</method>
+ <method name="add_terrain">
+ <return type="void" />
+ <argument index="0" name="terrain_set" type="int" />
+ <argument index="1" name="to_position" type="int" default="-1" />
+ <description>
+ </description>
+ </method>
+ <method name="add_terrain_set">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ </description>
+ </method>
<method name="cleanup_invalid_tile_proxies">
<return type="void" />
<description>
@@ -49,12 +86,22 @@
<description>
</description>
</method>
+ <method name="get_custom_data_layers_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_navigation_layer_layers" qualifiers="const">
<return type="int" />
<argument index="0" name="layer_index" type="int" />
<description>
</description>
</method>
+ <method name="get_navigation_layers_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_next_source_id" qualifiers="const">
<return type="int" />
<description>
@@ -72,6 +119,11 @@
<description>
</description>
</method>
+ <method name="get_occlusion_layers_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_physics_layer_collision_layer" qualifiers="const">
<return type="int" />
<argument index="0" name="layer_index" type="int" />
@@ -90,6 +142,11 @@
<description>
</description>
</method>
+ <method name="get_physics_layers_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_source" qualifiers="const">
<return type="TileSetSource" />
<argument index="0" name="index" type="int" />
@@ -133,6 +190,11 @@
<description>
</description>
</method>
+ <method name="get_terrain_sets_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_terrains_count" qualifiers="const">
<return type="int" />
<argument index="0" name="terrain_set" type="int" />
@@ -174,6 +236,49 @@
<description>
</description>
</method>
+ <method name="move_custom_data_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="move_navigation_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="move_occlusion_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="move_physics_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="move_terrain">
+ <return type="void" />
+ <argument index="0" name="terrain_set" type="int" />
+ <argument index="1" name="terrain_index" type="int" />
+ <argument index="2" name="to_position" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="move_terrain_set">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ </description>
+ </method>
<method name="remove_alternative_level_tile_proxy">
<return type="void" />
<argument index="0" name="source_from" type="int" />
@@ -189,6 +294,30 @@
<description>
</description>
</method>
+ <method name="remove_custom_data_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="remove_navigation_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="remove_occlusion_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="remove_physics_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ </description>
+ </method>
<method name="remove_source">
<return type="void" />
<argument index="0" name="source_id" type="int" />
@@ -201,6 +330,19 @@
<description>
</description>
</method>
+ <method name="remove_terrain">
+ <return type="void" />
+ <argument index="0" name="terrain_set" type="int" />
+ <argument index="1" name="terrain_index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="remove_terrain_set">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ </description>
+ </method>
<method name="set_alternative_level_tile_proxy">
<return type="void" />
<argument index="0" name="source_from" type="int" />
@@ -300,25 +442,8 @@
<description>
</description>
</method>
- <method name="set_terrains_count">
- <return type="void" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="terrains_count" type="int" />
- <description>
- </description>
- </method>
</methods>
<members>
- <member name="custom_data_layers_count" type="int" setter="set_custom_data_layers_count" getter="get_custom_data_layers_count" default="0">
- </member>
- <member name="navigation_layers_count" type="int" setter="set_navigation_layers_count" getter="get_navigation_layers_count" default="0">
- </member>
- <member name="occlusion_layers_count" type="int" setter="set_occlusion_layers_count" getter="get_occlusion_layers_count" default="0">
- </member>
- <member name="physics_layers_count" type="int" setter="set_physics_layers_count" getter="get_physics_layers_count" default="0">
- </member>
- <member name="terrains_sets_count" type="int" setter="set_terrain_sets_count" getter="get_terrain_sets_count" default="0">
- </member>
<member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0">
</member>
<member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0">
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 406c074758..b997d87ac0 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -140,6 +140,14 @@
<return type="Font" />
<argument index="0" name="column" type="int" />
<description>
+ Returns custom font used to draw text in the column [code]column[/code].
+ </description>
+ </method>
+ <method name="get_custom_font_size" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="column" type="int" />
+ <description>
+ Returns custom font size used to draw text in the column [code]column[/code].
</description>
</method>
<method name="get_expand_right" qualifiers="const">
@@ -464,6 +472,15 @@
<argument index="0" name="column" type="int" />
<argument index="1" name="font" type="Font" />
<description>
+ Sets custom font used to draw text in the column [code]column[/code].
+ </description>
+ </method>
+ <method name="set_custom_font_size">
+ <return type="void" />
+ <argument index="0" name="column" type="int" />
+ <argument index="1" name="font_size" type="int" />
+ <description>
+ Sets custom font size used to draw text in the column [code]column[/code].
</description>
</method>
<method name="set_editable">
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index cb5662419e..ab4d0e181a 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -155,6 +155,18 @@
Returns the vector with all components rounded down (towards negative infinity).
</description>
</method>
+ <method name="from_angle" qualifiers="static">
+ <return type="Vector2" />
+ <argument index="0" name="angle" type="float" />
+ <description>
+ Creates a unit [Vector2] rotated to the given [code]angle[/code] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code].
+ [codeblock]
+ print(Vector2.from_angle(0)) # Prints (1, 0).
+ print(Vector2(1, 0).angle()) # Prints 0, which is the angle used above.
+ print(Vector2.from_angle(PI / 2)) # Prints (0, 1).
+ [/codeblock]
+ </description>
+ </method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
<argument index="0" name="to" type="Vector2" />
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 1fb73e59b4..2a740ab1e8 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="XRInterface" inherits="RefCounted" version="4.0">
<brief_description>
- Base class for an AR/VR interface implementation.
+ Base class for an XR interface implementation.
</brief_description>
<description>
This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass XRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform.
@@ -26,17 +26,17 @@
<method name="get_name" qualifiers="const">
<return type="StringName" />
<description>
- Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc).
+ Returns the name of this interface (OpenXR, OpenVR, OpenHMD, ARKit, etc).
</description>
</method>
- <method name="get_render_targetsize">
+ <method name="get_render_target_size">
<return type="Vector2" />
<description>
Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.
</description>
</method>
<method name="get_tracking_status" qualifiers="const">
- <return type="int" enum="XRInterface.Tracking_status" />
+ <return type="int" enum="XRInterface.TrackingStatus" />
<description>
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
</description>
@@ -52,11 +52,17 @@
<description>
Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
- [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR.
+ [b]Note:[/b] You must enable the XR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR.
If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different.
While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.
</description>
</method>
+ <method name="is_initialized" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Is [code]true[/code] if this interface has been initialised.
+ </description>
+ </method>
<method name="uninitialize">
<return type="void" />
<description>
@@ -68,10 +74,7 @@
<member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false">
On an AR interface, [code]true[/code] if anchor detection is enabled.
</member>
- <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false">
- [code]true[/code] if this interface been initialized.
- </member>
- <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false">
+ <member name="interface_is_primary" type="bool" setter="set_primary" getter="is_primary" default="false">
[code]true[/code] if this is the primary interface.
</member>
</members>
@@ -89,7 +92,7 @@
This interface supports AR (video background and real world tracking).
</constant>
<constant name="XR_EXTERNAL" value="8" enum="Capabilities">
- This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes.
+ This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_target_size]). Using a separate viewport node frees up the main viewport for other purposes.
</constant>
<constant name="EYE_MONO" value="0" enum="Eyes">
Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
@@ -100,19 +103,19 @@
<constant name="EYE_RIGHT" value="2" enum="Eyes">
Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information.
</constant>
- <constant name="XR_NORMAL_TRACKING" value="0" enum="Tracking_status">
+ <constant name="XR_NORMAL_TRACKING" value="0" enum="TrackingStatus">
Tracking is behaving as expected.
</constant>
- <constant name="XR_EXCESSIVE_MOTION" value="1" enum="Tracking_status">
+ <constant name="XR_EXCESSIVE_MOTION" value="1" enum="TrackingStatus">
Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up).
</constant>
- <constant name="XR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status">
+ <constant name="XR_INSUFFICIENT_FEATURES" value="2" enum="TrackingStatus">
Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc.
</constant>
- <constant name="XR_UNKNOWN_TRACKING" value="3" enum="Tracking_status">
+ <constant name="XR_UNKNOWN_TRACKING" value="3" enum="TrackingStatus">
We don't know the status of the tracking or this interface does not provide feedback.
</constant>
- <constant name="XR_NOT_TRACKING" value="4" enum="Tracking_status">
+ <constant name="XR_NOT_TRACKING" value="4" enum="TrackingStatus">
Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.).
</constant>
</constants>
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
new file mode 100644
index 0000000000..66440d4bb4
--- /dev/null
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XRInterfaceExtension" inherits="XRInterface" version="4.0">
+ <brief_description>
+ Base class for XR interface extensions (plugins).
+ </brief_description>
+ <description>
+ External XR interface plugins should inherit from this class.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_commit_views" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="render_target" type="RID" />
+ <argument index="1" name="screen_rect" type="Rect2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_anchor_detection_is_enabled" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_camera_feed_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_camera_transform" qualifiers="virtual">
+ <return type="Transform3D" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_capabilities" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_name" qualifiers="virtual const">
+ <return type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_projection_for_view" qualifiers="virtual">
+ <return type="PackedFloat64Array" />
+ <argument index="0" name="view" type="int" />
+ <argument index="1" name="aspect" type="float" />
+ <argument index="2" name="z_near" type="float" />
+ <argument index="3" name="z_far" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_render_target_size" qualifiers="virtual">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_tracking_status" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_transform_for_view" qualifiers="virtual">
+ <return type="Transform3D" />
+ <argument index="0" name="view" type="int" />
+ <argument index="1" name="cam_transform" type="Transform3D" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_view_count" qualifiers="virtual">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_initialize" qualifiers="virtual">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_initialized" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_notification" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="what" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_process" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_anchor_detection_is_enabled" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="enabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_uninitialize" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="add_blit">
+ <return type="void" />
+ <argument index="0" name="render_target" type="RID" />
+ <argument index="1" name="src_rect" type="Rect2" />
+ <argument index="2" name="dst_rect" type="Rect2i" />
+ <argument index="3" name="use_layer" type="bool" />
+ <argument index="4" name="layer" type="int" />
+ <argument index="5" name="apply_lens_distortion" type="bool" />
+ <argument index="6" name="eye_center" type="Vector2" />
+ <argument index="7" name="k1" type="float" />
+ <argument index="8" name="k2" type="float" />
+ <argument index="9" name="upscale" type="float" />
+ <argument index="10" name="aspect_ratio" type="float" />
+ <description>
+ Blits our render results to screen optionally applying lens distortion. This can only be called while processing [code]_commit_views[/code].
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 5dd9b75ad2..85170804cc 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -37,13 +37,6 @@
You should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.
</description>
</method>
- <method name="clear_primary_interface_if">
- <return type="void" />
- <argument index="0" name="interface" type="XRInterface" />
- <description>
- Clears our current primary interface if it is set to the provided interface.
- </description>
- </method>
<method name="find_interface" qualifiers="const">
<return type="XRInterface" />
<argument index="0" name="name" type="String" />
diff --git a/doc/translations/ar.po b/doc/translations/ar.po
index 4199bca6c7..b06b6f013e 100644
--- a/doc/translations/ar.po
+++ b/doc/translations/ar.po
@@ -9896,7 +9896,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33047,8 +33047,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ca.po b/doc/translations/ca.po
index c72cba18bc..8b1b10a7db 100644
--- a/doc/translations/ca.po
+++ b/doc/translations/ca.po
@@ -9927,7 +9927,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33078,8 +33078,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot
index 321e67f759..375a9e850c 100644
--- a/doc/translations/classes.pot
+++ b/doc/translations/classes.pot
@@ -9897,7 +9897,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33048,8 +33048,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/cs.po b/doc/translations/cs.po
index 3584fc5062..d6d7025d92 100644
--- a/doc/translations/cs.po
+++ b/doc/translations/cs.po
@@ -10389,7 +10389,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33547,8 +33547,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/de.po b/doc/translations/de.po
index 76eff809ff..83eabb14fe 100644
--- a/doc/translations/de.po
+++ b/doc/translations/de.po
@@ -10211,7 +10211,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33464,8 +33464,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/es.po b/doc/translations/es.po
index 44b3b22597..1426b57e30 100644
--- a/doc/translations/es.po
+++ b/doc/translations/es.po
@@ -12986,7 +12986,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
"Convierte un valor [String] a un valor booleano, este método devolverá "
@@ -44845,8 +44845,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
@@ -44878,8 +44878,8 @@ msgstr ""
"usando [code]in[/code]:\n"
"[codeblock]\n"
"var nodo = Node2D.new()\n"
-"print(\"position\" in nodo) # Imprime \"True\".\n"
-"print(\"otra_propiedad\" in nodo) # Imprime \"False\".\n"
+"print(\"position\" in nodo) # Imprime \"true\".\n"
+"print(\"otra_propiedad\" in nodo) # Imprime \"false\".\n"
"[/codeblock]\n"
"El operador [code]in[/code] evaluará a [code]true[/code] siempre que la "
"clave exista, incluso si el valor es [code]null[/code].\n"
diff --git a/doc/translations/fa.po b/doc/translations/fa.po
index 2a185fadc5..7455b828de 100644
--- a/doc/translations/fa.po
+++ b/doc/translations/fa.po
@@ -9902,7 +9902,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33053,8 +33053,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/fi.po b/doc/translations/fi.po
index a5f470c60b..94cda2b9d9 100644
--- a/doc/translations/fi.po
+++ b/doc/translations/fi.po
@@ -9915,7 +9915,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33066,8 +33066,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/fr.po b/doc/translations/fr.po
index 2d9b1db565..e0aef69af3 100644
--- a/doc/translations/fr.po
+++ b/doc/translations/fr.po
@@ -10233,7 +10233,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33414,8 +33414,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/id.po b/doc/translations/id.po
index cd841fc553..fa90969628 100644
--- a/doc/translations/id.po
+++ b/doc/translations/id.po
@@ -9928,7 +9928,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33079,8 +33079,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/it.po b/doc/translations/it.po
index aa085f6158..d8b888535f 100644
--- a/doc/translations/it.po
+++ b/doc/translations/it.po
@@ -10186,7 +10186,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33345,8 +33345,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ja.po b/doc/translations/ja.po
index ee900d58c2..fea270ad95 100644
--- a/doc/translations/ja.po
+++ b/doc/translations/ja.po
@@ -11116,7 +11116,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -34317,8 +34317,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ko.po b/doc/translations/ko.po
index 60416fb63c..0dce30d48f 100644
--- a/doc/translations/ko.po
+++ b/doc/translations/ko.po
@@ -9904,7 +9904,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33055,8 +33055,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/nl.po b/doc/translations/nl.po
index c0dc01c653..e409bd00b4 100644
--- a/doc/translations/nl.po
+++ b/doc/translations/nl.po
@@ -9930,7 +9930,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33081,8 +33081,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/pl.po b/doc/translations/pl.po
index 2664f263cb..06f09dcf81 100644
--- a/doc/translations/pl.po
+++ b/doc/translations/pl.po
@@ -9948,7 +9948,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33100,8 +33100,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po
index f86bed9585..28ee6b7668 100644
--- a/doc/translations/pt_BR.po
+++ b/doc/translations/pt_BR.po
@@ -9943,7 +9943,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33094,8 +33094,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ro.po b/doc/translations/ro.po
index b25c3911cc..8cabaeebe1 100644
--- a/doc/translations/ro.po
+++ b/doc/translations/ro.po
@@ -9904,7 +9904,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33055,8 +33055,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ru.po b/doc/translations/ru.po
index cf5289d7f9..e515ff50ff 100644
--- a/doc/translations/ru.po
+++ b/doc/translations/ru.po
@@ -10409,7 +10409,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33592,8 +33592,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po
index 06399d5e87..655a4a825c 100644
--- a/doc/translations/sr_Cyrl.po
+++ b/doc/translations/sr_Cyrl.po
@@ -9914,7 +9914,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33065,8 +33065,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/th.po b/doc/translations/th.po
index cdf1c6d7e2..7f3ef3a1e2 100644
--- a/doc/translations/th.po
+++ b/doc/translations/th.po
@@ -9920,7 +9920,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33071,8 +33071,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/tr.po b/doc/translations/tr.po
index 646a3fb5b3..d102161901 100644
--- a/doc/translations/tr.po
+++ b/doc/translations/tr.po
@@ -9896,7 +9896,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33047,8 +33047,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/uk.po b/doc/translations/uk.po
index c2232d81ab..42daf9cd30 100644
--- a/doc/translations/uk.po
+++ b/doc/translations/uk.po
@@ -9982,7 +9982,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33133,8 +33133,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/zh_Hans.po b/doc/translations/zh_Hans.po
index 40d1eb68bc..312fbd37c0 100644
--- a/doc/translations/zh_Hans.po
+++ b/doc/translations/zh_Hans.po
@@ -10129,7 +10129,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33283,8 +33283,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/zh_Hant.po b/doc/translations/zh_Hant.po
index 13515dff67..09d52a63c7 100644
--- a/doc/translations/zh_Hant.po
+++ b/doc/translations/zh_Hant.po
@@ -9933,7 +9933,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33084,8 +33084,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"