summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AcceptDialog.xml2
-rw-r--r--doc/classes/Animation.xml83
-rw-r--r--doc/classes/AnimationTree.xml4
-rw-r--r--doc/classes/Area2D.xml40
-rw-r--r--doc/classes/Area3D.xml40
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml2
-rw-r--r--doc/classes/Basis.xml28
-rw-r--r--doc/classes/CanvasItem.xml6
-rw-r--r--doc/classes/CharFXTransform.xml2
-rw-r--r--doc/classes/ColorPickerButton.xml2
-rw-r--r--doc/classes/ConfirmationDialog.xml1
-rw-r--r--doc/classes/Control.xml8
-rw-r--r--doc/classes/DirectionalLight2D.xml2
-rw-r--r--doc/classes/DirectionalLight3D.xml12
-rw-r--r--doc/classes/DisplayServer.xml17
-rw-r--r--doc/classes/EditorDebuggerPlugin.xml7
-rw-r--r--doc/classes/EditorExportPlugin.xml3
-rw-r--r--doc/classes/EditorFileDialog.xml1
-rw-r--r--doc/classes/EditorImportPlugin.xml7
-rw-r--r--doc/classes/EditorInspectorPlugin.xml4
-rw-r--r--doc/classes/EditorInterface.xml6
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml3
-rw-r--r--doc/classes/EditorPlugin.xml29
-rw-r--r--doc/classes/EditorProperty.xml4
-rw-r--r--doc/classes/EditorSceneFormatImporter.xml (renamed from doc/classes/EditorSceneImporter.xml)4
-rw-r--r--doc/classes/EditorSceneFormatImporterFBX.xml32
-rw-r--r--doc/classes/EditorSceneFormatImporterGLTF.xml9
-rw-r--r--doc/classes/EditorScenePostImportPlugin.xml116
-rw-r--r--doc/classes/EditorTranslationParserPlugin.xml3
-rw-r--r--doc/classes/Environment.xml2
-rw-r--r--doc/classes/FileDialog.xml2
-rw-r--r--doc/classes/Font.xml25
-rw-r--r--doc/classes/GraphEdit.xml4
-rw-r--r--doc/classes/Input.xml39
-rw-r--r--doc/classes/ItemList.xml1
-rw-r--r--doc/classes/Light3D.xml2
-rw-r--r--doc/classes/LineEdit.xml5
-rw-r--r--doc/classes/MenuButton.xml1
-rw-r--r--doc/classes/MeshInstance3D.xml24
-rw-r--r--doc/classes/NavigationMesh.xml2
-rw-r--r--doc/classes/Node3D.xml32
-rw-r--r--doc/classes/OS.xml4
-rw-r--r--doc/classes/OptionButton.xml1
-rw-r--r--doc/classes/Plane.xml15
-rw-r--r--doc/classes/PointLight2D.xml2
-rw-r--r--doc/classes/ProjectSettings.xml29
-rw-r--r--doc/classes/Quaternion.xml13
-rw-r--r--doc/classes/RenderingServer.xml19
-rw-r--r--doc/classes/RichTextLabel.xml9
-rw-r--r--doc/classes/RigidDynamicBody2D.xml20
-rw-r--r--doc/classes/RigidDynamicBody3D.xml20
-rw-r--r--doc/classes/SceneTree.xml2
-rw-r--r--doc/classes/SceneTreeTimer.xml2
-rw-r--r--doc/classes/ScrollContainer.xml2
-rw-r--r--doc/classes/Skeleton3D.xml74
-rw-r--r--doc/classes/SpinBox.xml1
-rw-r--r--doc/classes/String.xml4
-rw-r--r--doc/classes/TabBar.xml (renamed from doc/classes/Tabs.xml)12
-rw-r--r--doc/classes/TabContainer.xml1
-rw-r--r--doc/classes/TextEdit.xml12
-rw-r--r--doc/classes/TextParagraph.xml2
-rw-r--r--doc/classes/TileMap.xml37
-rw-r--r--doc/classes/TileMapPattern.xml85
-rw-r--r--doc/classes/TileSet.xml28
-rw-r--r--doc/classes/TileSetAtlasSource.xml22
-rw-r--r--doc/classes/Tween.xml1
-rw-r--r--doc/classes/Vector3.xml11
-rw-r--r--doc/classes/VideoPlayer.xml4
-rw-r--r--doc/classes/XRAnchor3D.xml33
-rw-r--r--doc/classes/XRController3D.xml68
-rw-r--r--doc/classes/XRInterface.xml79
-rw-r--r--doc/classes/XRInterfaceExtension.xml44
-rw-r--r--doc/classes/XRNode3D.xml53
-rw-r--r--doc/classes/XRPose.xml41
-rw-r--r--doc/classes/XRPositionalTracker.xml121
-rw-r--r--doc/classes/XRServer.xml31
76 files changed, 1135 insertions, 383 deletions
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index c753b341d2..df0cc6f268 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -32,12 +32,14 @@
<return type="Label" />
<description>
Returns the label used for built-in text.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="get_ok_button">
<return type="Button" />
<description>
Returns the OK [Button] instance.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="register_text_enter">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index d2ecbdde26..e3bb60f6de 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -201,12 +201,28 @@
Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
+ <method name="blend_shape_track_insert_key">
+ <return type="int" />
+ <argument index="0" name="track_idx" type="int" />
+ <argument index="1" name="time" type="float" />
+ <argument index="2" name="amount" type="float" />
+ <description>
+ </description>
+ </method>
<method name="clear">
<return type="void" />
<description>
Clear the animation (clear all tracks and reset all).
</description>
</method>
+ <method name="compress">
+ <return type="void" />
+ <argument index="0" name="page_size" type="int" default="8192" />
+ <argument index="1" name="fps" type="int" default="120" />
+ <argument index="2" name="split_tolerance" type="float" default="4.0" />
+ <description>
+ </description>
+ </method>
<method name="copy_track">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
@@ -218,6 +234,7 @@
<method name="find_track" qualifiers="const">
<return type="int" />
<argument index="0" name="path" type="NodePath" />
+ <argument index="1" name="type" type="int" enum="Animation.TrackType" />
<description>
Returns the index of the specified track. If the track is not found, return -1.
</description>
@@ -253,6 +270,14 @@
Returns the arguments values to be called on a method track for a given key in a given track.
</description>
</method>
+ <method name="position_track_insert_key">
+ <return type="int" />
+ <argument index="0" name="track_idx" type="int" />
+ <argument index="1" name="time" type="float" />
+ <argument index="2" name="position" type="Vector3" />
+ <description>
+ </description>
+ </method>
<method name="remove_track">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
@@ -260,6 +285,22 @@
Removes a track by specifying the track index.
</description>
</method>
+ <method name="rotation_track_insert_key">
+ <return type="int" />
+ <argument index="0" name="track_idx" type="int" />
+ <argument index="1" name="time" type="float" />
+ <argument index="2" name="rotation" type="Quaternion" />
+ <description>
+ </description>
+ </method>
+ <method name="scale_track_insert_key">
+ <return type="int" />
+ <argument index="0" name="track_idx" type="int" />
+ <argument index="1" name="time" type="float" />
+ <argument index="2" name="scale" type="Vector3" />
+ <description>
+ </description>
+ </method>
<method name="track_find_key" qualifiers="const">
<return type="int" />
<argument index="0" name="track_idx" type="int" />
@@ -338,6 +379,12 @@
Insert a generic key in a given track.
</description>
</method>
+ <method name="track_is_compressed" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="track_idx" type="int" />
+ <description>
+ </description>
+ </method>
<method name="track_is_enabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="track_idx" type="int" />
@@ -466,25 +513,6 @@
Swaps the track [code]idx[/code]'s index position with the track [code]with_idx[/code].
</description>
</method>
- <method name="transform_track_insert_key">
- <return type="int" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="location" type="Vector3" />
- <argument index="3" name="rotation" type="Quaternion" />
- <argument index="4" name="scale" type="Vector3" />
- <description>
- Insert a transform key for a transform track.
- </description>
- </method>
- <method name="transform_track_interpolate" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time_sec" type="float" />
- <description>
- Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quaternion]) and scale ([Vector3]).
- </description>
- </method>
<method name="value_track_get_key_indices" qualifiers="const">
<return type="PackedInt32Array" />
<argument index="0" name="track_idx" type="int" />
@@ -541,19 +569,24 @@
<constant name="TYPE_VALUE" value="0" enum="TrackType">
Value tracks set values in node properties, but only those which can be Interpolated.
</constant>
- <constant name="TYPE_TRANSFORM3D" value="1" enum="TrackType">
- Transform3D tracks are used to change node local transforms or skeleton pose bones of 3D nodes. Transitions are interpolated.
+ <constant name="TYPE_POSITION_3D" value="1" enum="TrackType">
+ </constant>
+ <constant name="TYPE_ROTATION_3D" value="2" enum="TrackType">
+ </constant>
+ <constant name="TYPE_SCALE_3D" value="3" enum="TrackType">
+ </constant>
+ <constant name="TYPE_BLEND_SHAPE" value="4" enum="TrackType">
</constant>
- <constant name="TYPE_METHOD" value="2" enum="TrackType">
+ <constant name="TYPE_METHOD" value="5" enum="TrackType">
Method tracks call functions with given arguments per key.
</constant>
- <constant name="TYPE_BEZIER" value="3" enum="TrackType">
+ <constant name="TYPE_BEZIER" value="6" enum="TrackType">
Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]).
</constant>
- <constant name="TYPE_AUDIO" value="4" enum="TrackType">
+ <constant name="TYPE_AUDIO" value="7" enum="TrackType">
Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation.
</constant>
- <constant name="TYPE_ANIMATION" value="5" enum="TrackType">
+ <constant name="TYPE_ANIMATION" value="8" enum="TrackType">
Animation tracks play animations in other [AnimationPlayer] nodes.
</constant>
<constant name="INTERPOLATION_NEAREST" value="0" enum="InterpolationType">
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index 3d112e258e..40dcd950d7 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -22,7 +22,7 @@
<method name="get_root_motion_transform" qualifiers="const">
<return type="Transform3D" />
<description>
- Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM3D], returns an identity transformation. See also [member root_motion_track] and [RootMotionView].
+ Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_SCALE_3D] or [constant Animation.TYPE_ROTATION_3D], returns an identity transformation. See also [member root_motion_track] and [RootMotionView].
</description>
</method>
<method name="rename_parameter">
@@ -45,7 +45,7 @@
</member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
- If the track has type [constant Animation.TYPE_TRANSFORM3D], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView].
+ If the track has type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_ROTATION_3D] or [constant Animation.TYPE_SCALE_3D] the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView].
</member>
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
The root animation node of this [AnimationTree]. See [AnimationNode].
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 25f67f0571..ddfc3b1869 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -101,27 +101,27 @@
<signal name="area_shape_entered">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area2D" />
- <argument index="2" name="area_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="area_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
[code]area[/code] the other Area2D.
- [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
+ [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="area_shape_exited">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area2D" />
- <argument index="2" name="area_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="area_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
[code]area[/code] the other Area2D.
- [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
+ [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_entered">
@@ -141,27 +141,27 @@
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node2D" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
- [code]body_shape[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node2D" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
- [code]body_shape[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
</signals>
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index e91cfd79a1..896bfcd14e 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -120,27 +120,27 @@
<signal name="area_shape_entered">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area3D" />
- <argument index="2" name="area_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="area_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
[code]area[/code] the other Area3D.
- [code]area_shape[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
+ [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="area_shape_exited">
<argument index="0" name="area_rid" type="RID" />
<argument index="1" name="area" type="Area3D" />
- <argument index="2" name="area_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="area_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
[code]area[/code] the other Area3D.
- [code]area_shape[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
+ [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_entered">
@@ -160,27 +160,27 @@
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node3D" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
- [code]body_shape[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node3D" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
- [code]body_shape[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
</signals>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index bd344fad29..e8a78d5a4c 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -123,7 +123,7 @@
Logarithmic dampening of loudness according to distance.
</constant>
<constant name="ATTENUATION_DISABLED" value="3" enum="AttenuationModel">
- No dampening of loudness according to distance. The sound will still be heard positionally, unlike an [AudioStreamPlayer].
+ No dampening of loudness according to distance. The sound will still be heard positionally, unlike an [AudioStreamPlayer]. [constant ATTENUATION_DISABLED] can be combined with a [member max_distance] value greater than [code]0.0[/code] to achieve linear attenuation clamped to a sphere of a defined size.
</constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking">
Disables doppler tracking.
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 7f0d4cbbe3..6215c658c3 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -42,14 +42,6 @@
</method>
<method name="Basis" qualifiers="constructor">
<return type="Basis" />
- <argument index="0" name="euler" type="Vector3" />
- <description>
- Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle).
- Consider using the [Quaternion] constructor instead, which uses a quaternion instead of Euler angles.
- </description>
- </method>
- <method name="Basis" qualifiers="constructor">
- <return type="Basis" />
<argument index="0" name="from" type="Quaternion" />
<description>
Constructs a pure rotation basis matrix from the given quaternion.
@@ -71,6 +63,13 @@
A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid.
</description>
</method>
+ <method name="from_euler" qualifiers="static">
+ <return type="Basis" />
+ <argument index="0" name="euler" type="Vector3" />
+ <argument index="1" name="order" type="int" default="2" />
+ <description>
+ </description>
+ </method>
<method name="from_scale" qualifiers="static">
<return type="Basis" />
<argument index="0" name="scale" type="Vector3" />
@@ -80,6 +79,7 @@
</method>
<method name="get_euler" qualifiers="const">
<return type="Vector3" />
+ <argument index="0" name="order" type="int" default="2" />
<description>
Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles.
@@ -248,6 +248,18 @@
</member>
</members>
<constants>
+ <constant name="EULER_ORDER_XYZ" value="0">
+ </constant>
+ <constant name="EULER_ORDER_XZY" value="1">
+ </constant>
+ <constant name="EULER_ORDER_YXZ" value="2">
+ </constant>
+ <constant name="EULER_ORDER_YZX" value="3">
+ </constant>
+ <constant name="EULER_ORDER_ZXY" value="4">
+ </constant>
+ <constant name="EULER_ORDER_ZYX" value="5">
+ </constant>
<constant name="IDENTITY" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)">
The identity basis, with no rotation or scaling applied.
This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 738594ea5d..7be18c1d5c 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -53,7 +53,7 @@
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="char" type="String" />
<argument index="3" name="next" type="String" default="&quot;&quot;" />
- <argument index="4" name="size" type="int" default="-1" />
+ <argument index="4" name="size" type="int" default="16" />
<argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<argument index="6" name="outline_size" type="int" default="0" />
<argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
@@ -146,7 +146,7 @@
<argument index="3" name="align" type="int" enum="HAlign" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="max_lines" type="int" default="-1" />
- <argument index="6" name="size" type="int" default="-1" />
+ <argument index="6" name="size" type="int" default="16" />
<argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<argument index="8" name="outline_size" type="int" default="0" />
<argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
@@ -238,7 +238,7 @@
<argument index="2" name="text" type="String" />
<argument index="3" name="align" type="int" enum="HAlign" default="0" />
<argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="size" type="int" default="-1" />
+ <argument index="5" name="size" type="int" default="16" />
<argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<argument index="7" name="outline_size" type="int" default="0" />
<argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index 2d8e7817c1..b11d9c341a 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -15,7 +15,7 @@
The color the character will be drawn with.
</member>
<member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0">
- The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused depending on the value of the [RichTextLabel]'s [member Node.process_mode].
+ The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the [RichTextLabel] is paused (see [member Node.process_mode]). Resets when the text in the [RichTextLabel] is changed.
[b]Note:[/b] Time still passes while the [RichTextLabel] is hidden.
</member>
<member name="env" type="Dictionary" setter="set_environment" getter="get_environment" default="{}">
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 1cdfbd760e..58b6e89507 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -17,12 +17,14 @@
<return type="ColorPicker" />
<description>
Returns the [ColorPicker] that this node toggles.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="get_popup">
<return type="PopupPanel" />
<description>
Returns the control's [PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
</methods>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 352631da1d..c4bdaf436d 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -22,6 +22,7 @@
<return type="Button" />
<description>
Returns the cancel button.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
</methods>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 7c8239977f..63e3eb7a5f 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -763,10 +763,10 @@
</method>
<method name="set_drag_forwarding">
<return type="void" />
- <argument index="0" name="target" type="Node" />
+ <argument index="0" name="target" type="Object" />
<description>
- Forwards the handling of this control's drag and drop to [code]target[/code] node.
- Forwarding can be implemented in the target node similar to the methods [method _get_drag_data], [method _can_drop_data], and [method _drop_data] but with two differences:
+ Forwards the handling of this control's drag and drop to [code]target[/code] object.
+ Forwarding can be implemented in the target object similar to the methods [method _get_drag_data], [method _can_drop_data], and [method _drop_data] but with two differences:
1. The function name must be suffixed with [b]_fw[/b]
2. The function must take an extra argument that is the control doing the forwarding
[codeblocks]
@@ -1044,7 +1044,7 @@
<member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value.
[b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.
- [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]yield(get_tree(), "process_frame")[/code] then set its [member rect_scale] property.
+ [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]await get_tree().process_frame[/code] then set its [member rect_scale] property.
</member>
<member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)">
The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically.
diff --git a/doc/classes/DirectionalLight2D.xml b/doc/classes/DirectionalLight2D.xml
index 317cf6e66c..1e5c9bc09a 100644
--- a/doc/classes/DirectionalLight2D.xml
+++ b/doc/classes/DirectionalLight2D.xml
@@ -8,7 +8,7 @@
</tutorials>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" default="0.0">
- The height of the light. Used with 2D normal mapping.
+ The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to the plane) to 1 (perpendicular to the plane).
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="10000.0">
</member>
diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml
index 7c006ad3a6..44d982cbcc 100644
--- a/doc/classes/DirectionalLight3D.xml
+++ b/doc/classes/DirectionalLight3D.xml
@@ -11,13 +11,13 @@
</tutorials>
<members>
<member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" default="false">
- If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits.
+ If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. Enabling shadow blend splitting also has a moderate performance cost. This is ignored when [member directional_shadow_mode] is [constant SHADOW_ORTHOGONAL].
</member>
<member name="directional_shadow_fade_start" type="float" setter="set_param" getter="get_param" default="0.8">
- Proportion of [member directional_shadow_max_distance] at which point the shadow starts to fade. At [member directional_shadow_max_distance] the shadow will disappear.
+ Proportion of [member directional_shadow_max_distance] at which point the shadow starts to fade. At [member directional_shadow_max_distance], the shadow will disappear. The default value is a balance between smooth fading and distant shadow visibility. If the camera moves fast and the [member directional_shadow_max_distance] is low, consider lowering [member directional_shadow_fade_start] below [code]0.8[/code] to make shadow transitions less noticeable. On the other hand, if you tuned [member directional_shadow_max_distance] to cover the entire scene, you can set [member directional_shadow_fade_start] to [code]1.0[/code] to prevent the shadow from fading in the distance (it will suddenly cut off instead).
</member>
<member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param" default="100.0">
- The maximum distance for shadow splits.
+ The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering).
</member>
<member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="DirectionalLight3D.ShadowMode" default="2">
The light's shadow rendering algorithm. See [enum ShadowMode].
@@ -26,13 +26,13 @@
Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to [code]0[/code] turns off the pancaking effect.
</member>
<member name="directional_shadow_split_1" type="float" setter="set_param" getter="get_param" default="0.1">
- The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_2_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code].
+ The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_2_SPLITS] or [constant SHADOW_PARALLEL_4_SPLITS].
</member>
<member name="directional_shadow_split_2" type="float" setter="set_param" getter="get_param" default="0.2">
- The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_2_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code].
+ The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS].
</member>
<member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5">
- The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_4_SPLITS[/code].
+ The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS].
</member>
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.1" />
<member name="use_in_sky_only" type="bool" setter="set_sky_only" getter="is_sky_only" default="false">
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 7a467c03c1..92d6a220d2 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -13,6 +13,13 @@
Returns the user's clipboard as a string if possible.
</description>
</method>
+ <method name="clipboard_get_primary" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the user's primary clipboard as a string if possible.
+ [b]Note:[/b] This method is only implemented on Linux.
+ </description>
+ </method>
<method name="clipboard_set">
<return type="void" />
<argument index="0" name="clipboard" type="String" />
@@ -20,6 +27,14 @@
Sets the user's clipboard content to the given string.
</description>
</method>
+ <method name="clipboard_set_primary">
+ <return type="void" />
+ <argument index="0" name="clipboard_primary" type="String" />
+ <description>
+ Sets the user's primary clipboard content to the given string.
+ [b]Note:[/b] This method is only implemented on Linux.
+ </description>
+ </method>
<method name="console_set_visible">
<return type="void" />
<argument index="0" name="console_visible" type="bool" />
@@ -804,6 +819,8 @@
</constant>
<constant name="FEATURE_SWAP_BUFFERS" value="17" enum="Feature">
</constant>
+ <constant name="FEATURE_CLIPBOARD_PRIMARY" value="19" enum="Feature">
+ </constant>
<constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode">
Makes the mouse cursor visible if it is hidden.
</constant>
diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml
index 0773e176b3..6687d3c3ac 100644
--- a/doc/classes/EditorDebuggerPlugin.xml
+++ b/doc/classes/EditorDebuggerPlugin.xml
@@ -4,9 +4,10 @@
A base class to implement debugger plugins.
</brief_description>
<description>
- All debugger plugin scripts must extend [EditorDebuggerPlugin]. It provides functions related to editor side of debugger.
- You don't need to instantiate this class. That is handled by the debugger itself. [Control] nodes can be added as child nodes to provide a GUI front-end for the plugin.
- Do not queue_free/reparent it's instance otherwise the instance becomes unusable.
+ [EditorDebuggerPlugin] provides functions related to the editor side of the debugger.
+ You don't need to instantiate this class; that is automatically handled by the debugger. [Control] nodes can be added as child nodes to provide a GUI for the plugin.
+ Do not free or reparent this node, otherwise it becomes unusable.
+ To use [EditorDebuggerPlugin], register it using the [method EditorPlugin.add_debugger_plugin] method first.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index fca7bb350d..3830bfc60e 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -4,7 +4,8 @@
A script that is executed when exporting the project.
</brief_description>
<description>
- Editor export plugins are automatically activated whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, [method _export_begin] is called at the beginning of the export process and then [method _export_file] is called for each exported file.
+ [EditorExportPlugin]s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, [method _export_begin] is called at the beginning of the export process and then [method _export_file] is called for each exported file.
+ To use [EditorExportPlugin], register it using the [method EditorPlugin.add_export_plugin] method first.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 53fba9f3b8..79758281ac 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -26,6 +26,7 @@
<return type="VBoxContainer" />
<description>
Returns the [code]VBoxContainer[/code] used to display the file system.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="invalidate">
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index c5a44009d2..cb33f159ef 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -4,8 +4,8 @@
Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type.
</brief_description>
<description>
- EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin].
- EditorImportPlugins work by associating with specific file extensions and a resource type. See [method _get_recognized_extensions] and [method _get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].godot/imported[/code] directory (see [member ProjectSettings.application/config/project_data_dir_name]).
+ [EditorImportPlugin]s provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers.
+ EditorImportPlugins work by associating with specific file extensions and a resource type. See [method _get_recognized_extensions] and [method _get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].godot/imported[/code] directory (see [member ProjectSettings.application/config/use_hidden_project_data_directory]).
Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
[codeblocks]
[gdscript]
@@ -108,6 +108,7 @@
}
[/csharp]
[/codeblocks]
+ To use [EditorImportPlugin], register it using the [method EditorPlugin.add_import_plugin] method first.
</description>
<tutorials>
<link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link>
@@ -197,7 +198,7 @@
<method name="_get_save_extension" qualifiers="virtual const">
<return type="String" />
<description>
- Gets the extension used to save this resource in the [code].godot/imported[/code] directory (see [member ProjectSettings.application/config/project_data_dir_name]).
+ Gets the extension used to save this resource in the [code].godot/imported[/code] directory (see [member ProjectSettings.application/config/use_hidden_project_data_directory]).
</description>
</method>
<method name="_get_visible_name" qualifiers="virtual const">
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index 17397b80bf..f65e974d47 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -4,13 +4,13 @@
Plugin for adding custom property editors on inspector.
</brief_description>
<description>
- These plugins allow adding custom property editors to [EditorInspector].
- Plugins are registered via [method EditorPlugin.add_inspector_plugin].
+ [EditorInspectorPlugin] allows adding custom property editors to [EditorInspector].
When an object is edited, the [method _can_handle] function is called and must return [code]true[/code] if the object type is supported.
If supported, the function [method _parse_begin] will be called, allowing to place custom controls at the beginning of the class.
Subsequently, the [method _parse_category] and [method _parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too.
Finally, [method _parse_end] will be called.
On each of these calls, the "add" functions can be called.
+ To use [EditorInspectorPlugin], register it using the [method EditorPlugin.add_inspector_plugin] method first.
</description>
<tutorials>
<link title="Inspector plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/inspector_plugins.html</link>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index ad878aad80..5790d8c5af 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -28,12 +28,14 @@
<return type="Control" />
<description>
Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly.
+ [b]Warning:[/b] Removing and freeing this node will render the editor useless and may cause a crash.
</description>
</method>
<method name="get_command_palette" qualifiers="const">
<return type="EditorCommandPalette" />
<description>
Returns the editor's [EditorCommandPalette] instance.
+ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
<method name="get_current_path" qualifiers="const">
@@ -53,6 +55,7 @@
<description>
Returns the main editor control. Use this as a parent for main screens.
[b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically.
+ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
<method name="get_editor_paths">
@@ -77,12 +80,14 @@
<return type="FileSystemDock" />
<description>
Returns the editor's [FileSystemDock] instance.
+ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
<method name="get_inspector" qualifiers="const">
<return type="EditorInspector" />
<description>
Returns the editor's [EditorInspector] instance.
+ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
<method name="get_open_scenes" qualifiers="const">
@@ -113,6 +118,7 @@
<return type="ScriptEditor" />
<description>
Returns the editor's [ScriptEditor] instance.
+ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
<method name="get_selected_path" qualifiers="const">
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index 424d5dd310..08423c4577 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -4,7 +4,8 @@
Used by the editor to define Node3D gizmo types.
</brief_description>
<description>
- EditorNode3DGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorNode3DGizmoPlugin] for the simpler gizmos, or creating a new [EditorNode3DGizmo] type. See the tutorial in the documentation for more info.
+ [EditorNode3DGizmoPlugin] allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorNode3DGizmoPlugin] for the simpler gizmos, or creating a new [EditorNode3DGizmo] type. See the tutorial in the documentation for more info.
+ To use [EditorNode3DGizmoPlugin], register it using the [method EditorPlugin.add_spatial_gizmo_plugin] method first.
</description>
<tutorials>
<link title="Spatial gizmo plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 4aa6963f57..8df6d721d4 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -381,7 +381,7 @@
<argument index="0" name="importer" type="EditorImportPlugin" />
<description>
Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type.
- [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_import_plugin] instead.
+ [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_format_importer_plugin] instead.
See [method add_inspector_plugin] for an example of how to register a plugin.
</description>
</method>
@@ -405,11 +405,18 @@
[/codeblocks]
</description>
</method>
- <method name="add_scene_import_plugin">
+ <method name="add_scene_format_importer_plugin">
<return type="void" />
- <argument index="0" name="scene_importer" type="EditorSceneImporter" />
+ <argument index="0" name="scene_format_importer" type="EditorSceneFormatImporter" />
<description>
- Registers a new [EditorSceneImporter]. Scene importers are used to import custom 3D asset formats as scenes.
+ Registers a new [EditorSceneFormatImporter]. Scene importers are used to import custom 3D asset formats as scenes.
+ </description>
+ </method>
+ <method name="add_scene_post_import_plugin">
+ <return type="void" />
+ <argument index="0" name="scene_import_plugin" type="EditorScenePostImportPlugin" />
+ <description>
+ Add a [EditorScenePostImportPlugin]. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs.
</description>
</method>
<method name="add_spatial_gizmo_plugin">
@@ -462,6 +469,7 @@
<description>
Gets the Editor's dialogue used for making scripts.
[b]Note:[/b] Users can configure it before use.
+ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
<method name="get_undo_redo">
@@ -553,11 +561,18 @@
Removes an inspector plugin registered by [method add_import_plugin]
</description>
</method>
- <method name="remove_scene_import_plugin">
+ <method name="remove_scene_format_importer_plugin">
+ <return type="void" />
+ <argument index="0" name="scene_format_importer" type="EditorSceneFormatImporter" />
+ <description>
+ Removes a scene format importer registered by [method add_scene_format_importer_plugin].
+ </description>
+ </method>
+ <method name="remove_scene_post_import_plugin">
<return type="void" />
- <argument index="0" name="scene_importer" type="EditorSceneImporter" />
+ <argument index="0" name="scene_import_plugin" type="EditorScenePostImportPlugin" />
<description>
- Removes a scene importer registered by [method add_scene_import_plugin].
+ Remove the [EditorScenePostImportPlugin], added with [method add_scene_post_import_plugin].
</description>
</method>
<method name="remove_spatial_gizmo_plugin">
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index 6af6507606..5f342e6dc2 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -73,8 +73,8 @@
<member name="deletable" type="bool" setter="set_deletable" getter="is_deletable" default="false">
Used by the inspector, set to [code]true[/code] when the property can be deleted by the user.
</member>
- <member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red" default="false">
- Used by the inspector, set to [code]true[/code] when the property must draw with error color. This is used for editable children's properties.
+ <member name="draw_warning" type="bool" setter="set_draw_warning" getter="is_draw_warning" default="false">
+ Used by the inspector, set to [code]true[/code] when the property is drawn with the editor theme's warning color. This is used for editable children's properties.
</member>
<member name="keying" type="bool" setter="set_keying" getter="is_keying" default="false">
Used by the inspector, set to [code]true[/code] when the property can add keys for animation.
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneFormatImporter.xml
index a400db551f..6dbd80604e 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneFormatImporter.xml
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporter" inherits="RefCounted" version="4.0">
+<class name="EditorSceneFormatImporter" inherits="RefCounted" version="4.0">
<brief_description>
Imports scenes from third-parties' 3D files.
</brief_description>
<description>
+ [EditorSceneFormatImporter] allows to define an importer script for a third-party 3D format.
+ To use [EditorSceneFormatImporter], register it using the [method EditorPlugin.add_scene_format_importer_plugin] method first.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/EditorSceneFormatImporterFBX.xml b/doc/classes/EditorSceneFormatImporterFBX.xml
new file mode 100644
index 0000000000..117030dfd5
--- /dev/null
+++ b/doc/classes/EditorSceneFormatImporterFBX.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSceneFormatImporterFBX" inherits="EditorSceneFormatImporter" version="4.0">
+ <brief_description>
+ FBX 3D asset importer.
+ </brief_description>
+ <description>
+ This is an FBX 3D asset importer with full support for most FBX features.
+ If exporting a FBX scene from Autodesk Maya, use these FBX export settings:
+ [codeblock]
+ - Smoothing Groups
+ - Smooth Mesh
+ - Triangluate (for meshes with blend shapes)
+ - Bake Animation
+ - Resample All
+ - Deformed Models
+ - Skins
+ - Blend Shapes
+ - Curve Filters
+ - Constant Key Reducer
+ - Auto Tangents Only
+ - *Do not check* Constraints (as it will break the file)
+ - Can check Embed Media (embeds textures into the exported FBX file)
+ - Note that when importing embedded media, the texture and mesh will be a single immutable file.
+ - You will have to re-export then re-import the FBX if the texture has changed.
+ - Units: Centimeters
+ - Up Axis: Y
+ - Binary format in FBX 2017
+ [/codeblock]
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/EditorSceneFormatImporterGLTF.xml b/doc/classes/EditorSceneFormatImporterGLTF.xml
new file mode 100644
index 0000000000..1476a22aef
--- /dev/null
+++ b/doc/classes/EditorSceneFormatImporterGLTF.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSceneFormatImporterGLTF" inherits="EditorSceneFormatImporter" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/EditorScenePostImportPlugin.xml b/doc/classes/EditorScenePostImportPlugin.xml
new file mode 100644
index 0000000000..07d8fa28b9
--- /dev/null
+++ b/doc/classes/EditorScenePostImportPlugin.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorScenePostImportPlugin" inherits="RefCounted" version="4.0">
+ <brief_description>
+ Plugin to control and modifying the process of importing a scene.
+ </brief_description>
+ <description>
+ This plugin type exists to modify the process of importing scenes, allowing to change the content as well as add importer options at every stage of the process.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_import_options" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced].
+ </description>
+ </method>
+ <method name="_get_internal_import_options" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="category" type="int" />
+ <description>
+ Override to add internal import options. These will appear in the 3D scene import dialog. Add options via [method add_import_option] and [method add_import_option_advanced].
+ </description>
+ </method>
+ <method name="_get_internal_option_update_view_required" qualifiers="virtual const">
+ <return type="Variant" />
+ <argument index="0" name="category" type="int" />
+ <argument index="1" name="option" type="String" />
+ <description>
+ Return true whether updating the 3D view of the import dialog needs to be updated if an option has changed.
+ </description>
+ </method>
+ <method name="_get_internal_option_visibility" qualifiers="virtual const">
+ <return type="Variant" />
+ <argument index="0" name="category" type="int" />
+ <argument index="1" name="option" type="String" />
+ <description>
+ Return true or false whether a given option should be visible. Return null to ignore.
+ </description>
+ </method>
+ <method name="_get_option_visibility" qualifiers="virtual const">
+ <return type="Variant" />
+ <argument index="0" name="option" type="String" />
+ <description>
+ Return true or false whether a given option should be visible. Return null to ignore.
+ </description>
+ </method>
+ <method name="_internal_process" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="category" type="int" />
+ <argument index="1" name="base_node" type="Node" />
+ <argument index="2" name="node" type="Node" />
+ <argument index="3" name="resource" type="Resource" />
+ <description>
+ Process a specific node or resource for a given category.
+ </description>
+ </method>
+ <method name="_post_process" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="scene" type="Node" />
+ <description>
+ Post process the scene. This function is called after the final scene has been configured.
+ </description>
+ </method>
+ <method name="_pre_process" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="scene" type="Node" />
+ <description>
+ Pre Process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made.
+ </description>
+ </method>
+ <method name="add_import_option">
+ <return type="void" />
+ <argument index="0" name="name" type="String" />
+ <argument index="1" name="value" type="Variant" />
+ <description>
+ Add a specific import option (name and default value only). This function can only be called from [method _get_import_options] and [method _get_internal_import_options].
+ </description>
+ </method>
+ <method name="add_import_option_advanced">
+ <return type="void" />
+ <argument index="0" name="type" type="int" enum="Variant.Type" />
+ <argument index="1" name="name" type="String" />
+ <argument index="2" name="default_value" type="Variant" />
+ <argument index="3" name="hint" type="int" enum="PropertyHint" default="0" />
+ <argument index="4" name="hint_string" type="String" default="&quot;&quot;" />
+ <argument index="5" name="usage_flags" type="int" default="7" />
+ <description>
+ Add a specific import option. This function can only be called from [method _get_import_options] and [method _get_internal_import_options].
+ </description>
+ </method>
+ <method name="get_option_value" qualifiers="const">
+ <return type="Variant" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ Query the value of an option. This function can only be called from those querying visibility, or processing.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="INTERNAL_IMPORT_CATEGORY_NODE" value="0" enum="InternalImportCategory">
+ </constant>
+ <constant name="INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE" value="1" enum="InternalImportCategory">
+ </constant>
+ <constant name="INTERNAL_IMPORT_CATEGORY_MESH" value="2" enum="InternalImportCategory">
+ </constant>
+ <constant name="INTERNAL_IMPORT_CATEGORY_MATERIAL" value="3" enum="InternalImportCategory">
+ </constant>
+ <constant name="INTERNAL_IMPORT_CATEGORY_ANIMATION" value="4" enum="InternalImportCategory">
+ </constant>
+ <constant name="INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE" value="5" enum="InternalImportCategory">
+ </constant>
+ <constant name="INTERNAL_IMPORT_CATEGORY_MAX" value="6" enum="InternalImportCategory">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml
index de8204def3..900d877f12 100644
--- a/doc/classes/EditorTranslationParserPlugin.xml
+++ b/doc/classes/EditorTranslationParserPlugin.xml
@@ -4,7 +4,7 @@
Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.).
</brief_description>
<description>
- Plugins are registered via [method EditorPlugin.add_translation_parser_plugin] method. To define the parsing and string extraction logic, override the [method _parse_file] method in script.
+ [EditorTranslationParserPlugin] is invoked when a file is being parsed to extract strings that require translation. To define the parsing and string extraction logic, override the [method _parse_file] method in script.
Add the extracted strings to argument [code]msgids[/code] or [code]msgids_context_plural[/code] if context or plural is used.
When adding to [code]msgids_context_plural[/code], you must add the data using the format [code]["A", "B", "C"][/code], where [code]A[/code] represents the extracted string, [code]B[/code] represents the context, and [code]C[/code] represents the plural version of the extracted string. If you want to add only context but not plural, put [code]""[/code] for the plural slot. The idea is the same if you only want to add plural but not context. See the code below for concrete examples.
The extracted strings will be written into a POT file selected by user under "POT Generation" in "Localization" tab in "Project Settings" menu.
@@ -98,6 +98,7 @@
}
[/csharp]
[/codeblocks]
+ To use [EditorTranslationParserPlugin], register it using the [method EditorPlugin.add_translation_parser_plugin] method first.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 98b0de6ce1..80298a0319 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -101,8 +101,10 @@
If [code]true[/code], fog effects are enabled.
</member>
<member name="fog_height" type="float" setter="set_fog_height" getter="get_fog_height" default="0.0">
+ The height at which the height fog effect begins.
</member>
<member name="fog_height_density" type="float" setter="set_fog_height_density" getter="get_fog_height_density" default="0.0">
+ The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.
</member>
<member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.5, 0.6, 0.7, 1)">
</member>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index 22b5c72fa9..fa43f97104 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -32,12 +32,14 @@
<return type="LineEdit" />
<description>
Returns the LineEdit for the selected file.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="get_vbox">
<return type="VBoxContainer" />
<description>
Returns the vertical box container of the dialog, custom controls can be added to it.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="invalidate">
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 39881e9eb7..01bc2837f1 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -82,7 +82,7 @@
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="char" type="int" />
<argument index="3" name="next" type="int" default="0" />
- <argument index="4" name="size" type="int" default="-1" />
+ <argument index="4" name="size" type="int" default="16" />
<argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<argument index="6" name="outline_size" type="int" default="0" />
<argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
@@ -99,7 +99,7 @@
<argument index="3" name="align" type="int" enum="HAlign" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="max_lines" type="int" default="-1" />
- <argument index="6" name="size" type="int" default="-1" />
+ <argument index="6" name="size" type="int" default="16" />
<argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<argument index="8" name="outline_size" type="int" default="0" />
<argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
@@ -116,7 +116,7 @@
<argument index="2" name="text" type="String" />
<argument index="3" name="align" type="int" enum="HAlign" default="0" />
<argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="size" type="int" default="-1" />
+ <argument index="5" name="size" type="int" default="16" />
<argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<argument index="7" name="outline_size" type="int" default="0" />
<argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
@@ -128,7 +128,7 @@
</method>
<method name="get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="-1" />
+ <argument index="0" name="size" type="int" default="16" />
<description>
Returns the average font ascent (number of pixels above the baseline).
[b]Note:[/b] Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line).
@@ -138,7 +138,7 @@
<return type="Vector2" />
<argument index="0" name="char" type="int" />
<argument index="1" name="next" type="int" default="0" />
- <argument index="2" name="size" type="int" default="-1" />
+ <argument index="2" name="size" type="int" default="16" />
<description>
Returns the size of a character, optionally taking kerning into account if the next character is provided.
[b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height.
@@ -166,7 +166,7 @@
</method>
<method name="get_descent" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="-1" />
+ <argument index="0" name="size" type="int" default="16" />
<description>
Returns the average font descent (number of pixels below the baseline).
[b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line).
@@ -174,7 +174,7 @@
</method>
<method name="get_height" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="-1" />
+ <argument index="0" name="size" type="int" default="16" />
<description>
Returns the total average font height (ascent plus descent) in pixels.
[b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line).
@@ -184,7 +184,7 @@
<return type="Vector2" />
<argument index="0" name="text" type="String" />
<argument index="1" name="width" type="float" default="-1" />
- <argument index="2" name="size" type="int" default="-1" />
+ <argument index="2" name="size" type="int" default="16" />
<argument index="3" name="flags" type="int" default="96" />
<description>
Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account.
@@ -201,7 +201,7 @@
<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="1" name="size" type="int" default="16" />
<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" />
@@ -220,7 +220,7 @@
</method>
<method name="get_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="-1" />
+ <argument index="0" name="size" type="int" default="16" />
<description>
Return average pixel offset of the underline below the baseline.
[b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
@@ -228,7 +228,7 @@
</method>
<method name="get_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="-1" />
+ <argument index="0" name="size" type="int" default="16" />
<description>
Return average thickness of the underline.
[b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
@@ -272,9 +272,6 @@
</method>
</methods>
<members>
- <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>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 2213b9b8b2..673bf19122 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -89,8 +89,8 @@
<method name="get_zoom_hbox">
<return type="HBoxContainer" />
<description>
- Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph.
- Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of its children, use their [member CanvasItem.visible] property instead.
+ Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. You can use this method to reposition the toolbar or to add your own custom controls to it.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="is_node_connected">
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 00ead31115..1fded42db2 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -37,6 +37,13 @@
Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
</description>
</method>
+ <method name="flush_buffered_events">
+ <return type="void" />
+ <description>
+ Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([method set_use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]).
+ The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling.
+ </description>
+ </method>
<method name="get_accelerometer" qualifiers="const">
<return type="Vector3" />
<description>
@@ -269,6 +276,14 @@
Removes all mappings from the internal database that match the given GUID.
</description>
</method>
+ <method name="set_accelerometer">
+ <return type="void" />
+ <argument index="0" name="value" type="Vector3" />
+ <description>
+ Sets the acceleration value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
+ [b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.
+ </description>
+ </method>
<method name="set_custom_mouse_cursor">
<return type="void" />
<argument index="0" name="image" type="Resource" />
@@ -291,6 +306,30 @@
[b]Note:[/b] This method generates an [InputEventMouseMotion] to update cursor immediately.
</description>
</method>
+ <method name="set_gravity">
+ <return type="void" />
+ <argument index="0" name="value" type="Vector3" />
+ <description>
+ Sets the gravity value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
+ [b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.
+ </description>
+ </method>
+ <method name="set_gyroscope">
+ <return type="void" />
+ <argument index="0" name="value" type="Vector3" />
+ <description>
+ Sets the value of the rotation rate of the gyroscope sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
+ [b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.
+ </description>
+ </method>
+ <method name="set_magnetometer">
+ <return type="void" />
+ <argument index="0" name="value" type="Vector3" />
+ <description>
+ Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
+ [b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.
+ </description>
+ </method>
<method name="set_mouse_mode">
<return type="void" />
<argument index="0" name="mode" type="int" enum="Input.MouseMode" />
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index e3e4a9fa7d..0a995c770b 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -165,6 +165,7 @@
<return type="VScrollBar" />
<description>
Returns the [Object] ID associated with the list.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="is_anything_selected">
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index 52359b0ede..dbda22d618 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -32,7 +32,7 @@
If [code]true[/code], the light only appears in the editor and will not be visible at runtime.
</member>
<member name="light_angular_distance" type="float" setter="set_param" getter="get_param" default="0.0">
- The light's angular size in degrees. Only available for [DirectionalLight3D]s. For reference, the Sun from the Earth is approximately [code]0.5[/code].
+ The light's angular size in degrees. Increasing this will make shadows softer at greater distances. Only available for [DirectionalLight3D]s. For reference, the Sun from the Earth is approximately [code]0.5[/code].
</member>
<member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light3D.BakeMode" default="1">
The light's bake mode. See [enum BakeMode].
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index 4ad71d1e80..a37bab9b11 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -67,6 +67,7 @@
<return type="PopupMenu" />
<description>
Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
<method name="get_opentype_feature" qualifiers="const">
@@ -221,6 +222,10 @@
[/csharp]
[/codeblocks]
</member>
+ <member name="middle_mouse_paste_enabled" type="bool" setter="set_middle_mouse_paste_enabled" getter="is_middle_mouse_paste_enabled" default="true">
+ If [code]false[/code], using middle mouse button to paste clipboard will be disabled.
+ [b]Note:[/b] This method is only implemented on Linux.
+ </member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" />
<member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha" default="0.6">
Opacity of the [member placeholder_text]. From [code]0[/code] to [code]1[/code].
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 5bdc9cccd9..dda9b98db4 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -15,6 +15,7 @@
<return type="PopupMenu" />
<description>
Returns the [PopupMenu] contained in this button.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
<method name="set_disable_shortcuts">
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index 507a76197a..b72ce46310 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -41,6 +41,12 @@
This helper creates a [StaticBody3D] child node with a [ConcavePolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing.
</description>
</method>
+ <method name="find_blend_shape_by_name">
+ <return type="int" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
<method name="get_active_material" qualifiers="const">
<return type="Material" />
<argument index="0" name="surface" type="int" />
@@ -48,6 +54,17 @@
Returns the [Material] that will be used by the [Mesh] when drawing. This can return the [member GeometryInstance3D.material_override], the surface override [Material] defined in this [MeshInstance3D], or the surface [Material] defined in the [Mesh]. For example, if [member GeometryInstance3D.material_override] is used, all surfaces will return the override material.
</description>
</method>
+ <method name="get_blend_shape_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_value" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="blend_shape_idx" type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_surface_override_material" qualifiers="const">
<return type="Material" />
<argument index="0" name="surface" type="int" />
@@ -61,6 +78,13 @@
Returns the number of surface override materials. This is equivalent to [method Mesh.get_surface_count].
</description>
</method>
+ <method name="set_blend_shape_value">
+ <return type="void" />
+ <argument index="0" name="blend_shape_idx" type="int" />
+ <argument index="1" name="value" type="float" />
+ <description>
+ </description>
+ </method>
<method name="set_surface_override_material">
<return type="void" />
<argument index="0" name="surface" type="int" />
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index e476949360..b100a20963 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -84,7 +84,7 @@
<member name="agent/max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0">
The maximum slope that is considered walkable, in degrees.
</member>
- <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.6">
+ <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="1.0">
The distance to erode/shrink the walkable area of the heightfield away from obstructions.
[b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/size].
</member>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 28acd77a39..2ca664e2b5 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -264,16 +264,28 @@
</method>
</methods>
<members>
+ <member name="basis" type="Basis" setter="set_basis" getter="get_basis">
+ Direct access to the 3x3 basis of the [Transform3D] property.
+ </member>
<member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform">
World3D space (global) [Transform3D] of this node.
</member>
<member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)">
Local position or translation of this node relative to the parent. This is equivalent to [code]transform.origin[/code].
</member>
+ <member name="quaternion" type="Quaternion" setter="set_quaternion" getter="get_quaternion">
+ Access to the node rotation as a [Quaternion]. This property is ideal for tweening complex rotations.
+ </member>
<member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" default="Vector3(0, 0, 0)">
- Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
+ Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotaton in the order specified by the [member rotation_order] property.
[b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
</member>
+ <member name="rotation_edit_mode" type="int" setter="set_rotation_edit_mode" getter="get_rotation_edit_mode" enum="Node3D.RotationEditMode" default="0">
+ Specify how rotation (and scale) will be presented in the editor.
+ </member>
+ <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="Node3D.RotationOrder" default="2">
+ Specify the axis rotation order of the [member rotation] property. The final orientation is constructed by rotating the Euler angles in the order specified by this property.
+ </member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
Scale part of the local transformation.
</member>
@@ -311,5 +323,23 @@
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43">
Node3D nodes receives this notification when their visibility changes.
</constant>
+ <constant name="ROTATION_EDIT_MODE_EULER" value="0" enum="RotationEditMode">
+ </constant>
+ <constant name="ROTATION_EDIT_MODE_QUATERNION" value="1" enum="RotationEditMode">
+ </constant>
+ <constant name="ROTATION_EDIT_MODE_BASIS" value="2" enum="RotationEditMode">
+ </constant>
+ <constant name="ROTATION_ORDER_XYZ" value="0" enum="RotationOrder">
+ </constant>
+ <constant name="ROTATION_ORDER_XZY" value="1" enum="RotationOrder">
+ </constant>
+ <constant name="ROTATION_ORDER_YXZ" value="2" enum="RotationOrder">
+ </constant>
+ <constant name="ROTATION_ORDER_YZX" value="3" enum="RotationOrder">
+ </constant>
+ <constant name="ROTATION_ORDER_ZXY" value="4" enum="RotationOrder">
+ </constant>
+ <constant name="ROTATION_ORDER_ZYX" value="5" enum="RotationOrder">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 656fa61af7..15cc7b9b65 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -57,7 +57,7 @@
<argument index="0" name="msec" type="int" />
<description>
Delays execution of the current thread by [code]msec[/code] milliseconds. [code]msec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message.
- [b]Note:[/b] [method delay_msec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Yielding with [method SceneTree.create_timer] will delay the execution of code placed below the [code]yield[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s).
+ [b]Note:[/b] [method delay_msec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Awaiting with [method SceneTree.create_timer] will delay the execution of code placed below the [code]await[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s).
[b]Note:[/b] When [method delay_msec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_msec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process).
</description>
</method>
@@ -66,7 +66,7 @@
<argument index="0" name="usec" type="int" />
<description>
Delays execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message.
- [b]Note:[/b] [method delay_usec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Yielding with [method SceneTree.create_timer] will delay the execution of code placed below the [code]yield[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s).
+ [b]Note:[/b] [method delay_usec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Awaiting with [method SceneTree.create_timer] will delay the execution of code placed below the [code]await[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s).
[b]Note:[/b] When [method delay_usec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_usec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process).
</description>
</method>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 264ef9975a..5c64dc4162 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -84,6 +84,7 @@
<return type="PopupMenu" />
<description>
Returns the [PopupMenu] contained in this button.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
<method name="get_selected_id" qualifiers="const">
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index 78e1e81752..f7a68e6a24 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -36,17 +36,24 @@
<method name="Plane" qualifiers="constructor">
<return type="Plane" />
<argument index="0" name="normal" type="Vector3" />
+ <argument index="1" name="point" type="Vector3" />
+ <description>
+ Creates a plane from the normal vector and a point in the plane.
+ </description>
+ </method>
+ <method name="Plane" qualifiers="constructor">
+ <return type="Plane" />
+ <argument index="0" name="normal" type="Vector3" />
<argument index="1" name="d" type="float" />
<description>
- Creates a plane from the normal and the plane's distance to the origin.
+ Creates a plane from the normal vector and the plane's distance to the origin.
</description>
</method>
<method name="Plane" qualifiers="constructor">
<return type="Plane" />
- <argument index="0" name="point" type="Vector3" />
- <argument index="1" name="normal" type="Vector3" />
+ <argument index="0" name="normal" type="Vector3" />
<description>
- Creates a plane from the given position and a plane normal.
+ Creates a plane from the normal vector. The plane will intersect the origin.
</description>
</method>
<method name="Plane" qualifiers="constructor">
diff --git a/doc/classes/PointLight2D.xml b/doc/classes/PointLight2D.xml
index 9c13179056..ec809ed0a8 100644
--- a/doc/classes/PointLight2D.xml
+++ b/doc/classes/PointLight2D.xml
@@ -8,7 +8,7 @@
</tutorials>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" default="0.0">
- The height of the light. Used with 2D normal mapping.
+ The height of the light. Used with 2D normal mapping. The units are in pixels, e.g. if the height is 100, then it will illuminate an object 100 pixels away at a 45° angle to the plane.
</member>
<member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2(0, 0)">
The offset of the light's [member texture].
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index eec06d6f82..c646380bee 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -221,11 +221,6 @@
The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files. The window title will be set to match the project name automatically on startup.
[b]Note:[/b] Changing this value will also change the user data folder's path if [member application/config/use_custom_user_dir] is [code]false[/code]. After renaming the project, you will no longer be able to access existing data in [code]user://[/code] unless you rename the old folder to match the new project name. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] in the documentation for more information.
</member>
- <member name="application/config/project_data_dir_name" type="String" setter="" getter="" default="&quot;.godot&quot;">
- The project data directory is used for storing project-specific data (metadata, shader cache, etc.).
- [b]Note:[/b] Restart the application after changing this setting.
- [b]Note:[/b] Changing this value can help on platforms or with third-party tools where specific directory patterns are disallowed. Only modify this setting if you know that your environment requires it, as changing the default can impact compatibility with some external tools or plugins which expect the default [code].godot[/code] folder.
- </member>
<member name="application/config/project_settings_override" type="String" setter="" getter="" default="&quot;&quot;">
Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. See "Overriding" in the [ProjectSettings] class description at the top for more information.
[b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings.
@@ -233,6 +228,12 @@
<member name="application/config/use_custom_user_dir" type="bool" setter="" getter="" default="false">
If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code].
</member>
+ <member name="application/config/use_hidden_project_data_directory" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], the project will use a hidden directory ([code].godot[/code]) for storing project-specific data (metadata, shader cache, etc.).
+ If [code]false[/code], a non-hidden directory ([code]godot[/code]) will be used instead.
+ [b]Note:[/b] Restart the application after changing this setting.
+ [b]Note:[/b] Changing this value can help on platforms or with third-party tools where hidden directory patterns are disallowed. Only modify this setting if you know that your environment requires it, as changing the default can impact compatibility with some external tools or plugins which expect the default [code].godot[/code] folder.
+ </member>
<member name="application/config/windows_native_icon" type="String" setter="" getter="" default="&quot;&quot;">
Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon].
</member>
@@ -1698,8 +1699,10 @@
<member name="rendering/shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
Lower-end override for [member rendering/shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/shadows/directional_shadow/soft_shadow_quality" type="int" setter="" getter="" default="2">
+ <member name="rendering/shadows/directional_shadow/soft_shadow_quality" type="int" setter="" getter="" default="3">
Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
+ [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
+ [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply [i]constant[/i] shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
</member>
<member name="rendering/shadows/directional_shadow/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
@@ -1724,8 +1727,10 @@
<member name="rendering/shadows/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048">
Lower-end override for [member rendering/shadows/shadow_atlas/size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/shadows/shadows/soft_shadow_quality" type="int" setter="" getter="" default="2">
+ <member name="rendering/shadows/shadows/soft_shadow_quality" type="int" setter="" getter="" default="3">
Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
+ [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
+ [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
</member>
<member name="rendering/shadows/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
Lower-end override for [member rendering/shadows/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
@@ -1750,23 +1755,23 @@
</member>
<member name="rendering/textures/vram_compression/import_bptc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the Vulkan renderer.
- [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/project_data_dir_name]).
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
</member>
<member name="rendering/textures/vram_compression/import_etc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures.
- [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/project_data_dir_name]).
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
</member>
<member name="rendering/textures/vram_compression/import_etc2" type="bool" setter="" getter="" default="true">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the Vulkan renderer.
- [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/project_data_dir_name]).
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
</member>
<member name="rendering/textures/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the PowerVR Texture Compression algorithm. This texture compression algorithm is only supported on iOS.
- [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/project_data_dir_name]).
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
</member>
<member name="rendering/textures/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles.
- [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/project_data_dir_name]).
+ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
</member>
<member name="rendering/vulkan/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64">
</member>
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 7858ac732b..9c948ca21a 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -43,9 +43,8 @@
</method>
<method name="Quaternion" qualifiers="constructor">
<return type="Quaternion" />
- <argument index="0" name="euler" type="Vector3" />
+ <argument index="0" name="euler_yxz" type="Vector3" />
<description>
- Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle).
</description>
</method>
<method name="Quaternion" qualifiers="constructor">
@@ -90,6 +89,16 @@
Returns the dot product of two quaternions.
</description>
</method>
+ <method name="get_angle" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_axis" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ </description>
+ </method>
<method name="get_euler" qualifiers="const">
<return type="Vector3" />
<description>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 6f19114c16..973f8cdb1e 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -3663,16 +3663,25 @@
Use 4 splits for shadow projection when using directional light.
</constant>
<constant name="SHADOW_QUALITY_HARD" value="0" enum="ShadowQuality">
+ Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the [member Light3D.shadow_blur] property is ignored if [member Light3D.light_size] and [member Light3D.light_angular_distance] is [code]0.0[/code].
+ [b]Note:[/b] The variable shadow blur performed by [member Light3D.light_size] and [member Light3D.light_angular_distance] is still effective when using hard shadow filtering. In this case, [member Light3D.shadow_blur] [i]is[/i] taken into account. However, the results will not be blurred, instead the blur amount is treated as a maximum radius for the penumbra.
</constant>
- <constant name="SHADOW_QUALITY_SOFT_LOW" value="1" enum="ShadowQuality">
+ <constant name="SHADOW_QUALITY_SOFT_VERY_LOW" value="1" enum="ShadowQuality">
+ Very low shadow filtering quality (faster). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 0.75× to avoid introducing too much noise. This division only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is [code]0.0[/code]).
</constant>
- <constant name="SHADOW_QUALITY_SOFT_MEDIUM" value="2" enum="ShadowQuality">
+ <constant name="SHADOW_QUALITY_SOFT_LOW" value="2" enum="ShadowQuality">
+ Low shadow filtering quality (fast).
</constant>
- <constant name="SHADOW_QUALITY_SOFT_HIGH" value="3" enum="ShadowQuality">
+ <constant name="SHADOW_QUALITY_SOFT_MEDIUM" value="3" enum="ShadowQuality">
+ Medium low shadow filtering quality (average).
</constant>
- <constant name="SHADOW_QUALITY_SOFT_ULTRA" value="4" enum="ShadowQuality">
+ <constant name="SHADOW_QUALITY_SOFT_HIGH" value="4" enum="ShadowQuality">
+ High low shadow filtering quality (slow). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 1.5× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is [code]0.0[/code]).
</constant>
- <constant name="SHADOW_QUALITY_MAX" value="5" enum="ShadowQuality">
+ <constant name="SHADOW_QUALITY_SOFT_ULTRA" value="5" enum="ShadowQuality">
+ Highest low shadow filtering quality (slowest). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 2× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is [code]0.0[/code]).
+ </constant>
+ <constant name="SHADOW_QUALITY_MAX" value="6" enum="ShadowQuality">
</constant>
<constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode">
Reflection probe will update reflections once and then stop.
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index a2e1c3d2c2..9337339f73 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -36,10 +36,10 @@
</description>
</method>
<method name="append_text">
- <return type="int" enum="Error" />
+ <return type="void" />
<argument index="0" name="bbcode" type="String" />
<description>
- Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns the result of the parsing, [constant OK] if successful.
+ Parses [code]bbcode[/code] and adds tags to the tag stack as needed.
[b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_text] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member text] instead of using [method append_text].
</description>
</method>
@@ -101,6 +101,7 @@
<return type="VScrollBar" />
<description>
Returns the vertical scrollbar.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
<method name="get_visible_line_count" qualifiers="const">
@@ -129,10 +130,10 @@
</description>
</method>
<method name="parse_bbcode">
- <return type="int" enum="Error" />
+ <return type="void" />
<argument index="0" name="bbcode" type="String" />
<description>
- The assignment version of [method append_text]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] successfully.
+ The assignment version of [method append_text]. Clears the tag stack and inserts the new content.
</description>
</method>
<method name="parse_expressions_for_values">
diff --git a/doc/classes/RigidDynamicBody2D.xml b/doc/classes/RigidDynamicBody2D.xml
index 9baed392eb..f503884192 100644
--- a/doc/classes/RigidDynamicBody2D.xml
+++ b/doc/classes/RigidDynamicBody2D.xml
@@ -174,27 +174,27 @@
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of this RigidDynamicBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
- [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when the collision between one of this RigidDynamicBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
- [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D].
+ [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
</description>
</signal>
<signal name="sleeping_state_changed">
diff --git a/doc/classes/RigidDynamicBody3D.xml b/doc/classes/RigidDynamicBody3D.xml
index 7d1c7fecfa..6c8d190704 100644
--- a/doc/classes/RigidDynamicBody3D.xml
+++ b/doc/classes/RigidDynamicBody3D.xml
@@ -177,28 +177,28 @@
<signal name="body_shape_entered">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of this RigidDynamicBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
- [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
[b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_rid" type="RID" />
<argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape" type="int" />
- <argument index="3" name="local_shape" type="int" />
+ <argument index="2" name="body_shape_index" type="int" />
+ <argument index="3" name="local_shape_index" type="int" />
<description>
Emitted when the collision between one of this RigidDynamicBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s.
+ [code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
- [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D].
+ [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body_shape_index)[/code].
+ [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(local_shape_index)[/code].
[b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
</description>
</signal>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index ce7fd293d5..6d0ec44b69 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -66,7 +66,7 @@
[gdscript]
func some_function():
print("start")
- yield(get_tree().create_timer(1.0), "timeout")
+ await get_tree().create_timer(1.0).timeout
print("end")
[/gdscript]
[csharp]
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index f97c5e42b5..b0509a322e 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -10,7 +10,7 @@
[gdscript]
func some_function():
print("Timer started.")
- yield(get_tree().create_timer(1.0), "timeout")
+ await get_tree().create_timer(1.0).timeout
print("Timer ended.")
[/gdscript]
[csharp]
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 1cf8c6cb54..976c32c243 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -22,12 +22,14 @@
<return type="HScrollBar" />
<description>
Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the horizontal scrollbar, use [member scroll_horizontal_enabled]. If you want to only hide it instead, use [member scroll_horizontal_visible].
</description>
</method>
<method name="get_v_scrollbar">
<return type="VScrollBar" />
<description>
Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the vertical scrollbar, use [member scroll_vertical_enabled]. If you want to only hide it instead, use [member scroll_vertical_visible].
</description>
</method>
</methods>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index 6ab5ed55a3..e804e7bf24 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -47,6 +47,11 @@
Removes the local pose override on all bones in the skeleton.
</description>
</method>
+ <method name="create_skin_from_rest_transforms">
+ <return type="Skin" />
+ <description>
+ </description>
+ </method>
<method name="execute_modifications">
<return type="void" />
<argument index="0" name="delta" type="float" />
@@ -88,13 +93,6 @@
Returns the amount of bones in the skeleton.
</description>
</method>
- <method name="get_bone_custom_pose" qualifiers="const">
- <return type="Transform3D" />
- <argument index="0" name="bone_idx" type="int" />
- <description>
- Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose.
- </description>
- </method>
<method name="get_bone_global_pose" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="bone_idx" type="int" />
@@ -144,6 +142,24 @@
Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose.
</description>
</method>
+ <method name="get_bone_pose_position" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_bone_pose_rotation" qualifiers="const">
+ <return type="Quaternion" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_bone_pose_scale" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="bone_idx" type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_bone_rest" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="bone_idx" type="int" />
@@ -196,13 +212,6 @@
Returns whether the bone pose for the bone at [code]bone_idx[/code] is enabled.
</description>
</method>
- <method name="is_bone_rest_disabled" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="bone_idx" type="int" />
- <description>
- Returns whether the bone rest for the bone at [code]bone_idx[/code] is disabled.
- </description>
- </method>
<method name="local_pose_to_global_pose">
<return type="Transform3D" />
<argument index="0" name="bone_idx" type="int" />
@@ -272,23 +281,6 @@
Sets the children for the passed in bone, [code]bone_idx[/code], to the passed-in array of bone indexes, [code]bone_children[/code].
</description>
</method>
- <method name="set_bone_custom_pose">
- <return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="custom_pose" type="Transform3D" />
- <description>
- Sets the custom pose transform, [code]custom_pose[/code], for the bone at [code]bone_idx[/code]. This pose is an addition to the bone rest pose.
- [b]Note:[/b] The pose transform needs to be in bone space. Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to bone space.
- </description>
- </method>
- <method name="set_bone_disable_rest">
- <return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="disable" type="bool" />
- <description>
- Disables the rest pose for the bone at [code]bone_idx[/code] if [code]true[/code], enables the bone rest if [code]false[/code].
- </description>
- </method>
<method name="set_bone_enabled">
<return type="void" />
<argument index="0" name="bone_idx" type="int" />
@@ -337,13 +329,25 @@
[b]Note:[/b] [code]parent_idx[/code] must be less than [code]bone_idx[/code].
</description>
</method>
- <method name="set_bone_pose">
+ <method name="set_bone_pose_position">
<return type="void" />
<argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="pose" type="Transform3D" />
+ <argument index="1" name="position" type="Vector3" />
+ <description>
+ </description>
+ </method>
+ <method name="set_bone_pose_rotation">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="rotation" type="Quaternion" />
+ <description>
+ </description>
+ </method>
+ <method name="set_bone_pose_scale">
+ <return type="void" />
+ <argument index="0" name="bone_idx" type="int" />
+ <argument index="1" name="scale" type="Vector3" />
<description>
- Sets the pose transform for bone [code]bone_idx[/code].
- [b]Note:[/b] The pose transform needs to be in bone space. Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to bone space.
</description>
</method>
<method name="set_bone_rest">
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index 33d2b472b5..615f5e3586 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -39,6 +39,7 @@
<return type="LineEdit" />
<description>
Returns the [LineEdit] instance from this [SpinBox]. You can use it to access properties and methods of [LineEdit].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
</methods>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 10ce03c4b2..abb68e0d05 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -56,11 +56,11 @@
Converts a string containing a binary number into an integer. Binary strings can either be prefixed with [code]0b[/code] or not, and they can also start with a [code]-[/code] before the optional prefix.
[codeblocks]
[gdscript]
- print("0x101".bin_to_int()) # Prints "5".
+ print("0b101".bin_to_int()) # Prints "5".
print("101".bin_to_int()) # Prints "5".
[/gdscript]
[csharp]
- GD.Print("0x101".BinToInt()); // Prints "5".
+ GD.Print("0b101".BinToInt()); // Prints "5".
GD.Print("101".BinToInt()); // Prints "5".
[/csharp]
[/codeblocks]
diff --git a/doc/classes/Tabs.xml b/doc/classes/TabBar.xml
index ded4f0b32f..3ca124bb58 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/TabBar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Tabs" inherits="Control" version="4.0">
+<class name="TabBar" inherits="Control" version="4.0">
<brief_description>
- Tabs control.
+ Tab bar control.
</brief_description>
<description>
Simple tabs control, similar to [TabContainer] but is only in charge of drawing tabs, not interacting with children.
@@ -114,7 +114,7 @@
<method name="get_tabs_rearrange_group" qualifiers="const">
<return type="int" />
<description>
- Returns the [Tabs]' rearrange group ID.
+ Returns the [TabBar]'s rearrange group ID.
</description>
</method>
<method name="move_tab">
@@ -192,7 +192,7 @@
<return type="void" />
<argument index="0" name="group_id" type="int" />
<description>
- Defines the rearrange group ID. Choose for each [Tabs] the same value to dragging tabs between [Tabs]. Enable drag with [member drag_to_rearrange_enabled].
+ Defines the rearrange group ID. Choose for each [TabBar] the same value to dragging tabs between [TabBar]. Enable drag with [member drag_to_rearrange_enabled].
</description>
</method>
</methods>
@@ -209,10 +209,10 @@
<member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled" default="true">
if [code]true[/code], the mouse's scroll wheel can be used to navigate the scroll view.
</member>
- <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="Tabs.TabAlign" default="1">
+ <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabBar.TabAlign" default="1">
The alignment of all tabs. See [enum TabAlign] for details.
</member>
- <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="Tabs.CloseButtonDisplayPolicy" default="0">
+ <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="TabBar.CloseButtonDisplayPolicy" default="0">
Sets when the close button will appear on the tabs. See [enum CloseButtonDisplayPolicy] for details.
</member>
</members>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 4c50aa4e1f..1f32bba5a1 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -20,6 +20,7 @@
<return type="Popup" />
<description>
Returns the [Popup] node instance if one has been set already with [method set_popup].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
<method name="get_previous_tab" qualifiers="const">
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 3667dbf578..ba3394b54a 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -41,6 +41,13 @@
Override this method to define what happens when the user performs a paste operation.
</description>
</method>
+ <method name="_paste_primary_clipboard" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Override this method to define what happens when the user performs a paste operation with middle mouse button.
+ [b]Note:[/b] This method is only implemented on Linux.
+ </description>
+ </method>
<method name="add_gutter">
<return type="void" />
<argument index="0" name="at" type="int" default="-1" />
@@ -314,6 +321,7 @@
<return type="PopupMenu" />
<description>
Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
<method name="get_minimap_line_at_pos" qualifiers="const">
@@ -936,6 +944,10 @@
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
+ <member name="middle_mouse_paste_enabled" type="bool" setter="set_middle_mouse_paste_enabled" getter="is_middle_mouse_paste_enabled" default="true">
+ If [code]false[/code], using middle mouse button to paste clipboard will be disabled.
+ [b]Note:[/b] This method is only implemented on Linux.
+ </member>
<member name="minimap_draw" type="bool" setter="set_draw_minimap" getter="is_drawing_minimap" default="false">
If [code]true[/code], a minimap is shown, providing an outline of your source code.
</member>
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index e06dfee698..5bd6b0572c 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -199,7 +199,7 @@
Returns width (for horizontal layout) or height (for vertical) of the line of text.
</description>
</method>
- <method name="get_non_wraped_size" qualifiers="const">
+ <method name="get_non_wrapped_size" qualifiers="const">
<return type="Vector2" />
<description>
Returns the size of the bounding box of the paragraph, without line breaks.
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index d7108c3a2a..4ac5718e04 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -117,6 +117,14 @@
Returns the neighboring cell to the one at coordinates [code]coords[/code], indentified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take.
</description>
</method>
+ <method name="get_pattern">
+ <return type="TileMapPattern" />
+ <argument index="0" name="layer" type="int" />
+ <argument index="1" name="coords_array" type="Vector2i[]" />
+ <description>
+ Creates a new [TileMapPattern] from the given layer and set of cells.
+ </description>
+ </method>
<method name="get_surrounding_tiles">
<return type="Vector2i[]" />
<argument index="0" name="coords" type="Vector2i" />
@@ -151,6 +159,15 @@
Returns if a layer Y-sorts its tiles.
</description>
</method>
+ <method name="map_pattern">
+ <return type="Vector2i" />
+ <argument index="0" name="position_in_tilemap" type="Vector2i" />
+ <argument index="1" name="coords_in_pattern" type="Vector2i" />
+ <argument index="2" name="pattern" type="TileMapPattern" />
+ <description>
+ Returns for the given coodinate [code]coords_in_pattern[/code] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [code]position_in_tilemap[/code] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code]
+ </description>
+ </method>
<method name="map_to_world" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="map_position" type="Vector2i" />
@@ -187,6 +204,17 @@
- The alternative tile identifier [code]alternative_tile[/code] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource].
</description>
</method>
+ <method name="set_cells_from_surrounding_terrains">
+ <return type="void" />
+ <argument index="0" name="layer" type="int" />
+ <argument index="1" name="cells" type="Vector2i[]" />
+ <argument index="2" name="terrain_set" type="int" />
+ <argument index="3" name="ignore_empty_terrains" type="bool" default="true" />
+ <description>
+ Updates all the cells in the [code]cells[/code] coordinates array and replace them by tiles that matches the surrounding cells terrains. Only cells form the given [code]terrain_set[/code] are considered.
+ If [code]ignore_empty_terrains[/code] is true, zones with no terrain defined are ignored to select the tiles.
+ </description>
+ </method>
<method name="set_layer_enabled">
<return type="void" />
<argument index="0" name="layer" type="int" />
@@ -237,6 +265,15 @@
Sets a layers Z-index value. This Z-index is added to each tile's Z-index value.
</description>
</method>
+ <method name="set_pattern">
+ <return type="void" />
+ <argument index="0" name="layer" type="int" />
+ <argument index="1" name="position" type="Vector2i" />
+ <argument index="2" name="pattern" type="TileMapPattern" />
+ <description>
+ Paste the given [TileMapPattern] at the given [code]position[/code] and [code]layer[/code] in the tile map.
+ </description>
+ </method>
<method name="world_to_map" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="world_position" type="Vector2" />
diff --git a/doc/classes/TileMapPattern.xml b/doc/classes/TileMapPattern.xml
new file mode 100644
index 0000000000..4c46625423
--- /dev/null
+++ b/doc/classes/TileMapPattern.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TileMapPattern" inherits="Resource" version="4.0">
+ <brief_description>
+ Holds a pattern to be copied from or pasted into [TileMap]s.
+ </brief_description>
+ <description>
+ This resource holds a set of cells to help bulk manipulations of [TileMap].
+ A pattern always start at the [code](0,0)[/code] coordinates and cannot have cells with negative coordinates.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_cell_alternative_tile" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="coords" type="Vector2i" />
+ <description>
+ Returns the tile alternative ID of the cell at [code]coords[/code].
+ </description>
+ </method>
+ <method name="get_cell_atlas_coords" qualifiers="const">
+ <return type="Vector2i" />
+ <argument index="0" name="coords" type="Vector2i" />
+ <description>
+ Returns the tile atlas coordinates ID of the cell at [code]coords[/code].
+ </description>
+ </method>
+ <method name="get_cell_source_id" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="coords" type="Vector2i" />
+ <description>
+ Returns the tile source ID of the cell at [code]coords[/code].
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2i" />
+ <description>
+ Returns the size, in cells, of the pattern.
+ </description>
+ </method>
+ <method name="get_used_cells" qualifiers="const">
+ <return type="Vector2i[]" />
+ <description>
+ Returns the list of used cell coordinates in the pattern.
+ </description>
+ </method>
+ <method name="has_cell" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="coords" type="Vector2i" />
+ <description>
+ Returns whether the pattern has a tile at the given coordinates.
+ </description>
+ </method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the pattern is empty or not.
+ </description>
+ </method>
+ <method name="remove_cell">
+ <return type="void" />
+ <argument index="0" name="coords" type="Vector2i" />
+ <argument index="1" name="arg1" type="bool" />
+ <description>
+ Remove the cell at the given coordinates.
+ </description>
+ </method>
+ <method name="set_cell">
+ <return type="void" />
+ <argument index="0" name="coords" type="Vector2i" />
+ <argument index="1" name="source_id" type="int" default="-1" />
+ <argument index="2" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
+ <argument index="3" name="alternative_tile" type="int" default="-1" />
+ <description>
+ Sets the tile indentifiers for the cell at coordinates [code]coords[/code]. See [method TileMap.set_cell].
+ </description>
+ </method>
+ <method name="set_size">
+ <return type="void" />
+ <argument index="0" name="size" type="Vector2i" />
+ <description>
+ Sets the size of the pattern.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 02baded019..45d6f9ca6c 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -46,6 +46,14 @@
Occlusion layers allow assigning occlusion polygons to atlas tiles.
</description>
</method>
+ <method name="add_pattern">
+ <return type="int" />
+ <argument index="0" name="pattern" type="TileMapPattern" />
+ <argument index="1" name="index" type="int" default="-1" />
+ <description>
+ Adds a [TileMapPattern] to be stored in the TileSet resouce. If provided, insert it at the given [code]index[/code].
+ </description>
+ </method>
<method name="add_physics_layer">
<return type="void" />
<argument index="0" name="to_position" type="int" default="-1" />
@@ -154,6 +162,19 @@
Returns the occlusion layers count.
</description>
</method>
+ <method name="get_pattern">
+ <return type="TileMapPattern" />
+ <argument index="0" name="index" type="int" default="-1" />
+ <description>
+ Returns the [TileMapPattern] at the given [code]index[/code].
+ </description>
+ </method>
+ <method name="get_patterns_count">
+ <return type="int" />
+ <description>
+ Returns the number of [TileMapPattern] this tile set handles.
+ </description>
+ </method>
<method name="get_physics_layer_collision_layer" qualifiers="const">
<return type="int" />
<argument index="0" name="layer_index" type="int" />
@@ -374,6 +395,13 @@
Removes the occlusion layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly.
</description>
</method>
+ <method name="remove_pattern">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Remove the [TileMapPattern] at the given index.
+ </description>
+ </method>
<method name="remove_physics_layer">
<return type="void" />
<argument index="0" name="layer_index" type="int" />
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
index d12ac840f4..881a1c3d07 100644
--- a/doc/classes/TileSetAtlasSource.xml
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -15,12 +15,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="clear_tiles_outside_texture">
- <return type="void" />
- <description>
- Clears all tiles that are defined outside the texture boundaries.
- </description>
- </method>
<method name="create_alternative_tile">
<return type="int" />
<argument index="0" name="atlas_coords" type="Vector2i" />
@@ -124,6 +118,16 @@
Returns a tile's texture region in the atlas texture. For animated tiles, a [code]frame[/code] argument might be provided for the different frames of the animation.
</description>
</method>
+ <method name="get_tiles_to_be_removed_on_change">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="texture" type="Texture2D" />
+ <argument index="1" name="margins" type="Vector2i" />
+ <argument index="2" name="separation" type="Vector2i" />
+ <argument index="3" name="texture_region_size" type="Vector2i" />
+ <description>
+ Returns an array of tiles coordinates ID that will be automatically removed when modifying one or several of those properties: [code]texture[/code], [code]margins[/code], [code]separation[/code] or [code]texture_region_size[/code]. This can be used to undo changes that would have caused tiles data loss.
+ </description>
+ </method>
<method name="has_room_for_tile" qualifiers="const">
<return type="bool" />
<argument index="0" name="atlas_coords" type="Vector2i" />
@@ -136,12 +140,6 @@
Returns whether there is enough room in an atlas to create/modify a tile with the given properties. If [code]ignored_tile[/code] is provided, act as is the given tile was not present in the atlas. This may be used when you want to modify a tile's properties.
</description>
</method>
- <method name="has_tiles_outside_texture">
- <return type="bool" />
- <description>
- Returns if this atlas has tiles outside of its texture.
- </description>
- </method>
<method name="move_tile_in_atlas">
<return type="void" />
<argument index="0" name="atlas_coords" type="Vector2i" />
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index f94018c96b..488a5aa340 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -146,6 +146,7 @@
<description>
Sets the number of times the tweening sequence will be repeated, i.e. [code]set_loops(2)[/code] will run the animation twice.
Calling this method without arguments will make the [Tween] run infinitely, until it is either killed by [method kill] or by freeing bound node, or all the animated objects have been freed (which makes further animation impossible).
+ [b]Warning:[/b] Make sure to always add some duration/delay when using infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] with no delay) are equivalent to infinite [code]while[/code] loops and will freeze your game.
</description>
</method>
<method name="set_parallel">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 267a0d2e9e..078ba1e1a4 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -208,6 +208,17 @@
Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
</description>
</method>
+ <method name="octahedron_decode" qualifiers="static">
+ <return type="Vector3" />
+ <argument index="0" name="uv" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="octahedron_encode" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
<description>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index 4f60b9d567..c8590988f5 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -5,9 +5,9 @@
</brief_description>
<description>
Control node for playing video streams using [VideoStream] resources.
- Supported video formats are [url=https://www.webmproject.org/]WebM[/url] ([code].webm[/code], [VideoStreamWebm]), [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]), and any format exposed via a GDNative plugin using [VideoStreamGDNative].
+ Supported video formats are [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]) and any format exposed via a GDNative plugin using [VideoStreamGDNative].
[b]Note:[/b] Due to a bug, VideoPlayer does not support localization remapping yet.
- [b]Warning:[/b] On HTML5, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations, especially for VP8/VP9.
+ [b]Warning:[/b] On HTML5, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/XRAnchor3D.xml b/doc/classes/XRAnchor3D.xml
index 94fc8fc13d..2c54c728ed 100644
--- a/doc/classes/XRAnchor3D.xml
+++ b/doc/classes/XRAnchor3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRAnchor3D" inherits="Node3D" version="4.0">
+<class name="XRAnchor3D" inherits="XRNode3D" version="4.0">
<brief_description>
An anchor point in AR space.
</brief_description>
@@ -11,24 +11,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_anchor_name" qualifiers="const">
- <return type="String" />
- <description>
- Returns the name given to this anchor.
- </description>
- </method>
- <method name="get_is_active" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if the anchor is being tracked and [code]false[/code] if no anchor with this ID is currently known.
- </description>
- </method>
- <method name="get_mesh" qualifiers="const">
- <return type="Mesh" />
- <description>
- If provided by the [XRInterface], this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes.
- </description>
- </method>
<method name="get_plane" qualifiers="const">
<return type="Plane" />
<description>
@@ -42,17 +24,4 @@
</description>
</method>
</methods>
- <members>
- <member name="anchor_id" type="int" setter="set_anchor_id" getter="get_anchor_id" default="1">
- The anchor's ID. You can set this before the anchor itself exists. The first anchor gets an ID of [code]1[/code], the second an ID of [code]2[/code], etc. When anchors get removed, the engine can then assign the corresponding ID to new anchors. The most common situation where anchors "disappear" is when the AR server identifies that two anchors represent different parts of the same plane and merges them.
- </member>
- </members>
- <signals>
- <signal name="mesh_updated">
- <argument index="0" name="mesh" type="Mesh" />
- <description>
- Emitted when the mesh associated with the anchor changes or when one becomes available. This is especially important for topology that is constantly being [code]mesh_updated[/code].
- </description>
- </signal>
- </signals>
</class>
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index 35edf5c2b2..eb91196e00 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRController3D" inherits="Node3D" version="4.0">
+<class name="XRController3D" inherits="XRNode3D" version="4.0">
<brief_description>
A spatial node representing a spatially-tracked controller.
</brief_description>
@@ -7,63 +7,41 @@
This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers.
Controllers are linked by their ID. You can create controller nodes before the controllers are available. If your game always uses two controllers (one for each hand), you can predefine the controllers with ID 1 and 2; they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add XRController3D nodes to your scene.
The position of the controller node is automatically updated by the [XRServer]. This makes this node ideal to add child nodes to visualize the controller.
+ As many XR runtimes now use a configurable action map all inputs are named.
</description>
<tutorials>
<link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
- <method name="get_controller_name" qualifiers="const">
- <return type="String" />
+ <method name="get_axis" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="name" type="StringName" />
<description>
- If active, returns the name of the associated controller if provided by the AR/VR SDK used.
+ Returns a [Vector2] for the input with the given [code]name[/code]. This is used for thumbsticks and thumbpads found on many controllers.
</description>
</method>
- <method name="get_is_active" qualifiers="const">
- <return type="bool" />
+ <method name="get_tracker_hand" qualifiers="const">
+ <return type="int" enum="XRPositionalTracker.TrackerHand" />
<description>
- Returns [code]true[/code] if the bound controller is active. XR systems attempt to track active controllers.
+ Returns the hand holding this controller, if known. See [enum XRPositionalTracker.TrackerHand].
</description>
</method>
- <method name="get_joystick_axis" qualifiers="const">
+ <method name="get_value" qualifiers="const">
<return type="float" />
- <argument index="0" name="axis" type="int" />
- <description>
- Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller.
- </description>
- </method>
- <method name="get_joystick_id" qualifiers="const">
- <return type="int" />
- <description>
- Returns the ID of the joystick object bound to this. Every controller tracked by the [XRServer] that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry.
- </description>
- </method>
- <method name="get_mesh" qualifiers="const">
- <return type="Mesh" />
+ <argument index="0" name="name" type="StringName" />
<description>
- If provided by the [XRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller.
- </description>
- </method>
- <method name="get_tracker_hand" qualifiers="const">
- <return type="int" enum="XRPositionalTracker.TrackerHand" />
- <description>
- Returns the hand holding this controller, if known. See [enum XRPositionalTracker.TrackerHand].
+ Returns a numeric value for the input with the given [code]name[/code]. This is used for triggers and grip sensors.
</description>
</method>
<method name="is_button_pressed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="button" type="int" />
+ <argument index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoyButton].
+ Returns [code]true[/code] if the button with the given [code]name[/code] is pressed.
</description>
</method>
</methods>
<members>
- <member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id" default="1">
- The controller's ID.
- A controller ID of 0 is unbound and will always result in an inactive node. Controller ID 1 is reserved for the first controller that identifies itself as the left-hand controller and ID 2 is reserved for the first controller that identifies itself as the right-hand controller.
- For any other controller that the [XRServer] detects, we continue with controller ID 3.
- When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off.
- </member>
<member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
The degree to which the controller vibrates. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member XRPositionalTracker.rumble] accordingly.
This is a useful property to animate if you want the controller to vibrate for a limited duration.
@@ -71,21 +49,29 @@
</members>
<signals>
<signal name="button_pressed">
- <argument index="0" name="button" type="int" />
+ <argument index="0" name="name" type="String" />
<description>
Emitted when a button on this controller is pressed.
</description>
</signal>
<signal name="button_released">
- <argument index="0" name="button" type="int" />
+ <argument index="0" name="name" type="String" />
<description>
Emitted when a button on this controller is released.
</description>
</signal>
- <signal name="mesh_updated">
- <argument index="0" name="mesh" type="Mesh" />
+ <signal name="input_axis_changed">
+ <argument index="0" name="name" type="String" />
+ <argument index="1" name="value" type="Vector2" />
+ <description>
+ Emitted when a thumbstick or thumbpad on this controller is moved.
+ </description>
+ </signal>
+ <signal name="input_value_changed">
+ <argument index="0" name="name" type="String" />
+ <argument index="1" name="value" type="float" />
<description>
- Emitted when the mesh associated with the controller changes or when one becomes available. Generally speaking this will be a static mesh after becoming available.
+ Emitted when a trigger or similar input on this controller changes value.
</description>
</signal>
</signals>
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index ffc2bc138d..7ae70f97a2 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -29,6 +29,12 @@
Returns the name of this interface (OpenXR, OpenVR, OpenHMD, ARKit, etc).
</description>
</method>
+ <method name="get_play_area" qualifiers="const">
+ <return type="PackedVector3Array" />
+ <description>
+ Returns an array of vectors that denotes the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualise the play area. This returns an empty array if this feature is not supported or if the information is not yet available.
+ </description>
+ </method>
<method name="get_render_target_size">
<return type="Vector2" />
<description>
@@ -63,6 +69,34 @@
Is [code]true[/code] if this interface has been initialised.
</description>
</method>
+ <method name="set_play_area_mode">
+ <return type="bool" />
+ <argument index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
+ <description>
+ Sets the active play area mode, will return [code]false[/code] if the mode can't be used with this interface.
+ </description>
+ </method>
+ <method name="supports_play_area_mode">
+ <return type="bool" />
+ <argument index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
+ <description>
+ Call this to find out if a given play area mode is supported by this interface.
+ </description>
+ </method>
+ <method name="trigger_haptic_pulse">
+ <return type="void" />
+ <argument index="0" name="action_name" type="String" />
+ <argument index="1" name="tracker_name" type="StringName" />
+ <argument index="2" name="frequency" type="float" />
+ <argument index="3" name="amplitude" type="float" />
+ <argument index="4" name="duration_sec" type="float" />
+ <argument index="5" name="delay_sec" type="float" />
+ <description>
+ Triggers a haptic pulse on a device associated with this interface.
+ [code]action_name[/code] is the name of the action for this pulse.
+ [code]tracker_name[/code] is optional and can be used to direct the pulse to a specific device provided that device is bound to this haptic.
+ </description>
+ </method>
<method name="uninitialize">
<return type="void" />
<description>
@@ -77,7 +111,18 @@
<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>
+ <member name="xr_play_area_mode" type="int" setter="set_play_area_mode" getter="get_play_area_mode" enum="XRInterface.PlayAreaMode" default="0">
+ The play area mode for this interface.
+ </member>
</members>
+ <signals>
+ <signal name="play_area_changed">
+ <argument index="0" name="mode" type="int" />
+ <description>
+ Emitted when the play area is changed. This can be a result of the player resetting the boundary or entering a new play area, the player changing the play area mode, the world scale changing or the player resetting their headset orientation.
+ </description>
+ </signal>
+ </signals>
<constants>
<constant name="XR_NONE" value="0" enum="Capabilities">
No XR capabilities.
@@ -88,20 +133,17 @@
<constant name="XR_STEREO" value="2" enum="Capabilities">
This interface supports stereoscopic rendering.
</constant>
- <constant name="XR_AR" value="4" enum="Capabilities">
- 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_target_size]). Using a separate viewport node frees up the main viewport for other purposes.
+ <constant name="XR_QUAD" value="4" enum="Capabilities">
+ This interface supports quad rendering (not yet supported by Godot).
</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.
+ <constant name="XR_VR" value="8" enum="Capabilities">
+ this interface supports VR.
</constant>
- <constant name="EYE_LEFT" value="1" enum="Eyes">
- Left eye output, this is mostly used internally when rendering the image for the left eye and obtaining positioning and projection information.
+ <constant name="XR_AR" value="16" enum="Capabilities">
+ This interface supports AR (video background and real world tracking).
</constant>
- <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 name="XR_EXTERNAL" value="32" 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_target_size]). Using a separate viewport node frees up the main viewport for other purposes.
</constant>
<constant name="XR_NORMAL_TRACKING" value="0" enum="TrackingStatus">
Tracking is behaving as expected.
@@ -118,5 +160,20 @@
<constant name="XR_NOT_TRACKING" value="4" enum="TrackingStatus">
Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.).
</constant>
+ <constant name="XR_PLAY_AREA_UNKNOWN" value="0" enum="PlayAreaMode">
+ Play area mode not set or not available.
+ </constant>
+ <constant name="XR_PLAY_AREA_3DOF" value="1" enum="PlayAreaMode">
+ Play area only supports orientation tracking, no positional tracking, area will center around player.
+ </constant>
+ <constant name="XR_PLAY_AREA_SITTING" value="2" enum="PlayAreaMode">
+ Player is in seated position, limited positional tracking, fixed guardian around player.
+ </constant>
+ <constant name="XR_PLAY_AREA_ROOMSCALE" value="3" enum="PlayAreaMode">
+ Player is free to move around, full positional tracking.
+ </constant>
+ <constant name="XR_PLAY_AREA_STAGE" value="4" enum="PlayAreaMode">
+ Same as roomscale but origin point is fixed to the center of the physical space, XRServer.center_on_hmd disabled.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
index 84b46e0ddd..d2bb6aa59a 100644
--- a/doc/classes/XRInterfaceExtension.xml
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -41,6 +41,16 @@
<description>
</description>
</method>
+ <method name="_get_play_area" qualifiers="virtual const">
+ <return type="PackedVector3Array" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_play_area_mode" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
<method name="_get_projection_for_view" qualifiers="virtual">
<return type="PackedFloat64Array" />
<argument index="0" name="view" type="int" />
@@ -55,6 +65,17 @@
<description>
</description>
</method>
+ <method name="_get_suggested_pose_names" qualifiers="virtual const">
+ <return type="PackedStringArray" />
+ <argument index="0" name="tracker_name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_suggested_tracker_names" qualifiers="virtual const">
+ <return type="PackedStringArray" />
+ <description>
+ </description>
+ </method>
<method name="_get_tracking_status" qualifiers="virtual const">
<return type="int" />
<description>
@@ -99,6 +120,29 @@
<description>
</description>
</method>
+ <method name="_set_play_area_mode" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="mode" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_supports_play_area_mode" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
+ <description>
+ </description>
+ </method>
+ <method name="_trigger_haptic_pulse" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="action_name" type="String" />
+ <argument index="1" name="tracker_name" type="StringName" />
+ <argument index="2" name="frequency" type="float" />
+ <argument index="3" name="amplitude" type="float" />
+ <argument index="4" name="duration_sec" type="float" />
+ <argument index="5" name="delay_sec" type="float" />
+ <description>
+ </description>
+ </method>
<method name="_uninitialize" qualifiers="virtual">
<return type="void" />
<description>
diff --git a/doc/classes/XRNode3D.xml b/doc/classes/XRNode3D.xml
new file mode 100644
index 0000000000..2e6d11d729
--- /dev/null
+++ b/doc/classes/XRNode3D.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XRNode3D" inherits="Node3D" version="4.0">
+ <brief_description>
+ A spatial node that has its position automatically updated by the [XRServer].
+ </brief_description>
+ <description>
+ This node can be bound to a specific pose of a [XRPositionalTracker] and will automatically have its [member Node3D.transform] updated by the [XRServer]. Nodes of this type must be added as children of the [XROrigin3D] node.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_has_tracking_data" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the [member tracker] has current tracking data for the [member pose] being tracked.
+ </description>
+ </method>
+ <method name="get_is_active" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the [member tracker] has been registered and the [member pose] is being tracked.
+ </description>
+ </method>
+ <method name="get_pose">
+ <return type="XRPose" />
+ <description>
+ Returns the [XRPose] containing the current state of the pose being tracked. This gives access to additional properties of this pose.
+ </description>
+ </method>
+ <method name="trigger_haptic_pulse">
+ <return type="void" />
+ <argument index="0" name="action_name" type="String" />
+ <argument index="1" name="frequency" type="float" />
+ <argument index="2" name="amplitude" type="float" />
+ <argument index="3" name="duration_sec" type="float" />
+ <argument index="4" name="delay_sec" type="float" />
+ <description>
+ Triggers a haptic pulse on a device associated with this interface.
+ [code]action_name[/code] is the name of the action for this pulse.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="pose" type="StringName" setter="set_pose_name" getter="get_pose_name" default="&amp;&quot;default&quot;">
+ The name of the pose we're bound to. Which poses a tracker supports is not known during design time.
+ Godot defines number of standard pose names such as [code]aim[/code] and [code]grip[/code] but other may be configured within a given [XRInterface].
+ </member>
+ <member name="tracker" type="StringName" setter="set_tracker" getter="get_tracker" default="&amp;&quot;&quot;">
+ The name of the tracker we're bound to. Which trackers are available is not known during design time.
+ Godot defines a number of standard trackers such as [code]left_hand[/code] and [code]right_hand[/code] but others may be configured within a given [XRInterface].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/XRPose.xml b/doc/classes/XRPose.xml
new file mode 100644
index 0000000000..0de2bc9e48
--- /dev/null
+++ b/doc/classes/XRPose.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XRPose" inherits="RefCounted" version="4.0">
+ <brief_description>
+ This object contains all data related to a pose on a tracked object.
+ </brief_description>
+ <description>
+ XR runtimes often identify multiple locations on devices such as controllers that are spatially tracked.
+ Orientation, location, linear velocity and angular velocity are all provided for each pose by the XR runtime. This object contains this state of a pose.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_adjusted_transform" qualifiers="const">
+ <return type="Transform3D" />
+ <description>
+ Returns the [member transform] with world scale and our reference frame applied. This is the transform used to position [XRNode3D] objects.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)">
+ The angular velocity for this pose.
+ </member>
+ <member name="has_tracking_data" type="bool" setter="set_has_tracking_data" getter="get_has_tracking_data" default="false">
+ If [code]true[/code] our tracking data is up to date. If [code]false[/code] we're no longer receiving new tracking data and our state is whatever that last valid state was.
+ </member>
+ <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
+ The linear velocity of this pose.
+ </member>
+ <member name="name" type="StringName" setter="set_name" getter="get_name" default="&amp;&quot;&quot;">
+ The name of this pose. Pose names are often driven by an action map setup by the user. Godot does suggest a number of pose names that it expects [XRInterface]s to implement:
+ - [code]root[/code] defines a root location, often used for tracked objects that do not have further nodes.
+ - [code]aim[/code] defines the tip of a controller with the orientation pointing outwards, for instance: add your raycasts to this.
+ - [code]grip[/code] defines the location where the user grips the controller
+ - [code]skeleton[/code] defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime.
+ </member>
+ <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
+ The transform containing the original and transform as reported by the XR runtime.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index d231bfde74..bd6a518835 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -5,86 +5,113 @@
</brief_description>
<description>
An instance of this object represents a device that is tracked, such as a controller or anchor point. HMDs aren't represented here as they are handled internally.
- As controllers are turned on and the AR/VR interface detects them, instances of this object are automatically added to this list of active tracking objects accessible through the [XRServer].
- The [XRController3D] and [XRAnchor3D] both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDNative-based interfaces can interact with them.
+ As controllers are turned on and the [XRInterface] detects them, instances of this object are automatically added to this list of active tracking objects accessible through the [XRServer].
+ The [XRController3D] and [XRAnchor3D] both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDExtension-based interfaces can interact with them.
</description>
<tutorials>
<link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
- <method name="get_joy_id" qualifiers="const">
- <return type="int" />
+ <method name="get_input" qualifiers="const">
+ <return type="Variant" />
+ <argument index="0" name="name" type="StringName" />
<description>
- If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID.
+ Returns an input for this tracker. It can return a boolean, float or [Vector2] value depending on whether the input is a button, trigger or thumbstick/thumbpad.
</description>
</method>
- <method name="get_mesh" qualifiers="const">
- <return type="Mesh" />
+ <method name="get_pose" qualifiers="const">
+ <return type="XRPose" />
+ <argument index="0" name="name" type="StringName" />
<description>
- Returns the mesh related to a controller or anchor point if one is available.
+ Returns the current [XRPose] state object for the bound [code]pose[/code].
</description>
</method>
- <method name="get_orientation" qualifiers="const">
- <return type="Basis" />
+ <method name="has_pose" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="name" type="StringName" />
<description>
- Returns the controller's orientation matrix.
+ Returns [code]true[/code] if the bound [code]tracker[/code] is available and is currently tracking the bound [code]pose[/code].
</description>
</method>
- <method name="get_position" qualifiers="const">
- <return type="Vector3" />
+ <method name="invalidate_pose">
+ <return type="void" />
+ <argument index="0" name="name" type="StringName" />
<description>
- Returns the world-space controller position.
+ Marks this pose as invalid, we don't clear the last reported state but it allows users to decide if trackers need to be hidden if we loose tracking or just remain at their last known position.
</description>
</method>
- <method name="get_tracker_hand" qualifiers="const">
- <return type="int" enum="XRPositionalTracker.TrackerHand" />
+ <method name="set_input">
+ <return type="void" />
+ <argument index="0" name="name" type="StringName" />
+ <argument index="1" name="value" type="Variant" />
<description>
- Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
+ Changes the value for the given input. This method is called by a [XRInterface] implementation and should not be used directly.
</description>
</method>
- <method name="get_tracker_id" qualifiers="const">
- <return type="int" />
+ <method name="set_pose">
+ <return type="void" />
+ <argument index="0" name="name" type="StringName" />
+ <argument index="1" name="transform" type="Transform3D" />
+ <argument index="2" name="linear_velocity" type="Vector3" />
+ <argument index="3" name="angular_velocity" type="Vector3" />
<description>
- Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the [XRController3D] and [XRAnchor3D] nodes.
+ Sets the transform, linear velocity and angular velocity for the given pose. This method is called by a [XRInterface] implementation and should not be used directly.
</description>
</method>
- <method name="get_tracker_name" qualifiers="const">
- <return type="StringName" />
+ </methods>
+ <members>
+ <member name="description" type="String" setter="set_tracker_desc" getter="get_tracker_desc" default="&quot;&quot;">
+ The description of this tracker.
+ </member>
+ <member name="hand" type="int" setter="set_tracker_hand" getter="get_tracker_hand" enum="XRPositionalTracker.TrackerHand" default="0">
+ Defines which hand this tracker relates to.
+ </member>
+ <member name="name" type="StringName" setter="set_tracker_name" getter="get_tracker_name" default="&amp;&quot;Unknown&quot;">
+ The unique name of this tracker. The trackers that are available differ between various XR runtimes and can often be configured by the user. Godot maintains a number of reserved names that it expects the [XRInterface] to implement if applicable:
+ - [code]left_hand[/code] identifies the controller held in the players left hand
+ - [code]right_hand[/code] identifies the controller held in the players right hand
+ </member>
+ <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
+ The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code].
+ </member>
+ <member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" enum="XRServer.TrackerType" default="128">
+ The type of tracker.
+ </member>
+ </members>
+ <signals>
+ <signal name="button_pressed">
+ <argument index="0" name="name" type="String" />
<description>
- Returns the controller or anchor point's name, if applicable.
+ Emitted when a button on this tracker is pressed. Note that many XR runtimes allow other inputs to be mapped to buttons.
</description>
- </method>
- <method name="get_tracker_type" qualifiers="const">
- <return type="int" enum="XRServer.TrackerType" />
+ </signal>
+ <signal name="button_released">
+ <argument index="0" name="name" type="String" />
<description>
- Returns the tracker's type, which will be one of the values from the [enum XRServer.TrackerType] enum.
+ Emitted when a button on this tracker is released.
</description>
- </method>
- <method name="get_transform" qualifiers="const">
- <return type="Transform3D" />
- <argument index="0" name="adjust_by_reference_frame" type="bool" />
+ </signal>
+ <signal name="input_axis_changed">
+ <argument index="0" name="name" type="String" />
+ <argument index="1" name="vector" type="Vector2" />
<description>
- Returns the transform combining this device's orientation and position.
+ Emitted when a thumbstick or thumbpad on this tracker moves.
</description>
- </method>
- <method name="is_tracking_orientation" qualifiers="const">
- <return type="bool" />
+ </signal>
+ <signal name="input_value_changed">
+ <argument index="0" name="name" type="String" />
+ <argument index="1" name="value" type="float" />
<description>
- Returns [code]true[/code] if this device is tracking orientation.
+ Emitted when a trigger or similar input on this tracker changes value.
</description>
- </method>
- <method name="is_tracking_position" qualifiers="const">
- <return type="bool" />
+ </signal>
+ <signal name="pose_changed">
+ <argument index="0" name="pose" type="XRPose" />
<description>
- Returns [code]true[/code] if this device is tracking position.
+ Emitted when the state of a pose tracked by this tracker changes.
</description>
- </method>
- </methods>
- <members>
- <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
- The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code].
- </member>
- </members>
+ </signal>
+ </signals>
<constants>
<constant name="TRACKER_HAND_UNKNOWN" value="0" enum="TrackerHand">
The hand this tracker is held in is unknown or not applicable.
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 0929094fd1..87164ebb52 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -90,20 +90,21 @@
<method name="get_reference_frame" qualifiers="const">
<return type="Transform3D" />
<description>
- Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces.
+ Returns the reference frame transform. Mostly used internally and exposed for GDExtension build interfaces.
</description>
</method>
<method name="get_tracker" qualifiers="const">
<return type="XRPositionalTracker" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="tracker_name" type="StringName" />
<description>
- Returns the positional tracker at the given ID.
+ Returns the positional tracker with this name.
</description>
</method>
- <method name="get_tracker_count" qualifiers="const">
- <return type="int" />
+ <method name="get_trackers">
+ <return type="Dictionary" />
+ <argument index="0" name="tracker_types" type="int" />
<description>
- Returns the number of trackers currently registered.
+ Returns a dictionary of trackers for this type.
</description>
</method>
<method name="remove_interface">
@@ -145,7 +146,6 @@
<signal name="tracker_added">
<argument index="0" name="tracker_name" type="StringName" />
<argument index="1" name="type" type="int" />
- <argument index="2" name="id" type="int" />
<description>
Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using [XRAnchor3D]s for an AR solution, it is important to react to this signal to add the appropriate [XRController3D] or [XRAnchor3D] nodes related to this new tracker.
</description>
@@ -153,20 +153,29 @@
<signal name="tracker_removed">
<argument index="0" name="tracker_name" type="StringName" />
<argument index="1" name="type" type="int" />
- <argument index="2" name="id" type="int" />
<description>
Emitted when a tracker is removed. You should remove any [XRController3D] or [XRAnchor3D] points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one).
</description>
</signal>
+ <signal name="tracker_updated">
+ <argument index="0" name="tracker_name" type="StringName" />
+ <argument index="1" name="type" type="int" />
+ <description>
+ Emitted when an existing tracker has been updated. This can happen if the user switches controllers.
+ </description>
+ </signal>
</signals>
<constants>
- <constant name="TRACKER_CONTROLLER" value="1" enum="TrackerType">
+ <constant name="TRACKER_HEAD" value="1" enum="TrackerType">
+ The tracker tracks the location of the players head. This is usually a location centered between the players eyes. Note that for handheld AR devices this can be the current location of the device.
+ </constant>
+ <constant name="TRACKER_CONTROLLER" value="2" enum="TrackerType">
The tracker tracks the location of a controller.
</constant>
- <constant name="TRACKER_BASESTATION" value="2" enum="TrackerType">
+ <constant name="TRACKER_BASESTATION" value="4" enum="TrackerType">
The tracker tracks the location of a base station.
</constant>
- <constant name="TRACKER_ANCHOR" value="4" enum="TrackerType">
+ <constant name="TRACKER_ANCHOR" value="8" enum="TrackerType">
The tracker tracks the location and size of an AR anchor.
</constant>
<constant name="TRACKER_ANY_KNOWN" value="127" enum="TrackerType">