summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml32
-rw-r--r--doc/classes/AABB.xml34
-rw-r--r--doc/classes/AStar.xml12
-rw-r--r--doc/classes/AStar2D.xml12
-rw-r--r--doc/classes/AnimatedSprite2D.xml2
-rw-r--r--doc/classes/AnimatedSprite3D.xml2
-rw-r--r--doc/classes/Animation.xml29
-rw-r--r--doc/classes/AnimationNode.xml2
-rw-r--r--doc/classes/AnimationNodeAdd2.xml2
-rw-r--r--doc/classes/AnimationNodeAdd3.xml2
-rw-r--r--doc/classes/AnimationNodeAnimation.xml2
-rw-r--r--doc/classes/AnimationNodeBlend2.xml2
-rw-r--r--doc/classes/AnimationNodeBlend3.xml2
-rw-r--r--doc/classes/AnimationNodeBlendSpace1D.xml2
-rw-r--r--doc/classes/AnimationNodeBlendSpace2D.xml2
-rw-r--r--doc/classes/AnimationNodeBlendTree.xml2
-rw-r--r--doc/classes/AnimationNodeOneShot.xml2
-rw-r--r--doc/classes/AnimationNodeOutput.xml2
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml2
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml2
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml4
-rw-r--r--doc/classes/AnimationNodeTimeScale.xml2
-rw-r--r--doc/classes/AnimationNodeTimeSeek.xml2
-rw-r--r--doc/classes/AnimationNodeTransition.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml4
-rw-r--r--doc/classes/AnimationTree.xml2
-rw-r--r--doc/classes/Area2D.xml29
-rw-r--r--doc/classes/Area3D.xml27
-rw-r--r--doc/classes/Array.xml24
-rw-r--r--doc/classes/ArrayMesh.xml2
-rw-r--r--doc/classes/AudioEffectDistortion.xml2
-rw-r--r--doc/classes/AudioEffectFilter.xml2
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectRecord.xml2
-rw-r--r--doc/classes/AudioServer.xml2
-rw-r--r--doc/classes/AudioStream.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml2
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml2
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml2
-rw-r--r--doc/classes/BaseButton.xml2
-rw-r--r--doc/classes/BaseMaterial3D.xml5
-rw-r--r--doc/classes/Basis.xml13
-rw-r--r--doc/classes/Button.xml1
-rw-r--r--doc/classes/CPUParticles2D.xml2
-rw-r--r--doc/classes/Camera3D.xml4
-rw-r--r--doc/classes/CanvasItem.xml4
-rw-r--r--doc/classes/CanvasLayer.xml4
-rw-r--r--doc/classes/CharFXTransform.xml2
-rw-r--r--doc/classes/CharacterBody2D.xml4
-rw-r--r--doc/classes/CharacterBody3D.xml2
-rw-r--r--doc/classes/CollisionObject2D.xml4
-rw-r--r--doc/classes/CollisionObject3D.xml4
-rw-r--r--doc/classes/CollisionShape2D.xml2
-rw-r--r--doc/classes/CollisionShape3D.xml2
-rw-r--r--doc/classes/Color.xml33
-rw-r--r--doc/classes/Control.xml20
-rw-r--r--doc/classes/Dictionary.xml2
-rw-r--r--doc/classes/DirectionalLight3D.xml2
-rw-r--r--doc/classes/Directory.xml2
-rw-r--r--doc/classes/DisplayServer.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml10
-rw-r--r--doc/classes/EditorInspectorPlugin.xml19
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml2
-rw-r--r--doc/classes/EditorPaths.xml30
-rw-r--r--doc/classes/EditorPlugin.xml2
-rw-r--r--doc/classes/EditorSceneFormatImporter.xml13
-rw-r--r--doc/classes/EditorScenePostImport.xml2
-rw-r--r--doc/classes/EditorScenePostImportPlugin.xml4
-rw-r--r--doc/classes/Engine.xml2
-rw-r--r--doc/classes/Environment.xml7
-rw-r--r--doc/classes/File.xml4
-rw-r--r--doc/classes/FontData.xml13
-rw-r--r--doc/classes/GPUParticles2D.xml2
-rw-r--r--doc/classes/GPUParticles3D.xml2
-rw-r--r--doc/classes/GeometryInstance3D.xml12
-rw-r--r--doc/classes/GraphEdit.xml2
-rw-r--r--doc/classes/GraphNode.xml4
-rw-r--r--doc/classes/HTTPClient.xml4
-rw-r--r--doc/classes/HTTPRequest.xml4
-rw-r--r--doc/classes/Image.xml14
-rw-r--r--doc/classes/ImageTexture.xml2
-rw-r--r--doc/classes/Input.xml11
-rw-r--r--doc/classes/InputEvent.xml4
-rw-r--r--doc/classes/InputEventAction.xml2
-rw-r--r--doc/classes/InputEventJoypadButton.xml2
-rw-r--r--doc/classes/InputEventJoypadMotion.xml2
-rw-r--r--doc/classes/InputEventKey.xml6
-rw-r--r--doc/classes/InputEventMouse.xml4
-rw-r--r--doc/classes/InputEventMouseButton.xml2
-rw-r--r--doc/classes/InputEventMouseMotion.xml2
-rw-r--r--doc/classes/InputEventScreenDrag.xml2
-rw-r--r--doc/classes/InputEventScreenTouch.xml2
-rw-r--r--doc/classes/InputEventWithModifiers.xml2
-rw-r--r--doc/classes/InputMap.xml2
-rw-r--r--doc/classes/JNISingleton.xml2
-rw-r--r--doc/classes/JavaScript.xml4
-rw-r--r--doc/classes/Light2D.xml2
-rw-r--r--doc/classes/Light3D.xml2
-rw-r--r--doc/classes/LightOccluder2D.xml2
-rw-r--r--doc/classes/LightmapGI.xml4
-rw-r--r--doc/classes/Line2D.xml2
-rw-r--r--doc/classes/MeshInstance2D.xml2
-rw-r--r--doc/classes/MultiMesh.xml4
-rw-r--r--doc/classes/MultiMeshInstance3D.xml6
-rw-r--r--doc/classes/MultiplayerPeer.xml2
-rw-r--r--doc/classes/Mutex.xml2
-rw-r--r--doc/classes/NavigationPolygon.xml4
-rw-r--r--doc/classes/Node.xml33
-rw-r--r--doc/classes/Node2D.xml2
-rw-r--r--doc/classes/Node3D.xml2
-rw-r--r--doc/classes/OS.xml19
-rw-r--r--doc/classes/Object.xml7
-rw-r--r--doc/classes/OmniLight3D.xml2
-rw-r--r--doc/classes/PCKPacker.xml4
-rw-r--r--doc/classes/PackedByteArray.xml2
-rw-r--r--doc/classes/PackedColorArray.xml2
-rw-r--r--doc/classes/PackedFloat32Array.xml2
-rw-r--r--doc/classes/PackedFloat64Array.xml2
-rw-r--r--doc/classes/PackedInt32Array.xml2
-rw-r--r--doc/classes/PackedInt64Array.xml2
-rw-r--r--doc/classes/PackedScene.xml4
-rw-r--r--doc/classes/PackedStringArray.xml2
-rw-r--r--doc/classes/PackedVector2Array.xml2
-rw-r--r--doc/classes/PackedVector3Array.xml2
-rw-r--r--doc/classes/PhysicalSkyMaterial.xml4
-rw-r--r--doc/classes/PhysicsBody2D.xml8
-rw-r--r--doc/classes/PhysicsBody3D.xml8
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml4
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml4
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml6
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml6
-rw-r--r--doc/classes/PhysicsPointQueryParameters2D.xml2
-rw-r--r--doc/classes/PhysicsPointQueryParameters3D.xml2
-rw-r--r--doc/classes/PhysicsRayQueryParameters2D.xml5
-rw-r--r--doc/classes/PhysicsRayQueryParameters3D.xml8
-rw-r--r--doc/classes/PhysicsServer2D.xml46
-rw-r--r--doc/classes/PhysicsServer3D.xml62
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryParameters3D.xml2
-rw-r--r--doc/classes/Plane.xml8
-rw-r--r--doc/classes/PopupMenu.xml18
-rw-r--r--doc/classes/ProjectSettings.xml51
-rw-r--r--doc/classes/Quaternion.xml17
-rw-r--r--doc/classes/RandomNumberGenerator.xml2
-rw-r--r--doc/classes/RayCast2D.xml9
-rw-r--r--doc/classes/RayCast3D.xml9
-rw-r--r--doc/classes/Rect2.xml32
-rw-r--r--doc/classes/Rect2i.xml26
-rw-r--r--doc/classes/RefCounted.xml2
-rw-r--r--doc/classes/ReferenceRect.xml2
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RenderingServer.xml43
-rw-r--r--doc/classes/Resource.xml4
-rw-r--r--doc/classes/ResourceImporter.xml2
-rw-r--r--doc/classes/RichTextEffect.xml2
-rw-r--r--doc/classes/RichTextLabel.xml2
-rw-r--r--doc/classes/RigidDynamicBody3D.xml2
-rw-r--r--doc/classes/RootMotionView.xml2
-rw-r--r--doc/classes/SceneTree.xml4
-rw-r--r--doc/classes/Script.xml2
-rw-r--r--doc/classes/Semaphore.xml2
-rw-r--r--doc/classes/Shader.xml6
-rw-r--r--doc/classes/ShaderMaterial.xml2
-rw-r--r--doc/classes/Shape2D.xml2
-rw-r--r--doc/classes/Shape3D.xml2
-rw-r--r--doc/classes/ShapeCast2D.xml157
-rw-r--r--doc/classes/Skeleton2D.xml2
-rw-r--r--doc/classes/SkeletonModification3DTwoBoneIK.xml2
-rw-r--r--doc/classes/SoftDynamicBody3D.xml6
-rw-r--r--doc/classes/SpotLight3D.xml2
-rw-r--r--doc/classes/SpringArm3D.xml2
-rw-r--r--doc/classes/Sprite3D.xml5
-rw-r--r--doc/classes/SpriteBase3D.xml3
-rw-r--r--doc/classes/StandardMaterial3D.xml2
-rw-r--r--doc/classes/StreamPeerSSL.xml2
-rw-r--r--doc/classes/String.xml2
-rw-r--r--doc/classes/SubViewport.xml4
-rw-r--r--doc/classes/TabContainer.xml3
-rw-r--r--doc/classes/TextEdit.xml36
-rw-r--r--doc/classes/TextServer.xml8
-rw-r--r--doc/classes/TextServerExtension.xml8
-rw-r--r--doc/classes/Theme.xml2
-rw-r--r--doc/classes/Thread.xml4
-rw-r--r--doc/classes/TileMap.xml2
-rw-r--r--doc/classes/TileSet.xml2
-rw-r--r--doc/classes/TileSetAtlasSource.xml19
-rw-r--r--doc/classes/Transform2D.xml21
-rw-r--r--doc/classes/Transform3D.xml26
-rw-r--r--doc/classes/Translation.xml4
-rw-r--r--doc/classes/TranslationServer.xml6
-rw-r--r--doc/classes/Variant.xml2
-rw-r--r--doc/classes/Vector2.xml49
-rw-r--r--doc/classes/Vector2i.xml47
-rw-r--r--doc/classes/Vector3.xml66
-rw-r--r--doc/classes/Vector3i.xml47
-rw-r--r--doc/classes/Viewport.xml44
-rw-r--r--doc/classes/VisualShaderNode.xml2
-rw-r--r--doc/classes/VisualShaderNodeCustom.xml8
-rw-r--r--doc/classes/VisualShaderNodeInput.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleMeshEmitter.xml17
-rw-r--r--doc/classes/VoxelGI.xml12
-rw-r--r--doc/classes/VoxelGIData.xml12
-rw-r--r--doc/classes/Window.xml8
-rw-r--r--doc/classes/World2D.xml2
-rw-r--r--doc/classes/World3D.xml2
-rw-r--r--doc/classes/WorldEnvironment.xml2
-rw-r--r--doc/classes/XRCamera3D.xml2
-rw-r--r--doc/classes/XRController3D.xml2
-rw-r--r--doc/classes/XRInterface.xml2
-rw-r--r--doc/classes/XROrigin3D.xml2
-rw-r--r--doc/classes/XRPositionalTracker.xml2
-rw-r--r--doc/classes/XRServer.xml2
-rw-r--r--doc/classes/float.xml31
-rw-r--r--doc/classes/int.xml34
215 files changed, 1353 insertions, 509 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 345a769ca5..41cc043a74 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="@GlobalScope" version="4.0">
<brief_description>
- Global scope constants and variables.
+ Global scope constants and functions.
</brief_description>
<description>
- Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.
+ A list of global scope enumerated constants and built-in functions. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.
Singletons are also documented here, since they can be accessed from anywhere.
+ For the entries related to GDScript which can be accessed in any script see [@GDScript].
</description>
<tutorials>
+ <link title="Random number generation">$DOCS_URL/tutorials/math/random_number_generation.html</link>
</tutorials>
<methods>
<method name="abs">
@@ -248,9 +250,9 @@
- 1.0: Linear
- Between -1.0 and 0.0 (exclusive): Ease out-in
- 0.0: Constant
- - Between 0.0 to 1.0 (exclusive): Ease in
+ - Between 0.0 to 1.0 (exclusive): Ease out
- 1.0: Linear
- - Greater than 1.0 (exclusive): Ease out
+ - Greater than 1.0 (exclusive): Ease in
[/codeblock]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
See also [method smoothstep]. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer].
@@ -723,6 +725,14 @@
[/codeblock]
</description>
</method>
+ <method name="randfn">
+ <return type="float" />
+ <argument index="0" name="mean" type="float" />
+ <argument index="1" name="deviation" type="float" />
+ <description>
+ Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution.
+ </description>
+ </method>
<method name="randi">
<return type="int" />
<description>
@@ -1251,7 +1261,7 @@
<constant name="INLINE_ALIGN_BOTTOM" value="14" enum="InlineAlign">
Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equvalent to [code]INLINE_ALIGN_BOTTOM_TO | INLINE_ALIGN_TO_BOTTOM[/code].
</constant>
- <constant name="SPKEY" value="16777216">
+ <constant name="KEY_SPECIAL" value="16777216" enum="Key">
Keycodes with this bit applied are non-printable.
</constant>
<constant name="KEY_ESCAPE" value="16777217" enum="Key">
@@ -2016,12 +2026,6 @@
<constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="MouseButton">
Middle mouse button.
</constant>
- <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton">
- Extra mouse button 1 (only present on some mice).
- </constant>
- <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton">
- Extra mouse button 2 (only present on some mice).
- </constant>
<constant name="MOUSE_BUTTON_WHEEL_UP" value="4" enum="MouseButton">
Mouse wheel up.
</constant>
@@ -2034,6 +2038,12 @@
<constant name="MOUSE_BUTTON_WHEEL_RIGHT" value="7" enum="MouseButton">
Mouse wheel right button (only present on some mice).
</constant>
+ <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton">
+ Extra mouse button 1 (only present on some mice).
+ </constant>
+ <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton">
+ Extra mouse button 2 (only present on some mice).
+ </constant>
<constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton">
Left mouse button mask.
</constant>
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index f353cd19b8..bdf8a78dc3 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -6,12 +6,13 @@
<description>
[AABB] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
It uses floating-point coordinates. The 2D counterpart to [AABB] is [Rect2].
+ Negative values for [member size] are not supported and will not work for most methods. Use [method abs] to get an AABB with a positive size.
[b]Note:[/b] Unlike [Rect2], [AABB] does not have a variant that uses integer coordinates.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
- <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.html</link>
</tutorials>
<constructors>
<constructor name="AABB">
@@ -54,7 +55,22 @@
<return type="AABB" />
<argument index="0" name="to_point" type="Vector3" />
<description>
- Returns this [AABB] expanded to include a given point.
+ Returns a copy of this [AABB] expanded to include a given point.
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
+ # position (-3, 2, 0), size (1, 1, 1)
+ var box = AABB(Vector3(-3, 2, 0), Vector3(1, 1, 1))
+ # position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)
+ var box2 = box.expand(Vector3(0, -1, 2))
+ [/gdscript]
+ [csharp]
+ // position (-3, 2, 0), size (1, 1, 1)
+ var box = new AABB(new Vector3(-3, 2, 0), new Vector3(1, 1, 1));
+ // position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)
+ var box2 = box.Expand(new Vector3(0, -1, 2));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_center" qualifiers="const">
@@ -142,14 +158,15 @@
<return type="bool" />
<argument index="0" name="point" type="Vector3" />
<description>
- Returns [code]true[/code] if the [AABB] contains a point.
+ Returns [code]true[/code] if the [AABB] contains a point. Points on the faces of the AABB are considered included, though float-point precision errors may impact the accuracy of such checks.
+ [b]Note:[/b] This method is not reliable for [AABB] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent [AABB] to check for contained points.
</description>
</method>
<method name="intersection" qualifiers="const">
<return type="AABB" />
<argument index="0" name="with" type="AABB" />
<description>
- Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure.
+ Returns the intersection between two [AABB]. An empty AABB (size [code](0, 0, 0)[/code]) is returned on failure.
</description>
</method>
<method name="intersects" qualifiers="const">
@@ -218,12 +235,15 @@
<return type="bool" />
<argument index="0" name="right" type="AABB" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="AABB" />
<argument index="0" name="right" type="Transform3D" />
<description>
+ Inversely transforms (multiplies) the [AABB] by the given [Transform3D] transformation matrix.
</description>
</operator>
<operator name="operator ==">
@@ -235,6 +255,8 @@
<return type="bool" />
<argument index="0" name="right" type="AABB" />
<description>
+ Returns [code]true[/code] if the AABBs are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
</operators>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 11c0fc33b8..bbb5f6b8e3 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -244,6 +244,12 @@
Returns the number of points currently in the points pool.
</description>
</method>
+ <method name="get_point_ids">
+ <return type="Array" />
+ <description>
+ Returns an array of all point IDs.
+ </description>
+ </method>
<method name="get_point_path">
<return type="PackedVector3Array" />
<argument index="0" name="from_id" type="int" />
@@ -267,12 +273,6 @@
Returns the weight scale of the point associated with the given [code]id[/code].
</description>
</method>
- <method name="get_points">
- <return type="Array" />
- <description>
- Returns an array of all points.
- </description>
- </method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 43e7d59665..dc821ebb8b 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -215,6 +215,12 @@
Returns the number of points currently in the points pool.
</description>
</method>
+ <method name="get_point_ids">
+ <return type="Array" />
+ <description>
+ Returns an array of all point IDs.
+ </description>
+ </method>
<method name="get_point_path">
<return type="PackedVector2Array" />
<argument index="0" name="from_id" type="int" />
@@ -238,12 +244,6 @@
Returns the weight scale of the point associated with the given [code]id[/code].
</description>
</method>
- <method name="get_points">
- <return type="Array" />
- <description>
- Returns an array of all points.
- </description>
- </method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml
index b468e1d109..789c6bd960 100644
--- a/doc/classes/AnimatedSprite2D.xml
+++ b/doc/classes/AnimatedSprite2D.xml
@@ -8,7 +8,7 @@
[b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps.
</description>
<tutorials>
- <link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
+ <link title="2D Sprite animation">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index 59d7553ef4..38a87c1b2b 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -7,7 +7,7 @@
Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
</description>
<tutorials>
- <link title="2D Sprite animation (also applies to 3D)">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
+ <link title="2D Sprite animation (also applies to 3D)">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link>
</tutorials>
<methods>
<method name="is_playing" qualifiers="const">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index dca943dec6..bb4089d67e 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -28,7 +28,7 @@
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types.
</description>
<tutorials>
- <link title="Animation documentation index">https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link>
+ <link title="Animation documentation index">$DOCS_URL/tutorials/animation/index.html</link>
</tutorials>
<methods>
<method name="add_track">
@@ -130,6 +130,14 @@
Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
+ <method name="bezier_track_get_key_handle_mode" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="track_idx" type="int" />
+ <argument index="1" name="key_idx" type="int" />
+ <description>
+ Returns the handle mode of the key identified by [code]index[/code]. See [enum HandleMode] for possible values. The [code]track_idx[/code] must be the index of a Bezier Track.
+ </description>
+ </method>
<method name="bezier_track_get_key_in_handle" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="track_idx" type="int" />
@@ -161,6 +169,7 @@
<argument index="2" name="value" type="float" />
<argument index="3" name="in_handle" type="Vector2" default="Vector2(0, 0)" />
<argument index="4" name="out_handle" type="Vector2" default="Vector2(0, 0)" />
+ <argument index="5" name="handle_mode" type="int" enum="Animation.HandleMode" default="1" />
<description>
Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track.
[code]in_handle[/code] is the left-side weight of the added Bezier curve point, [code]out_handle[/code] is the right-side one, while [code]value[/code] is the actual value at this point.
@@ -174,11 +183,22 @@
Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
+ <method name="bezier_track_set_key_handle_mode">
+ <return type="void" />
+ <argument index="0" name="track_idx" type="int" />
+ <argument index="1" name="key_idx" type="int" />
+ <argument index="2" name="key_handle_mode" type="int" enum="Animation.HandleMode" />
+ <argument index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
+ <description>
+ Changes the handle mode of the keyframe at the given [code]index[/code]. See [enum HandleMode] for possible values. The [code]track_idx[/code] must be the index of a Bezier Track.
+ </description>
+ </method>
<method name="bezier_track_set_key_in_handle">
<return type="void" />
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="in_handle" type="Vector2" />
+ <argument index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
<description>
Sets the in handle of the key identified by [code]key_idx[/code] to value [code]in_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
@@ -188,6 +208,7 @@
<argument index="0" name="track_idx" type="int" />
<argument index="1" name="key_idx" type="int" />
<argument index="2" name="out_handle" type="Vector2" />
+ <argument index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
<description>
Sets the out handle of the key identified by [code]key_idx[/code] to value [code]out_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
@@ -619,5 +640,11 @@
<constant name="LOOP_PINGPONG" value="2" enum="LoopMode">
Repeats playback and reverse playback at both ends of the animation.
</constant>
+ <constant name="HANDLE_MODE_FREE" value="0" enum="HandleMode">
+ Assigning the free handle mode to a Bezier Track's keyframe allows you to edit the keyframe's left and right handles independently from one another.
+ </constant>
+ <constant name="HANDLE_MODE_BALANCED" value="1" enum="HandleMode">
+ Assigning the balanced handle mode to a Bezier Track's keyframe makes it so the two handles of the keyframe always stay aligned when changing either the keyframe's left or right handle.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index 6bc44ea0a0..c9d8ae9936 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -8,7 +8,7 @@
Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="_get_caption" qualifiers="virtual const">
diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml
index 20ee33209b..472f98a5b3 100644
--- a/doc/classes/AnimationNodeAdd2.xml
+++ b/doc/classes/AnimationNodeAdd2.xml
@@ -7,7 +7,7 @@
A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml
index 26738499bb..9ba4023b79 100644
--- a/doc/classes/AnimationNodeAdd3.xml
+++ b/doc/classes/AnimationNodeAdd3.xml
@@ -11,7 +11,7 @@
- A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<members>
diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml
index 076e675007..3df92ad3d3 100644
--- a/doc/classes/AnimationNodeAnimation.xml
+++ b/doc/classes/AnimationNodeAnimation.xml
@@ -7,7 +7,7 @@
A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml
index 1f7a4c91c8..3b869bc299 100644
--- a/doc/classes/AnimationNodeBlend2.xml
+++ b/doc/classes/AnimationNodeBlend2.xml
@@ -7,7 +7,7 @@
A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml
index ed827e2535..ae8fce51f2 100644
--- a/doc/classes/AnimationNodeBlend3.xml
+++ b/doc/classes/AnimationNodeBlend3.xml
@@ -11,7 +11,7 @@
- A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml
index 6e55a79fd2..831542b64c 100644
--- a/doc/classes/AnimationNodeBlendSpace1D.xml
+++ b/doc/classes/AnimationNodeBlendSpace1D.xml
@@ -10,7 +10,7 @@
You can set the extents of the axis using the [member min_space] and [member max_space].
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_blend_point">
diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml
index 8d51f9aecc..77d1d872e5 100644
--- a/doc/classes/AnimationNodeBlendSpace2D.xml
+++ b/doc/classes/AnimationNodeBlendSpace2D.xml
@@ -9,7 +9,7 @@
You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml
index da532dc059..a9f1f7acaa 100644
--- a/doc/classes/AnimationNodeBlendTree.xml
+++ b/doc/classes/AnimationNodeBlendTree.xml
@@ -7,7 +7,7 @@
This node may contain a sub-tree of any other blend type nodes, such as mix, blend2, blend3, one shot, etc. This is one of the most commonly used roots.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_node">
diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml
index 2ecc0ae07b..116b54e39e 100644
--- a/doc/classes/AnimationNodeOneShot.xml
+++ b/doc/classes/AnimationNodeOneShot.xml
@@ -7,7 +7,7 @@
A resource to add to an [AnimationNodeBlendTree]. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml
index 34c96d13ea..6241a0fa49 100644
--- a/doc/classes/AnimationNodeOutput.xml
+++ b/doc/classes/AnimationNodeOutput.xml
@@ -6,7 +6,7 @@
<description>
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml
index 17ef565b3a..5adea7308d 100644
--- a/doc/classes/AnimationNodeStateMachine.xml
+++ b/doc/classes/AnimationNodeStateMachine.xml
@@ -18,7 +18,7 @@
[/codeblocks]
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="add_node">
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index 15c6c96302..b299f8654a 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -18,7 +18,7 @@
[/codeblocks]
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
<method name="get_current_length" qualifiers="const">
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index 763bba6e93..948e3506a9 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -5,11 +5,11 @@
<description>
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
<members>
<member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="&amp;&quot;&quot;">
- Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
+ Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=$DOCS_URL/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
[codeblocks]
[gdscript]
$animation_tree.set("parameters/conditions/idle", is_on_floor and (linear_velocity.x == 0))
diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml
index 5b40b39bca..33e0127a52 100644
--- a/doc/classes/AnimationNodeTimeScale.xml
+++ b/doc/classes/AnimationNodeTimeScale.xml
@@ -7,7 +7,7 @@
Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
</class>
diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml
index d927c663c8..868319272e 100644
--- a/doc/classes/AnimationNodeTimeSeek.xml
+++ b/doc/classes/AnimationNodeTimeSeek.xml
@@ -27,6 +27,6 @@
[/codeblocks]
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml
index b297832ac0..48961f51a5 100644
--- a/doc/classes/AnimationNodeTransition.xml
+++ b/doc/classes/AnimationNodeTransition.xml
@@ -7,7 +7,7 @@
Simple state machine for cases which don't require a more advanced [AnimationNodeStateMachine]. Animations can be connected to the inputs and transition times can be specified.
</description>
<tutorials>
- <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 2fd923df85..9f68edbc92 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -9,8 +9,8 @@
Updating the target properties of animations occurs at process time.
</description>
<tutorials>
- <link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
- <link title="Animation documentation index">https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link>
+ <link title="2D Sprite animation">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link>
+ <link title="Animation documentation index">$DOCS_URL/tutorials/animation/index.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index 40dcd950d7..48c5398074 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -8,7 +8,7 @@
[b]Note:[/b] When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
</description>
<tutorials>
- <link title="Using AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index c6a3f87042..0f7e6799be 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -7,7 +7,7 @@
2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus.
</description>
<tutorials>
- <link title="Using Area2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link>
+ <link title="Using Area2D">$DOCS_URL/tutorials/physics/using_area_2d.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
@@ -50,6 +50,9 @@
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping.
</member>
+ <member name="angular_damp_space_override" type="int" setter="set_angular_damp_space_override_mode" getter="get_angular_damp_space_override_mode" enum="Area2D.SpaceOverride" default="0">
+ Override mode for angular damping calculations within this area. See [enum SpaceOverride] for possible values.
+ </member>
<member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&amp;&quot;Master&quot;">
The name of the area's audio bus.
</member>
@@ -57,21 +60,30 @@
If [code]true[/code], the area's audio bus overrides the default audio bus.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="980.0">
- The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
+ The area's gravity intensity (in pixels per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction.
</member>
- <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
- The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
+ <member name="gravity_direction" type="Vector2" setter="set_gravity_direction" getter="get_gravity_direction" default="Vector2(0, 1)">
+ The area's gravity vector (not normalized).
</member>
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false">
- If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override].
+ If [code]true[/code], gravity is calculated from a point (set via [member gravity_point_center]). See also [member gravity_space_override].
</member>
- <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector2(0, 1)">
- The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
+ <member name="gravity_point_center" type="Vector2" setter="set_gravity_point_center" getter="get_gravity_point_center" default="Vector2(0, 1)">
+ If gravity is a point (see [member gravity_point]), this will be the point of attraction.
+ </member>
+ <member name="gravity_point_distance_scale" type="float" setter="set_gravity_point_distance_scale" getter="get_gravity_point_distance_scale" default="0.0">
+ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
+ </member>
+ <member name="gravity_space_override" type="int" setter="set_gravity_space_override_mode" getter="get_gravity_space_override_mode" enum="Area2D.SpaceOverride" default="0">
+ Override mode for gravity calculations within this area. See [enum SpaceOverride] for possible values.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1">
The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping.
</member>
+ <member name="linear_damp_space_override" type="int" setter="set_linear_damp_space_override_mode" getter="get_linear_damp_space_override_mode" enum="Area2D.SpaceOverride" default="0">
+ Override mode for linear damping calculations within this area. See [enum SpaceOverride] for possible values.
+ </member>
<member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" default="true">
If [code]true[/code], other monitoring areas can detect this area.
</member>
@@ -81,9 +93,6 @@
<member name="priority" type="float" setter="set_priority" getter="get_priority" default="0.0">
The area's priority. Higher priority areas are processed first.
</member>
- <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.SpaceOverride" default="0">
- Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values.
- </member>
</members>
<signals>
<signal name="area_entered">
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index 571fd8cad3..450ed44307 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -48,6 +48,9 @@
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
+ <member name="angular_damp_space_override" type="int" setter="set_angular_damp_space_override_mode" getter="get_angular_damp_space_override_mode" enum="Area3D.SpaceOverride" default="0">
+ Override mode for angular damping calculations within this area. See [enum SpaceOverride] for possible values.
+ </member>
<member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&amp;&quot;Master&quot;">
The name of the area's audio bus.
</member>
@@ -55,21 +58,30 @@
If [code]true[/code], the area's audio bus overrides the default audio bus.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8">
- The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
+ The area's gravity intensity (in meters per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction.
</member>
- <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
- The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
+ <member name="gravity_direction" type="Vector3" setter="set_gravity_direction" getter="get_gravity_direction" default="Vector3(0, -1, 0)">
+ The area's gravity vector (not normalized).
</member>
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false">
- If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override].
+ If [code]true[/code], gravity is calculated from a point (set via [member gravity_point_center]). See also [member gravity_space_override].
</member>
- <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector3(0, -1, 0)">
- The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
+ <member name="gravity_point_center" type="Vector3" setter="set_gravity_point_center" getter="get_gravity_point_center" default="Vector3(0, -1, 0)">
+ If gravity is a point (see [member gravity_point]), this will be the point of attraction.
+ </member>
+ <member name="gravity_point_distance_scale" type="float" setter="set_gravity_point_distance_scale" getter="get_gravity_point_distance_scale" default="0.0">
+ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
+ </member>
+ <member name="gravity_space_override" type="int" setter="set_gravity_space_override_mode" getter="get_gravity_space_override_mode" enum="Area3D.SpaceOverride" default="0">
+ Override mode for gravity calculations within this area. See [enum SpaceOverride] for possible values.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1">
The rate at which objects stop moving in this area. Represents the linear velocity lost per second.
See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
</member>
+ <member name="linear_damp_space_override" type="int" setter="set_linear_damp_space_override_mode" getter="get_linear_damp_space_override_mode" enum="Area3D.SpaceOverride" default="0">
+ Override mode for linear damping calculations within this area. See [enum SpaceOverride] for possible values.
+ </member>
<member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" default="true">
If [code]true[/code], other monitoring areas can detect this area.
</member>
@@ -91,9 +103,6 @@
<member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0">
The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
</member>
- <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area3D.SpaceOverride" default="0">
- Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values.
- </member>
<member name="wind_attenuation_factor" type="float" setter="set_wind_attenuation_factor" getter="get_wind_attenuation_factor" default="0.0">
The exponential rate at which wind force decreases with distance from its origin.
</member>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 275b217247..d505ee98cc 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -194,7 +194,7 @@
<return type="void" />
<argument index="0" name="value" type="Variant" />
<description>
- Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead.
+ Removes the first occurrence of a value from the array. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
[b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>
@@ -400,7 +400,7 @@
[/codeblock]
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="position" type="int" />
<description>
@@ -477,15 +477,19 @@
[b]Note:[/b] You cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblocks]
[gdscript]
- class MyCustomSorter:
- static func sort_ascending(a, b):
- if a[0] &lt; b[0]:
- return true
- return false
+ func sort_ascending(a, b):
+ if a[0] &lt; b[0]:
+ return true
+ return false
- var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]]
- my_items.sort_custom(MyCustomSorter.sort_ascending)
- print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].
+ func _ready():
+ var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]]
+ my_items.sort_custom(sort_ascending)
+ print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].
+
+ # Descending, lambda version.
+ my_items.sort_custom(func(a, b): return a[0] &gt; b[0])
+ print(my_items) # Prints [[9, Rice], [5, Potato], [4, Tomato]].
[/gdscript]
[csharp]
// There is no custom sort support for Godot.Collections.Array
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 7b77462322..c986947dfb 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -47,7 +47,7 @@
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
- <link title="Procedural geometry using the ArrayMesh">https://docs.godotengine.org/en/latest/tutorials/3d/procedural_geometry/arraymesh.html</link>
+ <link title="Procedural geometry using the ArrayMesh">$DOCS_URL/tutorials/3d/procedural_geometry/arraymesh.html</link>
</tutorials>
<methods>
<method name="add_blend_shape">
diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml
index 600ca93028..ed1cb789e0 100644
--- a/doc/classes/AudioEffectDistortion.xml
+++ b/doc/classes/AudioEffectDistortion.xml
@@ -9,7 +9,7 @@
By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently.
</description>
<tutorials>
- <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="drive" type="float" setter="set_drive" getter="get_drive" default="0.0">
diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml
index 5b43646077..4fb1c0e7c9 100644
--- a/doc/classes/AudioEffectFilter.xml
+++ b/doc/classes/AudioEffectFilter.xml
@@ -7,7 +7,7 @@
Allows frequencies other than the [member cutoff_hz] to pass.
</description>
<tutorials>
- <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff" default="2000.0">
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
index c572824448..28498f6d8e 100644
--- a/doc/classes/AudioEffectHighShelfFilter.xml
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -6,6 +6,6 @@
<description>
</description>
<tutorials>
- <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
index e78dbf9732..4c839dc257 100644
--- a/doc/classes/AudioEffectLowShelfFilter.xml
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -6,6 +6,6 @@
<description>
</description>
<tutorials>
- <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml
index b32206726d..0b6c5287cf 100644
--- a/doc/classes/AudioEffectRecord.xml
+++ b/doc/classes/AudioEffectRecord.xml
@@ -7,7 +7,7 @@
Allows the user to record sound from a microphone. It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample.
</description>
<tutorials>
- <link title="Recording with microphone">https://docs.godotengine.org/en/latest/tutorials/audio/recording_with_microphone.html</link>
+ <link title="Recording with microphone">$DOCS_URL/tutorials/audio/recording_with_microphone.html</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
</tutorials>
<methods>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 66fa57cb52..b868cce077 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -7,7 +7,7 @@
[AudioServer] is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
</description>
<tutorials>
- <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
<link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index cff7199c4a..722ff802e7 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -7,7 +7,7 @@
Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamSample]) and OGG (via [AudioStreamOGGVorbis]) file formats.
</description>
<tutorials>
- <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index b692ae858e..d20aaff1e8 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -8,7 +8,7 @@
To play audio positionally, use [AudioStreamPlayer2D] or [AudioStreamPlayer3D] instead of [AudioStreamPlayer].
</description>
<tutorials>
- <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 9c76eefbf9..0ad161a6fe 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -9,7 +9,7 @@
[b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
- <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
</tutorials>
<methods>
<method name="get_playback_position">
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index e8a78d5a4c..ce8a6693db 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -10,7 +10,7 @@
[b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
<tutorials>
- <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
</tutorials>
<methods>
<method name="get_playback_position">
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 889c703b07..981b3167d9 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -50,7 +50,7 @@
<member name="button_group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
The [ButtonGroup] associated with the button. Not to be confused with node groups.
</member>
- <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1">
+ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="1">
Binary mask to choose which mouse buttons this button will respond to.
To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code].
</member>
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 818ab50030..aa2ffae48c 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -7,7 +7,7 @@
This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.
</description>
<tutorials>
- <link title="Standard Material 3D">https://docs.godotengine.org/en/latest/tutorials/3d/standard_material_3d.html</link>
+ <link title="Standard Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
</tutorials>
<methods>
<method name="get_feature" qualifiers="const">
@@ -53,6 +53,7 @@
<argument index="1" name="texture" type="Texture2D" />
<description>
Sets the texture for the slot specified by [code]param[/code]. See [enum TextureParam] for available slots.
+ [b]Note:[/b] When setting a roughness or metallic texture on a material that has no texture assigned to those slots, [member roughness] or [member metallic] will automatically be set to [code]1.0[/code] to ensure correct appearance.
</description>
</method>
</methods>
@@ -229,6 +230,7 @@
</member>
<member name="metallic" type="float" setter="set_metallic" getter="get_metallic" default="0.0">
A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between [code]0[/code] and [code]1[/code] should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [member roughness].
+ [b]Note:[/b] [member metallic] is automatically set to [code]1.0[/code] when assigning a metallic texture using [method set_texture].
</member>
<member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5">
Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.
@@ -301,6 +303,7 @@
</member>
<member name="roughness" type="float" setter="set_roughness" getter="get_roughness" default="1.0">
Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic].
+ [b]Note:[/b] [member roughness] is automatically set to [code]1.0[/code] when assigning a roughness texture using [method set_texture].
</member>
<member name="roughness_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture used to control the roughness per-pixel. Multiplied by [member roughness].
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 8ef9cd2e7c..bf3d20c11c 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -10,9 +10,9 @@
For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
- <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Matrices and transforms">$DOCS_URL/tutorials/math/matrices_and_transforms.html</link>
+ <link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.html</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
@@ -232,18 +232,22 @@
<return type="bool" />
<argument index="0" name="right" type="Basis" />
<description>
+ Returns [code]true[/code] if the [Basis] matrices are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="Basis" />
<argument index="0" name="right" type="Basis" />
<description>
+ Composes these two basis matrices by multiplying them together. This has the effect of transforming the second basis (the child) by the first basis (the parent).
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Transforms (multiplies) the [Vector3] by the given [Basis] matrix.
</description>
</operator>
<operator name="operator *">
@@ -269,12 +273,15 @@
<return type="bool" />
<argument index="0" name="right" type="Basis" />
<description>
+ Returns [code]true[/code] if the [Basis] matrices are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator []">
<return type="Vector3" />
<argument index="0" name="index" type="int" />
<description>
+ Access basis components using their index. [code]b[0][/code] is equivalent to [code]b.x[/code], [code]b[1][/code] is equivalent to [code]b.y[/code], and [code]b[2][/code] is equivalent to [code]b.z[/code].
</description>
</operator>
</operators>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index ba55fda59c..055d5091c7 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -78,6 +78,7 @@
</member>
<member name="icon" type="Texture2D" setter="set_button_icon" getter="get_button_icon">
Button's icon, if text is present the icon will be placed before the text.
+ To edit margin and spacing of the icon, use [theme_item hseparation] theme property and [code]content_margin_*[/code] properties of the used [StyleBox]es.
</member>
<member name="icon_align" type="int" setter="set_icon_align" getter="get_icon_align" enum="Button.TextAlign" default="0">
Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum TextAlign] constants as the text alignment. If centered, text will draw on top of the icon.
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index 9226140c1a..0505d8ad36 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -8,7 +8,7 @@
See also [GPUParticles2D], which provides the same functionality with hardware acceleration, but may not run on older devices.
</description>
<tutorials>
- <link title="Particle systems (2D)">https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link>
+ <link title="Particle systems (2D)">$DOCS_URL/tutorials/2d/particle_systems_2d.html</link>
</tutorials>
<methods>
<method name="convert_from_particles">
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index 06e2f83f05..772396befe 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -218,10 +218,10 @@
Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default).
</constant>
<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1" enum="DopplerTracking">
- Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
+ Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale]).
</constant>
<constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2" enum="DopplerTracking">
- Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
+ Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale]).
</constant>
</constants>
</class>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 7be18c1d5c..98437ef296 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -12,8 +12,8 @@
[b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad].
</description>
<tutorials>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
- <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
+ <link title="Custom drawing in 2D">$DOCS_URL/tutorials/2d/custom_drawing_in_2d.html</link>
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 2f99f94893..9ee5ce0dcb 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -7,8 +7,8 @@
Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
</description>
<tutorials>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
- <link title="Canvas layers">https://docs.godotengine.org/en/latest/tutorials/2d/canvas_layers.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
+ <link title="Canvas layers">$DOCS_URL/tutorials/2d/canvas_layers.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index b11d9c341a..d467c8a51d 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -7,7 +7,7 @@
By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect].
</description>
<tutorials>
- <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/ui/bbcode_in_richtextlabel.html</link>
+ <link title="BBCode in RichTextLabel">$DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html</link>
<link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<members>
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index e14c2dc110..0f573dcd66 100644
--- a/doc/classes/CharacterBody2D.xml
+++ b/doc/classes/CharacterBody2D.xml
@@ -9,8 +9,8 @@
[b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody2D]), which allows them to be moved by code and push other bodies on their path.
</description>
<tutorials>
- <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
- <link title="Using KinematicBody2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link>
+ <link title="Kinematic character (2D)">$DOCS_URL/tutorials/physics/kinematic_character_2d.html</link>
+ <link title="Using KinematicBody2D">$DOCS_URL/tutorials/physics/using_kinematic_body_2d.html</link>
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
</tutorials>
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 24b26fb16e..c70ce8acf9 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -9,7 +9,7 @@
[b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody3D]), which allows them to be moved by code and push other bodies on their path.
</description>
<tutorials>
- <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
+ <link title="Kinematic character (2D)">$DOCS_URL/tutorials/physics/kinematic_character_2d.html</link>
<link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index ba1ee3909d..63492bf9a0 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -198,11 +198,11 @@
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject2D.DisableMode" default="0">
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index 19bcdcbb27..33305471b8 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -170,11 +170,11 @@
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
The physics layers this CollisionObject3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject3D.DisableMode" default="0">
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index 5159b2b15b..c86bf18f24 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -7,7 +7,7 @@
Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml
index 84e362c38b..0f96d7c191 100644
--- a/doc/classes/CollisionShape3D.xml
+++ b/doc/classes/CollisionShape3D.xml
@@ -7,7 +7,7 @@
Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area3D] to give it a detection shape, or add it to a [PhysicsBody3D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject3D.shape_owner_get_shape] to get the actual shape.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
<link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 71ec225cf6..22fb853b40 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -147,6 +147,24 @@
<description>
</description>
</method>
+ <method name="from_hsv" qualifiers="static">
+ <return type="Color" />
+ <argument index="0" name="h" type="float" />
+ <argument index="1" name="s" type="float" />
+ <argument index="2" name="v" type="float" />
+ <argument index="3" name="alpha" type="float" default="1.0" />
+ <description>
+ Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. [code]h[/code] (hue), [code]s[/code] (saturation), and [code]v[/code] (value) are typically between 0 and 1.
+ [codeblocks]
+ [gdscript]
+ var c = Color.from_hsv(0.58, 0.5, 0.79, 0.8)
+ [/gdscript]
+ [csharp]
+ var c = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f);
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="from_rgbe9995" qualifiers="static">
<return type="Color" />
<argument index="0" name="rgbe" type="int" />
@@ -863,54 +881,64 @@
<return type="bool" />
<argument index="0" name="right" type="Color" />
<description>
+ Returns [code]true[/code] if the colors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="Color" />
<argument index="0" name="right" type="Color" />
<description>
+ Multiplies each component of the [Color] by the components of the given [Color].
</description>
</operator>
<operator name="operator *">
<return type="Color" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Color] by the given [float].
</description>
</operator>
<operator name="operator *">
<return type="Color" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Color] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Color" />
<argument index="0" name="right" type="Color" />
<description>
+ Adds each component of the [Color] with the components of the given [Color].
</description>
</operator>
<operator name="operator -">
<return type="Color" />
<argument index="0" name="right" type="Color" />
<description>
+ Subtracts each component of the [Color] by the components of the given [Color].
</description>
</operator>
<operator name="operator /">
<return type="Color" />
<argument index="0" name="right" type="Color" />
<description>
+ Divides each component of the [Color] by the components of the given [Color].
</description>
</operator>
<operator name="operator /">
<return type="Color" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Color] by the given [float].
</description>
</operator>
<operator name="operator /">
<return type="Color" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Color] by the given [int].
</description>
</operator>
<operator name="operator ==">
@@ -922,22 +950,27 @@
<return type="bool" />
<argument index="0" name="right" type="Color" />
<description>
+ Returns [code]true[/code] if the colors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator []">
<return type="float" />
<argument index="0" name="index" type="int" />
<description>
+ Access color components using their index. [code]c[0][/code] is equivalent to [code]c.r[/code], [code]c[1][/code] is equivalent to [code]c.g[/code], [code]c[2][/code] is equivalent to [code]c.b[/code], and [code]c[3][/code] is equivalent to [code]c.a[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Color" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Color" />
<description>
+ Inverts the given color. This is equivalent to [code]Color.WHITE - c[/code] or [code]Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)[/code].
</description>
</operator>
</operators>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 63e3eb7a5f..8739e0157d 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -16,9 +16,9 @@
[b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class.
</description>
<tutorials>
- <link title="GUI documentation index">https://docs.godotengine.org/en/latest/tutorials/ui/index.html</link>
- <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
- <link title="Control node gallery">https://docs.godotengine.org/en/latest/tutorials/ui/control_node_gallery.html</link>
+ <link title="GUI documentation index">$DOCS_URL/tutorials/ui/index.html</link>
+ <link title="Custom drawing in 2D">$DOCS_URL/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="Control node gallery">$DOCS_URL/tutorials/ui/control_node_gallery.html</link>
<link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
@@ -654,6 +654,12 @@
See [method add_theme_stylebox_override].
</description>
</method>
+ <method name="is_drag_successful" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if drag operation is successful.
+ </description>
+ </method>
<method name="is_layout_rtl" qualifiers="const">
<return type="bool" />
<description>
@@ -714,6 +720,12 @@
Removes a local override for a theme [StyleBox] with the specified [code]name[/code] previously added by [method add_theme_stylebox_override] or via the Inspector dock.
</description>
</method>
+ <method name="reset_size">
+ <return type="void" />
+ <description>
+ Resets the size to [method get_combined_minimum_size]. This is equivalent to calling [code]set_size(Vector2())[/code] (or any size below the minimum).
+ </description>
+ </method>
<method name="set_anchor">
<return type="void" />
<argument index="0" name="side" type="int" enum="Side" />
@@ -1043,7 +1055,7 @@
</member>
<member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The 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] 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=$DOCS_URL/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]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)">
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index d661da5dd0..7218e3bcb0 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -177,7 +177,7 @@
[b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary itself can still be mutated by defining the values of individual keys. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized.
</description>
<tutorials>
- <link title="GDScript basics: Dictionary">https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_basics.html#dictionary</link>
+ <link title="GDScript basics: Dictionary">$DOCS_URL/tutorials/scripting/gdscript/gdscript_basics.html#dictionary</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml
index 44d982cbcc..661dbef07c 100644
--- a/doc/classes/DirectionalLight3D.xml
+++ b/doc/classes/DirectionalLight3D.xml
@@ -7,7 +7,7 @@
A directional light is a type of [Light3D] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight3D transform (origin) is ignored. Only the basis is used to determine light direction.
</description>
<tutorials>
- <link title="Lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="Lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
</tutorials>
<members>
<member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" default="false">
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index 93f04ff2a2..cd4b8fde1e 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -54,7 +54,7 @@
[/codeblocks]
</description>
<tutorials>
- <link title="File system">https://docs.godotengine.org/en/latest/tutorials/scripting/filesystem.html</link>
+ <link title="File system">$DOCS_URL/tutorials/scripting/filesystem.html</link>
</tutorials>
<methods>
<method name="change_dir">
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 92d6a220d2..1ca69057b4 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -901,7 +901,7 @@
</constant>
<constant name="WINDOW_MODE_FULLSCREEN" value="3" enum="WindowMode">
Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
</constant>
<constant name="WINDOW_FLAG_RESIZE_DISABLED" value="0" enum="WindowFlags">
</constant>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index cb33f159ef..1f98781bbd 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -111,12 +111,13 @@
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>
+ <link title="Import plugins">$DOCS_URL/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
<methods>
<method name="_get_import_options" qualifiers="virtual const">
<return type="Array" />
- <argument index="0" name="preset_index" type="int" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="preset_index" type="int" />
<description>
Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional).
</description>
@@ -135,8 +136,9 @@
</method>
<method name="_get_option_visibility" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="option_name" type="StringName" />
- <argument index="1" name="options" type="Dictionary" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="option_name" type="StringName" />
+ <argument index="2" name="options" type="Dictionary" />
<description>
This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example:
[codeblocks]
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index f65e974d47..08f17cc5b2 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -13,7 +13,7 @@
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>
+ <link title="Inspector plugins">$DOCS_URL/tutorials/plugins/editor/inspector_plugins.html</link>
</tutorials>
<methods>
<method name="_can_handle" qualifiers="virtual const">
@@ -25,8 +25,9 @@
</method>
<method name="_parse_begin" qualifiers="virtual">
<return type="void" />
+ <argument index="0" name="object" type="Object" />
<description>
- Called to allow adding controls at the beginning of the list.
+ Called to allow adding controls at the beginning of the property list for [code]object[/code].
</description>
</method>
<method name="_parse_category" qualifiers="virtual">
@@ -34,12 +35,22 @@
<argument index="0" name="object" type="Object" />
<argument index="1" name="category" type="String" />
<description>
+ Called to allow adding controls at the beginning of a category in the property list for [code]object[/code].
</description>
</method>
<method name="_parse_end" qualifiers="virtual">
<return type="void" />
+ <argument index="0" name="object" type="Object" />
+ <description>
+ Called to allow adding controls at the end of the property list for [code]object[/code].
+ </description>
+ </method>
+ <method name="_parse_group" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="group" type="String" />
<description>
- Called to allow adding controls at the end of the list.
+ Called to allow adding controls at the beginning of a group or a sub-group in the property list for [code]object[/code].
</description>
</method>
<method name="_parse_property" qualifiers="virtual">
@@ -52,7 +63,7 @@
<argument index="5" name="usage_flags" type="int" />
<argument index="6" name="wide" type="bool" />
<description>
- Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
+ Called to allow adding property-specific editors to the property list for [code]object[/code]. The added editor control must extend [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
</description>
</method>
<method name="add_custom_control">
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index 08423c4577..3bcd9e7764 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -8,7 +8,7 @@
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>
+ <link title="Spatial gizmo plugins">$DOCS_URL/tutorials/plugins/editor/spatial_gizmos.html</link>
</tutorials>
<methods>
<method name="_can_be_hidden" qualifiers="virtual const">
diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml
index 92a2cff27f..c4d4c92afe 100644
--- a/doc/classes/EditorPaths.xml
+++ b/doc/classes/EditorPaths.xml
@@ -1,35 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorPaths" inherits="Object" version="4.0">
<brief_description>
+ Editor-only singleton that returns paths to various OS-specific data folders and files.
</brief_description>
<description>
+ This editor-only singleton returns OS-specific paths to various data folders and files. It can be used in editor plugins to ensure files are saved in the correct location on each operating system.
+ [b]Note:[/b] This singleton is not accessible in exported projects. Attempting to access it in an exported project will result in a script error as the singleton won't be declared. To prevent script errors in exported projects, use [method Engine.has_singleton] to check whether the singleton is available before using it.
+ [b]Note:[/b] Godot complies with the [url=https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html]XDG Base Directory Specification[/url] on [i]all[/i] platforms. You can override environment variables following the specification to change the editor and project data paths.
</description>
<tutorials>
+ <link title="File paths in Godot projects">https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html</link>
</tutorials>
<methods>
<method name="get_cache_dir" qualifiers="const">
<return type="String" />
<description>
+ Returns the absolute path to the user's cache folder. This folder should be used for temporary data that can be removed safely whenever the editor is closed (such as generated resource thumbnails).
+ [b]Default paths per platform:[/b]
+ [codeblock]
+ - Windows: %LOCALAPPDATA%\Godot\
+ - macOS: ~/Library/Caches/Godot/
+ - Linux: ~/.cache/godot/
+ [/codeblock]
</description>
</method>
<method name="get_config_dir" qualifiers="const">
<return type="String" />
<description>
+ Returns the absolute path to the user's configuration folder. This folder should be used for [i]persistent[/i] user configuration files.
+ [b]Default paths per platform:[/b]
+ [codeblock]
+ - Windows: %APPDATA%\Godot\ (same as `get_data_dir()`)
+ - macOS: ~/Library/Application Support/Godot/ (same as `get_data_dir()`)
+ - Linux: ~/.config/godot/
+ [/codeblock]
</description>
</method>
<method name="get_data_dir" qualifiers="const">
<return type="String" />
<description>
+ Returns the absolute path to the user's data folder. This folder should be used for [i]persistent[/i] user data files such as installed export templates.
+ [b]Default paths per platform:[/b]
+ [codeblock]
+ - Windows: %APPDATA%\Godot\ (same as `get_config_dir()`)
+ - macOS: ~/Library/Application Support/Godot/ (same as `get_config_dir()`)
+ - Linux: ~/.local/share/godot/
+ [/codeblock]
</description>
</method>
<method name="get_self_contained_file" qualifiers="const">
<return type="String" />
<description>
+ Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn't self-contained. See also [method is_self_contained].
</description>
</method>
<method name="is_self_contained" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the editor is marked as self-contained, [code]false[/code] otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an [code]editor_data/[/code] folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects.
+ Self-contained mode can be enabled by creating a file named [code]._sc_[/code] or [code]_sc_[/code] in the same folder as the editor binary while the editor is not running. See also [method get_self_contained_file].
+ [b]Note:[/b] The Steam release of Godot uses self-contained mode by default.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 8df6d721d4..7b0a300782 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -7,7 +7,7 @@
Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also [EditorScript] to add functions to the editor.
</description>
<tutorials>
- <link title="Editor plugins documentation index">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/index.html</link>
+ <link title="Editor plugins documentation index">$DOCS_URL/tutorials/plugins/editor/index.html</link>
</tutorials>
<methods>
<method name="_apply_changes" qualifiers="virtual">
diff --git a/doc/classes/EditorSceneFormatImporter.xml b/doc/classes/EditorSceneFormatImporter.xml
index 6dbd80604e..5b5d6c4598 100644
--- a/doc/classes/EditorSceneFormatImporter.xml
+++ b/doc/classes/EditorSceneFormatImporter.xml
@@ -20,6 +20,19 @@
<description>
</description>
</method>
+ <method name="_get_import_options" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_option_visibility" qualifiers="virtual const">
+ <return type="Variant" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="option" type="String" />
+ <description>
+ </description>
+ </method>
<method name="_import_animation" qualifiers="virtual">
<return type="Animation" />
<argument index="0" name="path" type="String" />
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 8a731a6d1d..d90af6ed9e 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -52,7 +52,7 @@
[/codeblocks]
</description>
<tutorials>
- <link title="Importing 3D scenes: Custom script">https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/importing_scenes.html#custom-script</link>
+ <link title="Importing 3D scenes: Custom script">$DOCS_URL/tutorials/assets_pipeline/importing_scenes.html#custom-script</link>
</tutorials>
<methods>
<method name="_post_import" qualifiers="virtual">
diff --git a/doc/classes/EditorScenePostImportPlugin.xml b/doc/classes/EditorScenePostImportPlugin.xml
index 07d8fa28b9..904b22d9d3 100644
--- a/doc/classes/EditorScenePostImportPlugin.xml
+++ b/doc/classes/EditorScenePostImportPlugin.xml
@@ -11,6 +11,7 @@
<methods>
<method name="_get_import_options" qualifiers="virtual">
<return type="void" />
+ <argument index="0" name="path" type="String" />
<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>
@@ -40,7 +41,8 @@
</method>
<method name="_get_option_visibility" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="option" type="String" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="option" type="String" />
<description>
Return true or false whether a given option should be visible. Return null to ignore.
</description>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index f05a216301..9756b26dee 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -157,7 +157,7 @@
else:
simulate_physics()
[/codeblock]
- See [url=https://docs.godotengine.org/en/latest/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information.
+ See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information.
[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] (e.g. when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the [code]"editor"[/code] argument instead. [code]OS.has_feature("editor")[/code] will evaluate to [code]true[/code] both when the code is running in the editor and when running the project from the editor, but it will evaluate to [code]false[/code] when the code is run from an exported project.
</description>
</method>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 4ea7f67eed..c3d1dc4ab6 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -11,8 +11,8 @@
- Adjustments
</description>
<tutorials>
- <link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link>
- <link title="Light transport in game engines">https://docs.godotengine.org/en/latest/tutorials/3d/high_dynamic_range.html</link>
+ <link title="Environment and post-processing">$DOCS_URL/tutorials/3d/environment_and_post_processing.html</link>
+ <link title="Light transport in game engines">$DOCS_URL/tutorials/3d/high_dynamic_range.html</link>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
<link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
@@ -171,7 +171,8 @@
<member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" enum="Environment.SDFGICascades" default="1">
</member>
<member name="sdfgi_enabled" type="bool" setter="set_sdfgi_enabled" getter="is_sdfgi_enabled" default="false">
- If [code]true[/code], enables signed distance field global illumination.
+ If [code]true[/code], enables signed distance field global illumination for meshes that have their [member GeometryInstance3D.gi_mode] set to [constant GeometryInstance3D.GI_MODE_BAKED]. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not.
+ [b]Performance:[/b] SDFGI is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider [LightmapGI] instead). To improve SDFGI performance, enable [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution] in the Project Settings.
[b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
</member>
<member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0">
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index a2a47b4ffb..0dac9a379a 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -40,12 +40,12 @@
}
[/csharp]
[/codeblocks]
- In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation.
+ In the example above, the file will be saved in the user data folder as specified in the [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] documentation.
[b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package.
[b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals.
</description>
<tutorials>
- <link title="File system">https://docs.godotengine.org/en/latest/tutorials/scripting/filesystem.html</link>
+ <link title="File system">$DOCS_URL/tutorials/scripting/filesystem.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index ccfe861c92..c403d238c5 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -93,6 +93,12 @@
Returns font descent (number of pixels below the baseline).
</description>
</method>
+ <method name="get_fixed_size" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns font fixed size.
+ </description>
+ </method>
<method name="get_font_name" qualifiers="const">
<return type="String" />
<description>
@@ -481,6 +487,13 @@
Sets the font descent (number of pixels below the baseline).
</description>
</method>
+ <method name="set_fixed_size">
+ <return type="void" />
+ <argument index="0" name="fixed_size" type="int" />
+ <description>
+ Sets the fixed size for the font.
+ </description>
+ </method>
<method name="set_font_name">
<return type="void" />
<argument index="0" name="name" type="String" />
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index 72bd6a6411..72adc49742 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -8,7 +8,7 @@
Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
- <link title="Particle systems (2D)">https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link>
+ <link title="Particle systems (2D)">$DOCS_URL/tutorials/2d/particle_systems_2d.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index 0bed561de3..771056cb93 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -8,7 +8,7 @@
Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
- <link title="Controlling thousands of fish with Particles">https://docs.godotengine.org/en/latest/tutorials/performance/vertex_animation/controlling_thousands_of_fish.html</link>
+ <link title="Controlling thousands of fish with Particles">$DOCS_URL/tutorials/performance/vertex_animation/controlling_thousands_of_fish.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index 0a2c0fbe81..b8514c67b8 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -38,8 +38,10 @@
The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box.
</member>
<member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale" default="0">
+ The texel density to use for lightmapping in [LightmapGI]. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes.
</member>
<member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0">
+ The global illumination mode to use for the whole geometry. Use a mode that matches the purpose
</member>
<member name="ignore_occlusion_culling" type="bool" setter="set_ignore_occlusion_culling" getter="is_ignoring_occlusion_culling" default="false">
</member>
@@ -70,7 +72,7 @@
</members>
<constants>
<constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
- Will not cast any shadows.
+ Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris).
</constant>
<constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting">
Will cast shadows from all visible faces in the GeometryInstance3D.
@@ -85,20 +87,28 @@
In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
</constant>
<constant name="GI_MODE_DISABLED" value="0" enum="GIMode">
+ Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using [VoxelGI] and SDFGI, the geometry will [i]receive[/i] indirect lighting and reflections but will not be considered in GI baking. When using [LightmapGI], the object will receive indirect lighting using lightmap probes instead of using the lightmap texture.
</constant>
<constant name="GI_MODE_BAKED" value="1" enum="GIMode">
+ Baked global illumination mode. Use for static objects that contribute to global illumination (such as level geometry). This GI mode is effective when using [VoxelGI], SDFGI and [LightmapGI].
</constant>
<constant name="GI_MODE_DYNAMIC" value="2" enum="GIMode">
+ Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using [VoxelGI], but it has a higher performance impact than [constant GI_MODE_BAKED].
</constant>
<constant name="LIGHTMAP_SCALE_1X" value="0" enum="LightmapScale">
+ The standard texel density for lightmapping with [LightmapGI].
</constant>
<constant name="LIGHTMAP_SCALE_2X" value="1" enum="LightmapScale">
+ Multiplies texel density by 2× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 1.5 and 3.0.
</constant>
<constant name="LIGHTMAP_SCALE_4X" value="2" enum="LightmapScale">
+ Multiplies texel density by 4× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 3.0 and 6.0.
</constant>
<constant name="LIGHTMAP_SCALE_8X" value="3" enum="LightmapScale">
+ Multiplies texel density by 8× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor greater than 6.0.
</constant>
<constant name="LIGHTMAP_SCALE_MAX" value="4" enum="LightmapScale">
+ Represents the size of the [enum LightmapScale] enum.
</constant>
<constant name="VISIBILITY_RANGE_FADE_DISABLED" value="0" enum="VisibilityRangeFadeMode">
Will not fade itself nor its visibility dependencies, hysteresis will be used instead. See [member visibility_range_begin] and [member Node3D.visibility_parent] for more information.
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 673bf19122..e962992491 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -141,7 +141,7 @@
<argument index="3" name="to_port" type="int" />
<argument index="4" name="amount" type="float" />
<description>
- Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [code]activity[/code] theme property.
+ Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [theme_item activity] theme property.
</description>
</method>
<method name="set_selected">
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index ff6271d2aa..e9226f7c1d 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -285,10 +285,10 @@
No overlay is shown.
</constant>
<constant name="OVERLAY_BREAKPOINT" value="1" enum="Overlay">
- Show overlay set in the [code]breakpoint[/code] theme property.
+ Show overlay set in the [theme_item breakpoint] theme property.
</constant>
<constant name="OVERLAY_POSITION" value="2" enum="Overlay">
- Show overlay set in the [code]position[/code] theme property.
+ Show overlay set in the [theme_item position] theme property.
</constant>
</constants>
<theme_items>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 9f33c400f4..a50983853d 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -15,8 +15,8 @@
[b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period.
</description>
<tutorials>
- <link title="HTTP client class">https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link>
- <link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link>
+ <link title="HTTP client class">$DOCS_URL/tutorials/networking/http_client_class.html</link>
+ <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
<method name="close">
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 558e51aefe..aaaf863c69 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -153,8 +153,8 @@
[b]Gzipped response bodies[/b]: HTTPRequest will automatically handle decompression of response bodies. A [code]Accept-Encoding[/code] header will be automatically added to each of your requests, unless one is already specified. Any response with a [code]Content-Encoding: gzip[/code] header will automatically be decompressed and delivered to you as uncompressed bytes.
</description>
<tutorials>
- <link title="Making HTTP requests">https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link>
- <link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link>
+ <link title="Making HTTP requests">$DOCS_URL/tutorials/networking/http_request_class.html</link>
+ <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
<method name="cancel_request">
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 492bddca1f..8a4bbee0fa 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -9,7 +9,7 @@
[b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import.
</description>
<tutorials>
- <link title="Importing images">https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/importing_images.html</link>
+ <link title="Importing images">$DOCS_URL/tutorials/assets_pipeline/importing_images.html</link>
</tutorials>
<methods>
<method name="adjust_bcs">
@@ -154,7 +154,15 @@
<return type="void" />
<argument index="0" name="color" type="Color" />
<description>
- Fills the image with a given [Color].
+ Fills the image with [code]color[/code].
+ </description>
+ </method>
+ <method name="fill_rect">
+ <return type="void" />
+ <argument index="0" name="rect" type="Rect2" />
+ <argument index="1" name="color" type="Color" />
+ <description>
+ Fills [code]rect[/code] with [code]color[/code].
</description>
</method>
<method name="fix_alpha_edges">
@@ -278,7 +286,7 @@
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
- Loads an image from file [code]path[/code]. See [url=https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations.
+ Loads an image from file [code]path[/code]. See [url=$DOCS_URL/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations.
[b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the [code]user://[/code] directory, and may not work in exported projects.
See also [ImageTexture] description for usage examples.
</description>
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index af7178db95..3f96d357b6 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -28,7 +28,7 @@
[b]Note:[/b] The maximum texture size is 16384×16384 pixels due to graphics hardware limitations.
</description>
<tutorials>
- <link title="Importing images">https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/importing_images.html</link>
+ <link title="Importing images">$DOCS_URL/tutorials/assets_pipeline/importing_images.html</link>
</tutorials>
<methods>
<method name="create_from_image">
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 1fded42db2..cd5ba2e17f 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -7,7 +7,7 @@
A singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the [b]Input Map[/b] tab in the [b]Project &gt; Project Settings[/b], or with the [InputMap] class.
</description>
<tutorials>
- <link title="Inputs documentation index">https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link>
+ <link title="Inputs documentation index">$DOCS_URL/tutorials/inputs/index.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
@@ -155,7 +155,7 @@
</description>
</method>
<method name="get_mouse_button_mask" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="MouseButton" />
<description>
Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together.
</description>
@@ -236,6 +236,13 @@
Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton].
</description>
</method>
+ <method name="is_physical_key_pressed" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="keycode" type="int" enum="Key" />
+ <description>
+ Returns [code]true[/code] if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a [enum Key] constant.
+ </description>
+ </method>
<method name="joy_connection_changed">
<return type="void" />
<argument index="0" name="device" type="int" />
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 9dc8fbeffa..09fbe776bf 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -7,8 +7,8 @@
Base class of all sort of input event. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index f09af1a34d..e9c280732a 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -7,7 +7,7 @@
Contains a generic action which can be targeted from several types of inputs. Actions can be created from the [b]Input Map[/b] tab in the [b]Project &gt; Project Settings[/b] menu. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent: Actions">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#actions</link>
+ <link title="InputEvent: Actions">$DOCS_URL/tutorials/inputs/inputevent.html#actions</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
index ff82913385..3e625c1003 100644
--- a/doc/classes/InputEventJoypadButton.xml
+++ b/doc/classes/InputEventJoypadButton.xml
@@ -7,7 +7,7 @@
Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see [InputEventJoypadMotion].
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="JoyButton" default="0">
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index 92161974ba..b3f9013553 100644
--- a/doc/classes/InputEventJoypadMotion.xml
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -7,7 +7,7 @@
Stores information about joystick motions. One [InputEventJoypadMotion] represents one axis at a time.
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="axis" type="int" setter="set_axis" getter="get_axis" enum="JoyAxis" default="0">
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
index 9cf6872655..8044bf5b99 100644
--- a/doc/classes/InputEventKey.xml
+++ b/doc/classes/InputEventKey.xml
@@ -7,18 +7,18 @@
Stores key presses on the keyboard. Supports key presses, key releases and [member echo] events.
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<methods>
<method name="get_keycode_with_modifiers" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="Key" />
<description>
Returns the keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers].
To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
</description>
</method>
<method name="get_physical_keycode_with_modifiers" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="Key" />
<description>
Returns the physical keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers].
To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_physical_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey].
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index b06068aff3..4878090996 100644
--- a/doc/classes/InputEventMouse.xml
+++ b/doc/classes/InputEventMouse.xml
@@ -7,10 +7,10 @@
Stores general mouse events information.
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
- <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0">
+ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="0">
The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks.
</member>
<member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2(0, 0)">
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index dcfe0d6c71..699217525e 100644
--- a/doc/classes/InputEventMouseButton.xml
+++ b/doc/classes/InputEventMouseButton.xml
@@ -7,7 +7,7 @@
Contains mouse click information. See [method Node._input].
</description>
<tutorials>
- <link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link>
+ <link title="Mouse and input coordinates">$DOCS_URL/tutorials/inputs/mouse_and_input_coordinates.html</link>
</tutorials>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="MouseButton" default="0">
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 9a0156510e..bd1ae367c2 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -8,7 +8,7 @@
[b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call [method Input.set_use_accumulated_input] with [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly.
</description>
<tutorials>
- <link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link>
+ <link title="Mouse and input coordinates">$DOCS_URL/tutorials/inputs/mouse_and_input_coordinates.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<members>
diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml
index f86b5f3b4d..19c26e3a98 100644
--- a/doc/classes/InputEventScreenDrag.xml
+++ b/doc/classes/InputEventScreenDrag.xml
@@ -7,7 +7,7 @@
Contains screen drag information. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="index" type="int" setter="set_index" getter="get_index" default="0">
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index c731044c98..0694b2eabc 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -8,7 +8,7 @@
Stores multi-touch press/release information. Supports touch press, touch release and [member index] for multi-touch count and order.
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="index" type="int" setter="set_index" getter="get_index" default="0">
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index 1b9212bf65..cd4a8aecd0 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -7,7 +7,7 @@
Contains keys events information with modifiers support like [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
+ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
<member name="alt_pressed" type="bool" setter="set_alt_pressed" getter="is_alt_pressed" default="false">
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index 855d5b5d71..24f220e892 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -7,7 +7,7 @@
Manages all [InputEventAction] which can be created/modified from the project settings menu [b]Project &gt; Project Settings &gt; Input Map[/b] or in code with [method add_action] and [method action_add_event]. See [method Node._input].
</description>
<tutorials>
- <link title="InputEvent: InputMap">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap</link>
+ <link title="InputEvent: InputMap">$DOCS_URL/tutorials/inputs/inputevent.html#inputmap</link>
</tutorials>
<methods>
<method name="action_add_event">
diff --git a/doc/classes/JNISingleton.xml b/doc/classes/JNISingleton.xml
index ce39e1f567..c887f72767 100644
--- a/doc/classes/JNISingleton.xml
+++ b/doc/classes/JNISingleton.xml
@@ -7,6 +7,6 @@
The JNISingleton is implemented only in the Android export. It's used to call methods and connect signals from an Android plugin written in Java or Kotlin. Methods and signals can be called and connected to the JNISingleton as if it is a Node. See [url=https://en.wikipedia.org/wiki/Java_Native_Interface]Java Native Interface - Wikipedia[/url] for more information.
</description>
<tutorials>
- <link title="Creating Android plugins">https://docs.godotengine.org/en/latest/tutorials/platform/android/android_plugin.html#doc-android-plugin</link>
+ <link title="Creating Android plugins">$DOCS_URL/tutorials/platform/android/android_plugin.html#doc-android-plugin</link>
</tutorials>
</class>
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml
index 2bb2666df4..aeaf8ac1f5 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScript.xml
@@ -5,10 +5,10 @@
</brief_description>
<description>
The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs.
- [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See [url=https://docs.godotengine.org/en/latest/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information.
+ [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See [url=$DOCS_URL/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information.
</description>
<tutorials>
- <link title="Exporting for the Web: Calling JavaScript from script">https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#calling-javascript-from-script</link>
+ <link title="Exporting for the Web: Calling JavaScript from script">$DOCS_URL/tutorials/export/exporting_for_web.html#calling-javascript-from-script</link>
</tutorials>
<methods>
<method name="create_callback">
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index 918e8a5c8a..039425b15f 100644
--- a/doc/classes/Light2D.xml
+++ b/doc/classes/Light2D.xml
@@ -8,7 +8,7 @@
[b]Note:[/b] Light2D can also be used as a mask.
</description>
<tutorials>
- <link title="2D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
+ <link title="2D lights and shadows">$DOCS_URL/tutorials/2d/2d_lights_and_shadows.html</link>
</tutorials>
<methods>
<method name="get_height" qualifiers="const">
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index dbda22d618..009ad1f609 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -7,7 +7,7 @@
Light3D is the [i]abstract[/i] base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.
</description>
<tutorials>
- <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml
index ba795a29a1..d883128ac3 100644
--- a/doc/classes/LightOccluder2D.xml
+++ b/doc/classes/LightOccluder2D.xml
@@ -7,7 +7,7 @@
Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed.
</description>
<tutorials>
- <link title="2D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
+ <link title="2D lights and shadows">$DOCS_URL/tutorials/2d/2d_lights_and_shadows.html</link>
</tutorials>
<members>
<member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon">
diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml
index 0cdf9f820f..b7d4c93fd5 100644
--- a/doc/classes/LightmapGI.xml
+++ b/doc/classes/LightmapGI.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapGI" inherits="VisualInstance3D" version="4.0">
<brief_description>
+ Computes and stores baked lightmaps for fast global illumination.
</brief_description>
<description>
+ The [LightmapGI] node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. [LightmapGI] can also provide rough reflections using spherical harmonics if [member directional] is enabled. Dynamic objects can receive indirect lighting thanks to [i]light probes[/i], which can be automatically placed by setting [member generate_probes_subdiv]. Additional lightmap probes can also be added by creating [LightmapProbe] nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a [LightmapGI] node is also slower compared to [VoxelGI].
+ [b]Procedural generation:[/b] Lightmap baking functionality is only available in the editor. This means [LightmapGI] is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use [VoxelGI] or SDFGI instead (see [member Environment.sdfgi_enabled]).
+ [b]Performance:[/b] [LightmapGI] provides the best possible run-time performance for global illumination. It is suitable for low-end hardware including integrated graphics and mobile devices.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index 4d9abbbb19..5e673cc19b 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -82,7 +82,7 @@
The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round.
</member>
<member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit" default="2.0">
- The direction difference in radians between vector points. This value is only used if [code]joint mode[/code] is set to [constant LINE_JOINT_SHARP].
+ The direction difference in radians between vector points. This value is only used if [member joint_mode] is set to [constant LINE_JOINT_SHARP].
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style.
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
index c7b66c8ea3..6873edb3ae 100644
--- a/doc/classes/MeshInstance2D.xml
+++ b/doc/classes/MeshInstance2D.xml
@@ -7,7 +7,7 @@
Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite2D] via a tool in the editor toolbar. Select "Sprite2D" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D".
</description>
<tutorials>
- <link title="2D meshes">https://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link>
+ <link title="2D meshes">$DOCS_URL/tutorials/2d/2d_meshes.html</link>
</tutorials>
<members>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 7890bbcc33..cf3b395b7b 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -10,8 +10,8 @@
Since instances may have any behavior, the AABB used for visibility must be provided by the user.
</description>
<tutorials>
- <link title="Animating thousands of fish with MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
- <link title="Optimization using MultiMeshes">https://docs.godotengine.org/en/latest/tutorials/performance/using_multimesh.html</link>
+ <link title="Animating thousands of fish with MultiMeshInstance">$DOCS_URL/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
+ <link title="Optimization using MultiMeshes">$DOCS_URL/tutorials/performance/using_multimesh.html</link>
</tutorials>
<methods>
<method name="get_aabb" qualifiers="const">
diff --git a/doc/classes/MultiMeshInstance3D.xml b/doc/classes/MultiMeshInstance3D.xml
index 158579e952..d78a045aca 100644
--- a/doc/classes/MultiMeshInstance3D.xml
+++ b/doc/classes/MultiMeshInstance3D.xml
@@ -8,9 +8,9 @@
This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands).
</description>
<tutorials>
- <link title="Animating thousands of fish with MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
- <link title="Using MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link>
- <link title="Optimization using MultiMeshes">https://docs.godotengine.org/en/latest/tutorials/performance/using_multimesh.html</link>
+ <link title="Animating thousands of fish with MultiMeshInstance">$DOCS_URL/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
+ <link title="Using MultiMeshInstance">$DOCS_URL/tutorials/3d/using_multi_mesh_instance.html</link>
+ <link title="Optimization using MultiMeshes">$DOCS_URL/tutorials/performance/using_multimesh.html</link>
</tutorials>
<members>
<member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh">
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index 67d3161aba..b7bd7bef36 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -9,7 +9,7 @@
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
- <link title="High-level multiplayer">https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link>
+ <link title="High-level multiplayer">$DOCS_URL/tutorials/networking/high_level_multiplayer.html</link>
<link title="WebRTC Signaling Demo">https://godotengine.org/asset-library/asset/537</link>
</tutorials>
<methods>
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index a840cb2ec7..90c81686b1 100644
--- a/doc/classes/Mutex.xml
+++ b/doc/classes/Mutex.xml
@@ -7,7 +7,7 @@
A synchronization mutex (mutual exclusion). This is used to synchronize multiple [Thread]s, and is equivalent to a binary [Semaphore]. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks.
</description>
<tutorials>
- <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/performance/using_multiple_threads.html</link>
+ <link title="Using multiple threads">$DOCS_URL/tutorials/performance/using_multiple_threads.html</link>
</tutorials>
<methods>
<method name="lock">
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index 5b5b7c42ef..7ecdca8793 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -28,7 +28,7 @@
var polygon = NavigationPolygon.new()
var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.vertices = vertices
- var indices = PackedInt32Array(0, 3, 1)
+ var indices = PackedInt32Array([0, 1, 2, 3])
polygon.add_polygon(indices)
$NavigationRegion2D.navpoly = polygon
[/gdscript]
@@ -36,7 +36,7 @@
var polygon = new NavigationPolygon();
var vertices = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) };
polygon.Vertices = vertices;
- var indices = new int[] { 0, 3, 1 };
+ var indices = new int[] { 0, 1, 2, 3 };
polygon.AddPolygon(indices);
GetNode&lt;NavigationRegion2D&gt;("NavigationRegion2D").Navpoly = polygon;
[/csharp]
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 843db8c174..f1ab5e4843 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -17,7 +17,7 @@
[b]Networking with nodes:[/b] After connecting to a server (or making one, see [ENetMultiplayerPeer]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos.
</description>
<tutorials>
- <link title="Nodes and scenes">https://docs.godotengine.org/en/latest/getting_started/step_by_step/nodes_and_scenes.htmltml</link>
+ <link title="Nodes and scenes">$DOCS_URL/getting_started/step_by_step/nodes_and_scenes.html</link>
<link title="All Demos">https://github.com/godotengine/godot-demo-projects/</link>
</tutorials>
<methods>
@@ -228,16 +228,19 @@
If [code]include_internal[/code] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
- <method name="get_editor_description" qualifiers="const">
- <return type="String" />
- <description>
- </description>
- </method>
<method name="get_groups" qualifiers="const">
<return type="Array" />
<description>
Returns an array listing the groups that the node is a member of.
[b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
+ [b]Note:[/b] The engine uses some group names internally (all starting with an underscore). To avoid conflicts with internal groups, do not add custom groups whose name starts with an underscore. To exclude internal groups while looping over [method get_groups], use the following snippet:
+ [codeblock]
+ # Stores the node's non-internal groups only (as an array of Strings).
+ var non_internal_groups = []
+ for group in get_groups():
+ if not group.begins_with("_"):
+ non_internal_groups.push_back(group)
+ [/codeblock]
</description>
</method>
<method name="get_index" qualifiers="const">
@@ -258,7 +261,7 @@
<return type="Node" />
<argument index="0" name="path" type="NodePath" />
<description>
- Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call &lt;method&gt; on a null instance." error.
+ Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, [code]null[/code] is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call &lt;method&gt; on a null instance." error.
[b]Note:[/b] Fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
[b]Example:[/b] Assume your current node is Character and the following tree:
[codeblock]
@@ -319,7 +322,7 @@
<method name="get_parent" qualifiers="const">
<return type="Node" />
<description>
- Returns the parent node of the current node, or a [code]null instance[/code] if the node lacks a parent.
+ Returns the parent node of the current node, or [code]null[/code] if the node lacks a parent.
</description>
</method>
<method name="get_path" qualifiers="const">
@@ -568,6 +571,7 @@
<description>
Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
If [code]keep_groups[/code] is [code]true[/code], the [code]node[/code] is added to the same groups that the replaced node is in.
+ Note that the replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using [method Object.free].
</description>
</method>
<method name="request_ready">
@@ -618,12 +622,6 @@
Sets the editable children state of [code]node[/code] relative to this node. This method is only intended for use with editor tooling.
</description>
</method>
- <method name="set_editor_description">
- <return type="void" />
- <argument index="0" name="editor_description" type="String" />
- <description>
- </description>
- </method>
<method name="set_multiplayer_authority">
<return type="void" />
<argument index="0" name="id" type="int" />
@@ -702,6 +700,9 @@
<member name="custom_multiplayer" type="MultiplayerAPI" setter="set_custom_multiplayer" getter="get_custom_multiplayer">
The override to the default [MultiplayerAPI]. Set to [code]null[/code] to use the default [SceneTree] one.
</member>
+ <member name="editor_description" type="String" setter="set_editor_description" getter="get_editor_description" default="&quot;&quot;">
+ Add a custom description to a node.
+ </member>
<member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer">
The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree).
</member>
@@ -790,8 +791,8 @@
<constant name="NOTIFICATION_DRAG_END" value="22">
Notification received when a drag ends.
</constant>
- <constant name="NOTIFICATION_PATH_CHANGED" value="23">
- Notification received when the node's [NodePath] changed.
+ <constant name="NOTIFICATION_PATH_RENAMED" value="23">
+ Notification received when the node's name or one of its parents' name is changed. This notification is [i]not[/i] received when the node is removed from the scene tree to be added to another parent later on.
</constant>
<constant name="NOTIFICATION_INTERNAL_PROCESS" value="25">
Notification received every frame when the internal process flag is set (see [method set_process_internal]).
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index ef5f9ee5c9..b8bf342680 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -7,7 +7,7 @@
A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order.
</description>
<tutorials>
- <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="Custom drawing in 2D">$DOCS_URL/tutorials/2d/custom_drawing_in_2d.html</link>
<link title="All 2D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/2d</link>
</tutorials>
<methods>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 2ca664e2b5..1036c1fbcf 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -9,7 +9,7 @@
[b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad].
</description>
<tutorials>
- <link title="Introduction to 3D">https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link>
+ <link title="Introduction to 3D">$DOCS_URL/tutorials/3d/introduction_to_3d.html</link>
<link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link>
</tutorials>
<methods>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index f4d48f5db2..7088844547 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -133,7 +133,7 @@
</description>
</method>
<method name="find_keycode_from_string" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="Key" />
<argument index="0" name="string" type="String" />
<description>
Returns the keycode of the given string (e.g. "Escape").
@@ -142,7 +142,7 @@
<method name="get_cache_dir" qualifiers="const">
<return type="String" />
<description>
- Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir].
+ Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir].
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
@@ -179,7 +179,7 @@
<method name="get_config_dir" qualifiers="const">
<return type="String" />
<description>
- Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir].
+ Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir].
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
@@ -194,7 +194,7 @@
<method name="get_data_dir" qualifiers="const">
<return type="String" />
<description>
- Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir].
+ Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir].
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
@@ -222,7 +222,7 @@
</method>
<method name="get_keycode_string" qualifiers="const">
<return type="String" />
- <argument index="0" name="code" type="int" />
+ <argument index="0" name="code" type="int" enum="Key" />
<description>
Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]).
See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers].
@@ -246,6 +246,13 @@
This can be used to narrow down fully specified locale strings to only the "common" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with [code]fr_CA[/code] locale, this would return [code]fr[/code].
</description>
</method>
+ <method name="get_main_thread_id" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the ID of the main thread. See [method get_thread_caller_id].
+ [b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts.
+ </description>
+ </method>
<method name="get_model_name" qualifiers="const">
<return type="String" />
<description>
@@ -332,7 +339,7 @@
<return type="bool" />
<argument index="0" name="tag_name" type="String" />
<description>
- Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=https://docs.godotengine.org/en/latest/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details.
+ Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=$DOCS_URL/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details.
[b]Note:[/b] Tag names are case-sensitive.
</description>
</method>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 5a84364b92..860e252805 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -29,7 +29,7 @@
[b]Note:[/b] Unlike references to a [RefCounted], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [RefCounted] for data classes instead of [Object].
</description>
<tutorials>
- <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/tutorials/best_practices/node_alternatives.html</link>
+ <link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link>
</tutorials>
<methods>
<method name="_get" qualifiers="virtual">
@@ -350,6 +350,7 @@
<argument index="0" name="property" type="NodePath" />
<description>
Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
+ [b]Note:[/b] Even though the method takes [NodePath] argument, it doesn't support actual paths to [Node]s in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use [method Node.get_node_and_resource] instead.
</description>
</method>
<method name="get_instance_id" qualifiers="const">
@@ -567,7 +568,7 @@
<description>
Translates a message using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context.
Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] unchanged. See [method set_message_translation].
- See [url=https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url] for examples of the usage of this method.
+ See [url=$DOCS_URL/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url] for examples of the usage of this method.
</description>
</method>
<method name="tr_n" qualifiers="const">
@@ -581,7 +582,7 @@
Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] or [code]plural_message[/code] unchanged. See [method set_message_translation].
The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
[b]Note:[/b] Negative and floating-point values usually represent physical entities for which singular and plural don't clearly apply. In such cases, use [method tr].
- See [url=https://docs.godotengine.org/en/latest/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url] for examples of the usage of this method.
+ See [url=$DOCS_URL/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url] for examples of the usage of this method.
</description>
</method>
</methods>
diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml
index e8d5977199..013ad0cc42 100644
--- a/doc/classes/OmniLight3D.xml
+++ b/doc/classes/OmniLight3D.xml
@@ -7,7 +7,7 @@
An Omnidirectional light is a type of [Light3D] that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters.
</description>
<tutorials>
- <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
</tutorials>
<members>
<member name="omni_attenuation" type="float" setter="set_param" getter="get_param" default="1.0">
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index 28508c85e0..b5e7b32225 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -43,8 +43,8 @@
<method name="pck_start">
<return type="int" enum="Error" />
<argument index="0" name="pck_name" type="String" />
- <argument index="1" name="alignment" type="int" default="0" />
- <argument index="2" name="key" type="String" default="&quot;&quot;" />
+ <argument index="1" name="alignment" type="int" default="32" />
+ <argument index="2" name="key" type="String" default="&quot;0000000000000000000000000000000000000000000000000000000000000000&quot;" />
<argument index="3" name="encrypt_directory" type="bool" default="false" />
<description>
Creates a new PCK file with the name [code]pck_name[/code]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [code]pck_name[/code] (even though it's not required).
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index f951df1eb7..fd098481e4 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -332,7 +332,7 @@
Appends an element at the end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index 4aa8a19630..f69c5504da 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -95,7 +95,7 @@
Appends a value to the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index 68fb45a62a..ccac607386 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -96,7 +96,7 @@
Appends an element at the end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index 740591a0c0..b164283b3e 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -96,7 +96,7 @@
Appends an element at the end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index 7a01bb6c7c..c6ff31ebdd 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -96,7 +96,7 @@
Appends a value to the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index c7b69d4ad5..ff48eb1aad 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -96,7 +96,7 @@
Appends a value to the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index d0579c6f6f..d3a770b35b 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself.
- Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see [code]owner[/code] property on [Node]).
+ Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see [member Node.owner] property).
[b]Note:[/b] The node doesn't need to own itself.
[b]Example of loading a saved scene:[/b]
[codeblocks]
@@ -22,7 +22,7 @@
AddChild(scene);
[/csharp]
[/codeblocks]
- [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidDynamicBody2D[/code] ([code]body[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
+ [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [Node2D] ([code]node[/code]), [RigidDynamicBody2D] ([code]body[/code]) and [CollisionObject2D] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
[codeblocks]
[gdscript]
# Create the objects.
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index dfebfb718b..4204277ea2 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -96,7 +96,7 @@
Appends a string element at end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index bf9b7e97d4..e6a7b2fa41 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -96,7 +96,7 @@
Inserts a [Vector2] at the end.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index b439f8f217..6992bbca01 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -95,7 +95,7 @@
Inserts a [Vector3] at the end.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml
index b90f52a70d..e1e50a2b51 100644
--- a/doc/classes/PhysicalSkyMaterial.xml
+++ b/doc/classes/PhysicalSkyMaterial.xml
@@ -23,7 +23,7 @@
<member name="mie_coefficient" type="float" setter="set_mie_coefficient" getter="get_mie_coefficient" default="0.005">
Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whitish color around the sun and horizon.
</member>
- <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color(0.36, 0.56, 0.82, 1)">
+ <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color(0.63, 0.77, 0.92, 1)">
Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets.
</member>
<member name="mie_eccentricity" type="float" setter="set_mie_eccentricity" getter="get_mie_eccentricity" default="0.8">
@@ -35,7 +35,7 @@
<member name="rayleigh_coefficient" type="float" setter="set_rayleigh_coefficient" getter="get_rayleigh_coefficient" default="2.0">
Controls the strength of the Rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky.
</member>
- <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color(0.056, 0.14, 0.3, 1)">
+ <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color(0.26, 0.41, 0.58, 1)">
Controls the [Color] of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a Mars looking atmosphere with a corresponding blue sunset.
</member>
<member name="sun_disk_scale" type="float" setter="set_sun_disk_scale" getter="get_sun_disk_scale" default="1.0">
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index e108ab6298..08f9de53ca 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -7,7 +7,7 @@
PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
</tutorials>
<methods>
<method name="add_collision_exception_with">
@@ -30,7 +30,7 @@
<argument index="2" name="safe_margin" type="float" default="0.08" />
<description>
Moves the body along the vector [code]linear_velocity[/code]. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
+ The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision when stopped, or when touching another body along the motion.
If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
</description>
@@ -50,8 +50,8 @@
<argument index="3" name="safe_margin" type="float" default="0.08" />
<description>
Checks for collisions without moving the body. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]linear_velocity[/code]. Returns [code]true[/code] if a collision would occur.
- [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision (should there be one).
+ Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]linear_velocity[/code]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path.
+ [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision when stopped, or when touching another body along the motion.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
</description>
</method>
diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml
index 8718c0caa2..3c52850eec 100644
--- a/doc/classes/PhysicsBody3D.xml
+++ b/doc/classes/PhysicsBody3D.xml
@@ -7,7 +7,7 @@
PhysicsBody3D is an abstract base class for implementing a physics body. All *Body types inherit from it.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
</tutorials>
<methods>
<method name="add_collision_exception_with">
@@ -38,7 +38,7 @@
<argument index="3" name="max_collisions" type="int" default="1" />
<description>
Moves the body along the vector [code]linear_velocity[/code]. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision.
+ The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision when stopped, or when touching another body along the motion.
If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
[code]max_collisions[/code] allows to retrieve more than one collision result.
@@ -68,8 +68,8 @@
<argument index="4" name="max_collisions" type="int" default="1" />
<description>
Checks for collisions without moving the body. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]linear_velocity[/code]. Returns [code]true[/code] if a collision would occur.
- [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one).
+ Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]linear_velocity[/code]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path.
+ [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision when stopped, or when touching another body along the motion.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
[code]max_collisions[/code] allows to retrieve more than one collision result.
</description>
diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index 3fe9cd776c..c33bd930be 100644
--- a/doc/classes/PhysicsDirectBodyState2D.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -7,8 +7,8 @@
Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody2D._integrate_forces].
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="add_central_force">
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index efa9eb9cd6..7aa46dec2f 100644
--- a/doc/classes/PhysicsDirectBodyState3D.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -7,8 +7,8 @@
Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody3D._integrate_forces].
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="add_central_force">
diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index 5892ef266f..fb82aaf36a 100644
--- a/doc/classes/PhysicsDirectSpaceState2D.xml
+++ b/doc/classes/PhysicsDirectSpaceState2D.xml
@@ -7,8 +7,8 @@
Direct access object to a space in the [PhysicsServer2D]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="cast_motion">
@@ -64,7 +64,7 @@
Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters2D]. The returned object is a dictionary with the following fields:
[code]collider[/code]: The colliding object.
[code]collider_id[/code]: The colliding object's ID.
- [code]normal[/code]: The object's surface normal at the intersection point.
+ [code]normal[/code]: The object's surface normal at the intersection point, or [code]Vector2(0, 0)[/code] if the ray starts inside the shape and [member PhysicsRayQueryParameters2D.hit_from_inside] is [code]true[/code].
[code]position[/code]: The intersection point.
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 6a7fe46518..177fca9ce3 100644
--- a/doc/classes/PhysicsDirectSpaceState3D.xml
+++ b/doc/classes/PhysicsDirectSpaceState3D.xml
@@ -7,8 +7,8 @@
Direct access object to a space in the [PhysicsServer3D]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="cast_motion">
@@ -65,7 +65,7 @@
Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters3D]. The returned object is a dictionary with the following fields:
[code]collider[/code]: The colliding object.
[code]collider_id[/code]: The colliding object's ID.
- [code]normal[/code]: The object's surface normal at the intersection point.
+ [code]normal[/code]: The object's surface normal at the intersection point, or [code]Vector3(0, 0, 0)[/code] if the ray starts inside the shape and [member PhysicsRayQueryParameters3D.hit_from_inside] is [code]true[/code].
[code]position[/code]: The intersection point.
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
diff --git a/doc/classes/PhysicsPointQueryParameters2D.xml b/doc/classes/PhysicsPointQueryParameters2D.xml
index 6acd83b101..b4cb2145cf 100644
--- a/doc/classes/PhysicsPointQueryParameters2D.xml
+++ b/doc/classes/PhysicsPointQueryParameters2D.xml
@@ -19,7 +19,7 @@
If [code]true[/code], the query will take [PhysicsBody2D]s into account.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
- The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
diff --git a/doc/classes/PhysicsPointQueryParameters3D.xml b/doc/classes/PhysicsPointQueryParameters3D.xml
index 488f56872d..51e8f8c5b4 100644
--- a/doc/classes/PhysicsPointQueryParameters3D.xml
+++ b/doc/classes/PhysicsPointQueryParameters3D.xml
@@ -16,7 +16,7 @@
If [code]true[/code], the query will take [PhysicsBody3D]s into account.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
- The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
diff --git a/doc/classes/PhysicsRayQueryParameters2D.xml b/doc/classes/PhysicsRayQueryParameters2D.xml
index 0e99e47286..7e317c18bf 100644
--- a/doc/classes/PhysicsRayQueryParameters2D.xml
+++ b/doc/classes/PhysicsRayQueryParameters2D.xml
@@ -16,7 +16,7 @@
If [code]true[/code], the query will take [PhysicsBody2D]s into account.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
- The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
@@ -24,6 +24,9 @@
<member name="from" type="Vector2" setter="set_from" getter="get_from" default="Vector2(0, 0)">
The starting point of the ray being queried for, in global coordinates.
</member>
+ <member name="hit_from_inside" type="bool" setter="set_hit_from_inside" getter="is_hit_from_inside_enabled" default="false">
+ If [code]true[/code], the query will detect a hit when starting inside shapes. In this case the collision normal will be [code]Vector2(0, 0)[/code]. Does not affect concave polygon shapes.
+ </member>
<member name="to" type="Vector2" setter="set_to" getter="get_to" default="Vector2(0, 0)">
The ending point of the ray being queried for, in global coordinates.
</member>
diff --git a/doc/classes/PhysicsRayQueryParameters3D.xml b/doc/classes/PhysicsRayQueryParameters3D.xml
index dbd09e5128..c378325a3c 100644
--- a/doc/classes/PhysicsRayQueryParameters3D.xml
+++ b/doc/classes/PhysicsRayQueryParameters3D.xml
@@ -16,7 +16,7 @@
If [code]true[/code], the query will take [PhysicsBody3D]s into account.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
- The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
@@ -24,6 +24,12 @@
<member name="from" type="Vector3" setter="set_from" getter="get_from" default="Vector3(0, 0, 0)">
The starting point of the ray being queried for, in global coordinates.
</member>
+ <member name="hit_back_faces" type="bool" setter="set_hit_back_faces" getter="is_hit_back_faces_enabled" default="true">
+ If [code]true[/code], the query will hit back faces with concave polygon shapes with back face enabled or heightmap shapes.
+ </member>
+ <member name="hit_from_inside" type="bool" setter="set_hit_from_inside" getter="is_hit_from_inside_enabled" default="false">
+ If [code]true[/code], the query will detect a hit when starting inside shapes. In this case the collision normal will be [code]Vector3(0, 0, 0)[/code]. Does not affect concave polygon shapes or heightmap shapes.
+ </member>
<member name="to" type="Vector3" setter="set_to" getter="get_to" default="Vector3(0, 0, 0)">
The ending point of the ray being queried for, in global coordinates.
</member>
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 7368fe06ab..868b58ea9f 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -98,13 +98,6 @@
Returns the space assigned to the area.
</description>
</method>
- <method name="area_get_space_override_mode" qualifiers="const">
- <return type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode" />
- <argument index="0" name="area" type="RID" />
- <description>
- Returns the space override mode for the area.
- </description>
- </method>
<method name="area_get_transform" qualifiers="const">
<return type="Transform2D" />
<argument index="0" name="area" type="RID" />
@@ -207,14 +200,6 @@
Assigns a space to the area.
</description>
</method>
- <method name="area_set_space_override_mode">
- <return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="mode" type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode" />
- <description>
- Sets the space override mode for the area. See [enum AreaSpaceOverrideMode] for a list of available modes.
- </description>
- </method>
<method name="area_set_transform">
<return type="void" />
<argument index="0" name="area" type="RID" />
@@ -346,7 +331,7 @@
<return type="PhysicsDirectBodyState2D" />
<argument index="0" name="body" type="RID" />
<description>
- Returns the [PhysicsDirectBodyState2D] of the body.
+ Returns the [PhysicsDirectBodyState2D] of the body. Returns [code]null[/code] if the body is destroyed or removed from the physics space.
</description>
</method>
<method name="body_get_max_contacts_reported" qualifiers="const">
@@ -855,28 +840,37 @@
<constant name="SHAPE_CUSTOM" value="8" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
- <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_OVERRIDE_MODE" value="0" enum="AreaParameter">
+ Constant to set/get gravity override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY" value="1" enum="AreaParameter">
Constant to set/get gravity strength in an area.
</constant>
- <constant name="AREA_PARAM_GRAVITY_VECTOR" value="1" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_VECTOR" value="2" enum="AreaParameter">
Constant to set/get gravity vector/center in an area.
</constant>
- <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="3" enum="AreaParameter">
Constant to set/get whether the gravity vector of an area is a direction, or a center point.
</constant>
- <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="4" enum="AreaParameter">
Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
</constant>
- <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="5" enum="AreaParameter">
This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE].
</constant>
- <constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter">
- Constant to set/get the linear dampening factor of an area.
+ <constant name="AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE" value="6" enum="AreaParameter">
+ Constant to set/get linear damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
+ </constant>
+ <constant name="AREA_PARAM_LINEAR_DAMP" value="7" enum="AreaParameter">
+ Constant to set/get the linear damping factor of an area.
+ </constant>
+ <constant name="AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE" value="8" enum="AreaParameter">
+ Constant to set/get angular damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
</constant>
- <constant name="AREA_PARAM_ANGULAR_DAMP" value="6" enum="AreaParameter">
- Constant to set/get the angular dampening factor of an area.
+ <constant name="AREA_PARAM_ANGULAR_DAMP" value="9" enum="AreaParameter">
+ Constant to set/get the angular damping factor of an area.
</constant>
- <constant name="AREA_PARAM_PRIORITY" value="7" enum="AreaParameter">
+ <constant name="AREA_PARAM_PRIORITY" value="10" enum="AreaParameter">
Constant to set/get the priority (order of processing) of an area.
</constant>
<constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0" enum="AreaSpaceOverrideMode">
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 0f02cdf92f..ceb3e788d2 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -85,13 +85,6 @@
Returns the space assigned to the area.
</description>
</method>
- <method name="area_get_space_override_mode" qualifiers="const">
- <return type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode" />
- <argument index="0" name="area" type="RID" />
- <description>
- Returns the space override mode for the area.
- </description>
- </method>
<method name="area_get_transform" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="area" type="RID" />
@@ -201,14 +194,6 @@
Assigns a space to the area.
</description>
</method>
- <method name="area_set_space_override_mode">
- <return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="mode" type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode" />
- <description>
- Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants.
- </description>
- </method>
<method name="area_set_transform">
<return type="void" />
<argument index="0" name="area" type="RID" />
@@ -320,7 +305,7 @@
<return type="PhysicsDirectBodyState3D" />
<argument index="0" name="body" type="RID" />
<description>
- Returns the [PhysicsDirectBodyState3D] of the body.
+ Returns the [PhysicsDirectBodyState3D] of the body. Returns [code]null[/code] if the body is destroyed or removed from the physics space.
</description>
</method>
<method name="body_get_max_contacts_reported" qualifiers="const">
@@ -1167,16 +1152,16 @@
Maximum acceleration for the motor at the axes.
</constant>
<constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT" value="0" enum="G6DOFJointAxisFlag">
- If [code]set[/code] there is linear motion possible within the given limits.
+ If set, linear motion is possible within the given limits.
</constant>
<constant name="G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT" value="1" enum="G6DOFJointAxisFlag">
- If [code]set[/code] there is rotational motion possible.
+ If set, rotational motion is possible.
</constant>
<constant name="G6DOF_JOINT_FLAG_ENABLE_MOTOR" value="4" enum="G6DOFJointAxisFlag">
- If [code]set[/code] there is a rotational motor across these axes.
+ If set, there is a rotational motor across these axes.
</constant>
<constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR" value="5" enum="G6DOFJointAxisFlag">
- If [code]set[/code] there is a linear motor on this axis that targets a specific velocity.
+ If set, there is a linear motor on this axis that targets a specific velocity.
</constant>
<constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType">
The [Shape3D] is a [WorldBoundaryShape3D].
@@ -1211,40 +1196,49 @@
<constant name="SHAPE_CUSTOM" value="10" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
- <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_OVERRIDE_MODE" value="0" enum="AreaParameter">
+ Constant to set/get gravity override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
+ </constant>
+ <constant name="AREA_PARAM_GRAVITY" value="1" enum="AreaParameter">
Constant to set/get gravity strength in an area.
</constant>
- <constant name="AREA_PARAM_GRAVITY_VECTOR" value="1" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_VECTOR" value="2" enum="AreaParameter">
Constant to set/get gravity vector/center in an area.
</constant>
- <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="3" enum="AreaParameter">
Constant to set/get whether the gravity vector of an area is a direction, or a center point.
</constant>
- <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="4" enum="AreaParameter">
Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
</constant>
- <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter">
+ <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="5" enum="AreaParameter">
This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE].
</constant>
- <constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter">
- Constant to set/get the linear dampening factor of an area.
+ <constant name="AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE" value="6" enum="AreaParameter">
+ Constant to set/get linear damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
+ </constant>
+ <constant name="AREA_PARAM_LINEAR_DAMP" value="7" enum="AreaParameter">
+ Constant to set/get the linear damping factor of an area.
+ </constant>
+ <constant name="AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE" value="8" enum="AreaParameter">
+ Constant to set/get angular damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
</constant>
- <constant name="AREA_PARAM_ANGULAR_DAMP" value="6" enum="AreaParameter">
- Constant to set/get the angular dampening factor of an area.
+ <constant name="AREA_PARAM_ANGULAR_DAMP" value="9" enum="AreaParameter">
+ Constant to set/get the angular damping factor of an area.
</constant>
- <constant name="AREA_PARAM_PRIORITY" value="7" enum="AreaParameter">
+ <constant name="AREA_PARAM_PRIORITY" value="10" enum="AreaParameter">
Constant to set/get the priority (order of processing) of an area.
</constant>
- <constant name="AREA_PARAM_WIND_FORCE_MAGNITUDE" value="8" enum="AreaParameter">
+ <constant name="AREA_PARAM_WIND_FORCE_MAGNITUDE" value="11" enum="AreaParameter">
Constant to set/get the magnitude of area-specific wind force.
</constant>
- <constant name="AREA_PARAM_WIND_SOURCE" value="9" enum="AreaParameter">
+ <constant name="AREA_PARAM_WIND_SOURCE" value="12" enum="AreaParameter">
Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows.
</constant>
- <constant name="AREA_PARAM_WIND_DIRECTION" value="10" enum="AreaParameter">
+ <constant name="AREA_PARAM_WIND_DIRECTION" value="13" enum="AreaParameter">
Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows.
</constant>
- <constant name="AREA_PARAM_WIND_ATTENUATION_FACTOR" value="11" enum="AreaParameter">
+ <constant name="AREA_PARAM_WIND_ATTENUATION_FACTOR" value="14" enum="AreaParameter">
Constant to set/get the exponential rate at which wind force decreases with distance from its origin.
</constant>
<constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0" enum="AreaSpaceOverrideMode">
diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml
index abd19f1326..455f0b67dc 100644
--- a/doc/classes/PhysicsShapeQueryParameters2D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters2D.xml
@@ -16,7 +16,7 @@
If [code]true[/code], the query will take [PhysicsBody2D]s into account.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
- The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml
index 2dffd5347a..789ce0a6c3 100644
--- a/doc/classes/PhysicsShapeQueryParameters3D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters3D.xml
@@ -16,7 +16,7 @@
If [code]true[/code], the query will take [PhysicsBody3D]s into account.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
- The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index a20607d0a7..37a8e00b49 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -7,7 +7,7 @@
Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
</tutorials>
<constructors>
<constructor name="Plane">
@@ -180,6 +180,8 @@
<return type="bool" />
<argument index="0" name="right" type="Plane" />
<description>
+ Returns [code]true[/code] if the planes are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator ==">
@@ -191,16 +193,20 @@
<return type="bool" />
<argument index="0" name="right" type="Plane" />
<description>
+ Returns [code]true[/code] if the planes are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator unary+">
<return type="Plane" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Plane" />
<description>
+ Returns the negative value of the [Plane]. This is the same as writing [code]Plane(-p.normal, -p.d)[/code]. This operation flips the direction of the normal vector and also flips the distance value, resulting in a Plane that is in the same place, but facing the opposite direction.
</description>
</operator>
</operators>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 044325afbe..4eb3ef34b4 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -15,7 +15,7 @@
<return type="void" />
<argument index="0" name="label" type="String" />
<argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="accel" type="int" default="0" />
+ <argument index="2" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new checkable item with text [code]label[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
@@ -38,7 +38,7 @@
<argument index="0" name="texture" type="Texture2D" />
<argument index="1" name="label" type="String" />
<argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="accel" type="int" default="0" />
+ <argument index="3" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new checkable item with text [code]label[/code] and icon [code]texture[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
@@ -62,7 +62,7 @@
<argument index="0" name="texture" type="Texture2D" />
<argument index="1" name="label" type="String" />
<argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="accel" type="int" default="0" />
+ <argument index="3" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new item with text [code]label[/code] and icon [code]texture[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
@@ -73,7 +73,7 @@
<argument index="0" name="texture" type="Texture2D" />
<argument index="1" name="label" type="String" />
<argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="accel" type="int" default="0" />
+ <argument index="3" name="accel" type="int" enum="Key" default="0" />
<description>
Same as [method add_icon_check_item], but uses a radio check button.
</description>
@@ -103,7 +103,7 @@
<return type="void" />
<argument index="0" name="label" type="String" />
<argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="accel" type="int" default="0" />
+ <argument index="2" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new item with text [code]label[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
@@ -115,7 +115,7 @@
<argument index="1" name="max_states" type="int" />
<argument index="2" name="default_state" type="int" default="0" />
<argument index="3" name="id" type="int" default="-1" />
- <argument index="4" name="accel" type="int" default="0" />
+ <argument index="4" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new multistate item with text [code]label[/code].
Contrarily to normal binary items, multistate items can have more than two states, as defined by [code]max_states[/code]. Each press or activate of the item will increase the state by one. The default value is defined by [code]default_state[/code].
@@ -126,7 +126,7 @@
<return type="void" />
<argument index="0" name="label" type="String" />
<argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="accel" type="int" default="0" />
+ <argument index="2" name="accel" type="int" enum="Key" default="0" />
<description>
Adds a new radio check button with text [code]label[/code].
An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
@@ -193,7 +193,7 @@
</description>
</method>
<method name="get_item_accelerator" qualifiers="const">
- <return type="int" />
+ <return type="int" enum="Key" />
<argument index="0" name="idx" type="int" />
<description>
Returns the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
@@ -333,7 +333,7 @@
<method name="set_item_accelerator">
<return type="void" />
<argument index="0" name="idx" type="int" />
- <argument index="1" name="accel" type="int" />
+ <argument index="1" name="accel" type="int" enum="Key" />
<description>
Sets the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 205987f5be..e0371a6a4a 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -6,8 +6,8 @@
<description>
Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog.
- [b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url].
- [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
+ [b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=$DOCS_URL/tutorials/export/feature_tags.html]feature tags[/url].
+ [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=$DOCS_URL/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
@@ -87,7 +87,7 @@
<return type="String" />
<argument index="0" name="path" type="String" />
<description>
- Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path].
+ Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path].
[b]Note:[/b] [method globalize_path] with [code]res://[/code] will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project:
[codeblock]
var path = ""
@@ -196,13 +196,17 @@
Background color for the boot splash.
</member>
<member name="application/boot_splash/fullsize" type="bool" setter="" getter="" default="true">
- If [code]true[/code], scale the boot splash image to the full window length when engine starts. If [code]false[/code], the engine will leave it at the default pixel size.
+ If [code]true[/code], scale the boot splash image to the full window size (preserving the aspect ratio) when the engine starts. If [code]false[/code], the engine will leave it at the default pixel size.
</member>
<member name="application/boot_splash/image" type="String" setter="" getter="" default="&quot;&quot;">
- Path to an image used as the boot splash.
+ Path to an image used as the boot splash. If left empty, the default Godot Engine splash will be displayed instead.
+ [b]Note:[/b] Only effective if [member application/boot_splash/show_image] is [code]true[/code].
+ </member>
+ <member name="application/boot_splash/show_image" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], displays the image specified in [member application/boot_splash/image] when the engine starts. If [code]false[/code], only displays the plain color specified in [member application/boot_splash/bg_color].
</member>
<member name="application/boot_splash/use_filter" type="bool" setter="" getter="" default="true">
- If [code]true[/code], applies linear filtering when scaling the image (recommended for high resolution artwork). If [code]false[/code], uses nearest-neighbor interpolation (recommended for pixel art).
+ If [code]true[/code], applies linear filtering when scaling the image (recommended for high-resolution artwork). If [code]false[/code], uses nearest-neighbor interpolation (recommended for pixel art).
</member>
<member name="application/config/custom_user_dir_name" type="String" setter="" getter="" default="&quot;&quot;">
This user directory is used for storing persistent data ([code]user://[/code] filesystem). If left empty, [code]user://[/code] resolves to a project-specific folder in Godot's own configuration folder (see [method OS.get_user_data_dir]). If a custom directory name is defined, this name will be used instead and appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in [method OS.get_user_data_dir]).
@@ -219,7 +223,7 @@
</member>
<member name="application/config/name" type="String" setter="" getter="" default="&quot;&quot;">
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.
+ [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=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] in the documentation for more information.
</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.
@@ -289,7 +293,9 @@
Safer override for [member audio/driver/mix_rate] in the Web platform. Here [code]0[/code] means "let the browser choose" (since some browsers do not like forcing the mix rate).
</member>
<member name="audio/driver/output_latency" type="int" setter="" getter="" default="15">
- Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware.
+ Specifies the preferred output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware.
+ Audio output latency may be constrained by the host operating system and audio hardware drivers. If the host can not provide the specified audio output latency then Godot will attempt to use the nearest latency allowed by the host. As such you should always use [method AudioServer.get_output_latency] to determine the actual audio output latency.
+ [b]Note:[/b] This setting is ignored on all versions of Windows prior to Windows 10.
</member>
<member name="audio/driver/output_latency.web" type="int" setter="" getter="" default="50">
Safer override for [member audio/driver/output_latency] in the Web platform, to avoid audio issues especially on mobile devices.
@@ -366,6 +372,9 @@
<member name="debug/gdscript/warnings/return_value_discarded" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the [enum Error] enum.
</member>
+ <member name="debug/gdscript/warnings/shadowed_global_identifier" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], enables warnings when defining a local or subclass member variable, signal, or enum that would have the same name as a built-in function or global class name, which possibly shadow it.
+ </member>
<member name="debug/gdscript/warnings/shadowed_variable" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable).
</member>
@@ -493,7 +502,7 @@
</member>
<member name="display/window/size/fullscreen" type="bool" setter="" getter="" default="false">
Sets the main window to full screen when the project starts. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
[b]Note:[/b] This setting is ignored on iOS, Android, and HTML5.
</member>
<member name="display/window/size/height" type="int" setter="" getter="" default="600">
@@ -1315,7 +1324,9 @@
</member>
<member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false">
</member>
- <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0">
+ <member name="mono/runtime/unhandled_exception_policy" type="int" setter="" getter="" default="0">
+ The policy to use for unhandled Mono (C#) exceptions. The default "Terminate Application" exits the project as soon as an unhandled exception is thrown. "Log Error" logs an error message to the console instead, and will not interrupt the project execution when an unhandled exception is thrown.
+ [b]Note:[/b] The unhandled exception policy is always set to "Log Error" in the editor, which also includes C# [code]tool[/code] scripts running within the editor as well as editor plugin code.
</member>
<member name="navigation/2d/default_cell_size" type="int" setter="" getter="" default="10">
Default cell size for 2D navigation maps. See [method NavigationServer2D.map_set_cell_size].
@@ -1495,12 +1506,8 @@
</member>
<member name="rendering/2d/snap/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false">
</member>
- <member name="rendering/3d/viewport/scale" type="float" setter="" getter="" default="1.0">
- Scales the 3D render buffer based on the viewport size and displays the result with linear filtering. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member rendering/anti_aliasing/quality/msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
- [b]Note:[/b] This property is only read when the project starts. To change the 3D rendering resolution scale at runtime, set [member Viewport.scale_3d] instead.
- </member>
<member name="rendering/anti_aliasing/quality/msaa" type="int" setter="" getter="" default="0">
- Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also [member rendering/3d/viewport/scale] for supersampling, which provides higher quality but is much more expensive.
+ Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also bilinear scaling 3d [member rendering/scaling_3d/mode] for supersampling, which provides higher quality but is much more expensive.
</member>
<member name="rendering/anti_aliasing/quality/screen_space_aa" type="int" setter="" getter="" default="0">
Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
@@ -1569,7 +1576,7 @@
Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color].
</member>
<member name="rendering/environment/defaults/default_environment" type="String" setter="" getter="" default="&quot;&quot;">
- [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here.
+ [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, you do not need to set this property.
</member>
<member name="rendering/environment/glow/upscale_mode" type="int" setter="" getter="" default="1">
Sets how the glow effect is upscaled before being copied onto the screen. Linear is faster, but looks blocky. Bicubic is slower but looks smooth.
@@ -1707,6 +1714,18 @@
<member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
</member>
+ <member name="rendering/scaling_3d/fsr_mipmap_bias" type="float" setter="" getter="" default="0.0">
+ Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
+ </member>
+ <member name="rendering/scaling_3d/fsr_sharpness" type="float" setter="" getter="" default="0.2">
+ Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
+ </member>
+ <member name="rendering/scaling_3d/mode" type="int" setter="" getter="" default="0">
+ Sets the scaling 3D mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
+ </member>
+ <member name="rendering/scaling_3d/scale" type="float" setter="" getter="" default="1.0">
+ Scales the 3D render buffer based on the viewport size uses an image filter specified in [member rendering/scaling_3d/mode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member rendering/anti_aliasing/quality/msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
+ </member>
<member name="rendering/shader_compiler/shader_cache/compress" type="bool" setter="" getter="" default="true">
</member>
<member name="rendering/shader_compiler/shader_cache/enabled" type="bool" setter="" getter="" default="true">
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 95b2316bf3..9fa2d9b60b 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -9,7 +9,7 @@
Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors.
</description>
<tutorials>
- <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
+ <link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<constructors>
@@ -195,54 +195,64 @@
<return type="bool" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Returns [code]true[/code] if the quaternions are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Composes these two quaternions by multiplying them together. This has the effect of rotating the second quaternion (the child) by the first quaternion (the parent).
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Rotates (multiplies) the [Vector3] by the given [Quaternion].
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator +">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Adds each component of the left [Quaternion] to the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations.
</description>
</operator>
<operator name="operator -">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Subtracts each component of the left [Quaternion] by the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator /">
<return type="Quaternion" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator /">
<return type="Quaternion" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator ==">
@@ -254,22 +264,27 @@
<return type="bool" />
<argument index="0" name="right" type="Quaternion" />
<description>
+ Returns [code]true[/code] if the quaternions are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator []">
<return type="float" />
<argument index="0" name="index" type="int" />
<description>
+ Access quaternion components using their index. [code]q[0][/code] is equivalent to [code]q.x[/code], [code]q[1][/code] is equivalent to [code]q.y[/code], [code]q[2][/code] is equivalent to [code]q.z[/code], and [code]q[3][/code] is equivalent to [code]q.w[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Quaternion" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Quaternion" />
<description>
+ Returns the negative value of the [Quaternion]. This is the same as writing [code]Quaternion(-q.x, -q.y, -q.z, -q.w)[/code]. This operation results in a quaternion that represents the same rotation.
</description>
</operator>
</operators>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index c011755df1..53d1554272 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -16,7 +16,7 @@
[b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
</description>
<tutorials>
- <link title="Random number generation">https://docs.godotengine.org/en/latest/tutorials/math/random_number_generation.html</link>
+ <link title="Random number generation">$DOCS_URL/tutorials/math/random_number_generation.html</link>
</tutorials>
<methods>
<method name="randf">
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index 592c074a77..fe2885378a 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -11,7 +11,7 @@
RayCast2D calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
</description>
<tutorials>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="add_exception">
@@ -63,7 +63,7 @@
<method name="get_collision_normal" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the normal of the intersecting object's shape at the collision point.
+ Returns the normal of the intersecting object's shape at the collision point, or [code]Vector2(0, 0)[/code] if the ray starts inside the shape and [member hit_from_inside] is [code]true[/code].
</description>
</method>
<method name="get_collision_point" qualifiers="const">
@@ -110,7 +110,7 @@
If [code]true[/code], collision with [PhysicsBody2D]s will be reported.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
If [code]true[/code], collisions will be reported.
@@ -118,6 +118,9 @@
<member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
If [code]true[/code], the parent node will be excluded from collision detection.
</member>
+ <member name="hit_from_inside" type="bool" setter="set_hit_from_inside" getter="is_hit_from_inside_enabled" default="false">
+ If [code]true[/code], the ray will detect a hit when starting inside shapes. In this case the collision normal will be [code]Vector2(0, 0)[/code]. Does not affect concave polygon shapes.
+ </member>
<member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 50)">
The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml
index c7253e81c4..8abd3f84b1 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -11,7 +11,7 @@
RayCast3D calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use [method force_raycast_update] after adjusting the raycast.
</description>
<tutorials>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
@@ -65,7 +65,7 @@
<method name="get_collision_normal" qualifiers="const">
<return type="Vector3" />
<description>
- Returns the normal of the intersecting object's shape at the collision point.
+ Returns the normal of the intersecting object's shape at the collision point, or [code]Vector3(0, 0, 0)[/code] if the ray starts inside the shape and [member hit_from_inside] is [code]true[/code].
</description>
</method>
<method name="get_collision_point" qualifiers="const">
@@ -112,7 +112,7 @@
If [code]true[/code], collision with [PhysicsBody3D]s will be reported.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color(0, 0, 0, 1)">
The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [RayCast3D] is colliding with something.
@@ -127,6 +127,9 @@
<member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
If [code]true[/code], collisions will be ignored for this RayCast3D's immediate parent.
</member>
+ <member name="hit_from_inside" type="bool" setter="set_hit_from_inside" getter="is_hit_from_inside_enabled" default="false">
+ If [code]true[/code], the ray will detect a hit when starting inside shapes. In this case the collision normal will be [code]Vector3(0, 0, 0)[/code]. Does not affect shapes with no volume like concave polygon or heightmap.
+ </member>
<member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3(0, -1, 0)">
The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 01bec10ed8..65d1654c21 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -7,11 +7,12 @@
[Rect2] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
It uses floating-point coordinates. If you need integer coordinates, use [Rect2i] instead.
The 3D counterpart to [Rect2] is [AABB].
+ Negative values for [member size] are not supported and will not work for most methods. Use [method abs] to get a Rect2 with a positive size.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
- <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.html</link>
</tutorials>
<constructors>
<constructor name="Rect2">
@@ -71,7 +72,22 @@
<return type="Rect2" />
<argument index="0" name="to" type="Vector2" />
<description>
- Returns this [Rect2] expanded to include a given point.
+ Returns a copy of this [Rect2] expanded to include a given point.
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
+ # position (-3, 2), size (1, 1)
+ var rect = Rect2(Vector2(-3, 2), Vector2(1, 1))
+ # position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1)
+ var rect2 = rect.expand(Vector2(0, -1))
+ [/gdscript]
+ [csharp]
+ # position (-3, 2), size (1, 1)
+ var rect = new Rect2(new Vector2(-3, 2), new Vector2(1, 1));
+ # position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1)
+ var rect2 = rect.Expand(new Vector2(0, -1));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_area" qualifiers="const">
@@ -121,7 +137,8 @@
<return type="bool" />
<argument index="0" name="point" type="Vector2" />
<description>
- Returns [code]true[/code] if the [Rect2] contains a point.
+ Returns [code]true[/code] if the [Rect2] contains a point. By convention, the right and bottom edges of the [Rect2] are considered exclusive, so points on these edges are [b]not[/b] included.
+ [b]Note:[/b] This method is not reliable for [Rect2] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent rectangle to check for contained points.
</description>
</method>
<method name="intersection" qualifiers="const">
@@ -178,12 +195,15 @@
<return type="bool" />
<argument index="0" name="right" type="Rect2" />
<description>
+ Returns [code]true[/code] if the rectangles are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="Rect2" />
<argument index="0" name="right" type="Transform2D" />
<description>
+ Inversely transforms (multiplies) the [Rect2] by the given [Transform2D] transformation matrix.
</description>
</operator>
<operator name="operator ==">
@@ -195,6 +215,8 @@
<return type="bool" />
<argument index="0" name="right" type="Rect2" />
<description>
+ Returns [code]true[/code] if the rectangles are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
</operators>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index fc27c64fa5..5909784135 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -6,10 +6,11 @@
<description>
[Rect2i] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
It uses integer coordinates. If you need floating-point coordinates, use [Rect2] instead.
+ Negative values for [member size] are not supported and will not work for most methods. Use [method abs] to get a Rect2i with a positive size.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
</tutorials>
<constructors>
<constructor name="Rect2i">
@@ -69,7 +70,21 @@
<return type="Rect2i" />
<argument index="0" name="to" type="Vector2i" />
<description>
- Returns this [Rect2i] expanded to include a given point.
+ Returns a copy of this [Rect2i] expanded to include a given point.
+ [codeblocks]
+ [gdscript]
+ # position (-3, 2), size (1, 1)
+ var rect = Rect2i(Vector2i(-3, 2), Vector2i(1, 1))
+ # position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1)
+ var rect2 = rect.expand(Vector2i(0, -1))
+ [/gdscript]
+ [csharp]
+ # position (-3, 2), size (1, 1)
+ var rect = new Rect2i(new Vector2i(-3, 2), new Vector2i(1, 1));
+ # position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1)
+ var rect2 = rect.Expand(new Vector2i(0, -1));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_area" qualifiers="const">
@@ -120,7 +135,8 @@
<return type="bool" />
<argument index="0" name="point" type="Vector2i" />
<description>
- Returns [code]true[/code] if the [Rect2i] contains a point.
+ Returns [code]true[/code] if the [Rect2i] contains a point. By convention, the right and bottom edges of the [Rect2i] are considered exclusive, so points on these edges are [b]not[/b] included.
+ [b]Note:[/b] This method is not reliable for [Rect2i] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent rectangle to check for contained points.
</description>
</method>
<method name="intersection" qualifiers="const">
@@ -169,6 +185,7 @@
<return type="bool" />
<argument index="0" name="right" type="Rect2i" />
<description>
+ Returns [code]true[/code] if the rectangles are not equal.
</description>
</operator>
<operator name="operator ==">
@@ -180,6 +197,7 @@
<return type="bool" />
<argument index="0" name="right" type="Rect2i" />
<description>
+ Returns [code]true[/code] if the rectangles are equal.
</description>
</operator>
</operators>
diff --git a/doc/classes/RefCounted.xml b/doc/classes/RefCounted.xml
index de314fbcb7..378df6f155 100644
--- a/doc/classes/RefCounted.xml
+++ b/doc/classes/RefCounted.xml
@@ -10,7 +10,7 @@
[b]Note:[/b] In C#, reference-counted objects will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free reference-counted objects that are no longer in use. This means that unused ones will linger on for a while before being removed.
</description>
<tutorials>
- <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/tutorials/best_practices/node_alternatives.html</link>
+ <link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link>
</tutorials>
<methods>
<method name="init_ref">
diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml
index 1db6879b45..99ad067469 100644
--- a/doc/classes/ReferenceRect.xml
+++ b/doc/classes/ReferenceRect.xml
@@ -16,7 +16,7 @@
Sets the border width of the [ReferenceRect]. The border grows both inwards and outwards with respect to the rectangle box.
</member>
<member name="editor_only" type="bool" setter="set_editor_only" getter="get_editor_only" default="true">
- If set to [code]true[/code], the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in game.
+ If [code]true[/code], the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in the running project.
</member>
</members>
</class>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 7f2bd118d6..8bf8534334 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -8,7 +8,7 @@
The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [VoxelGI]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them.
</description>
<tutorials>
- <link title="Reflection probes">https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link>
+ <link title="Reflection probes">$DOCS_URL/tutorials/3d/reflection_probes.html</link>
</tutorials>
<members>
<member name="ambient_color" type="Color" setter="set_ambient_color" getter="get_ambient_color" default="Color(0, 0, 0, 1)">
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 68b79ff749..0700650a91 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -15,7 +15,7 @@
In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas.
</description>
<tutorials>
- <link title="Optimization using Servers">https://docs.godotengine.org/en/latest/tutorials/performance/using_servers.html</link>
+ <link title="Optimization using Servers">$DOCS_URL/tutorials/performance/using_servers.html</link>
</tutorials>
<methods>
<method name="bake_render_uv2">
@@ -2661,8 +2661,10 @@
<return type="RID" />
<argument index="0" name="shader" type="RID" />
<argument index="1" name="param" type="StringName" />
+ <argument index="2" name="index" type="int" default="0" />
<description>
Returns a default texture from a shader searched by name.
+ [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
</description>
</method>
<method name="shader_get_param_default" qualifiers="const">
@@ -2684,8 +2686,10 @@
<argument index="0" name="shader" type="RID" />
<argument index="1" name="param" type="StringName" />
<argument index="2" name="texture" type="RID" />
+ <argument index="3" name="index" type="int" default="0" />
<description>
Sets a shader's default texture. Overwrites the texture given by name.
+ [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
</description>
</method>
<method name="shadows_quality_set">
@@ -3096,6 +3100,22 @@
If [code]true[/code], rendering of a viewport's environment is disabled.
</description>
</method>
+ <method name="viewport_set_fsr_mipmap_bias">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="mipmap_bias" type="float" />
+ <description>
+ Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
+ </description>
+ </method>
+ <method name="viewport_set_fsr_sharpness">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="sharpness" type="float" />
+ <description>
+ Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
+ </description>
+ </method>
<method name="viewport_set_global_canvas_transform">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
@@ -3147,12 +3167,21 @@
If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.
</description>
</method>
- <method name="viewport_set_scale_3d">
+ <method name="viewport_set_scaling_3d_mode">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="scaling_3d_mode" type="int" enum="RenderingServer.ViewportScaling3DMode" />
+ <description>
+ Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
+ </description>
+ </method>
+ <method name="viewport_set_scaling_3d_scale">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
<argument index="1" name="scale" type="float" />
<description>
- Sets the scale at which we render 3D contents.
+ Scales the 3D render buffer based on the viewport size uses an image filter specified in [enum ViewportScaling3DMode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [enum ViewportMSAA] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
+ When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.
</description>
</method>
<method name="viewport_set_scenario">
@@ -3840,6 +3869,14 @@
<constant name="FOG_VOLUME_SHAPE_WORLD" value="2" enum="FogVolumeShape">
[FogVolume] will have no shape, will cover the whole world and will not be culled.
</constant>
+ <constant name="VIEWPORT_SCALING_3D_MODE_BILINEAR" value="0" enum="ViewportScaling3DMode">
+ Enables bilinear scaling on 3D viewports. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="VIEWPORT_SCALING_3D_MODE_FSR" value="1" enum="ViewportScaling3DMode">
+ Enables FSR upscaling on 3D viewports. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear supersampling will be used instead. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="VIEWPORT_SCALING_3D_MODE_MAX" value="2" enum="ViewportScaling3DMode">
+ </constant>
<constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode">
Do not update the viewport.
</constant>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 327183893b..02d1c7e97d 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -8,8 +8,8 @@
[b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed.
</description>
<tutorials>
- <link title="Resources">https://docs.godotengine.org/en/latest/tutorials/scripting/resources.html</link>
- <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/tutorials/best_practices/node_alternatives.html</link>
+ <link title="Resources">$DOCS_URL/tutorials/scripting/resources.html</link>
+ <link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link>
</tutorials>
<methods>
<method name="duplicate" qualifiers="const">
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
index 9f551ad1d2..f20b55fbc8 100644
--- a/doc/classes/ResourceImporter.xml
+++ b/doc/classes/ResourceImporter.xml
@@ -7,7 +7,7 @@
This is the base class for the resource importers implemented in core. To implement your own resource importers using editor plugins, see [EditorImportPlugin].
</description>
<tutorials>
- <link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link>
+ <link title="Import plugins">$DOCS_URL/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
<constants>
<constant name="IMPORT_ORDER_DEFAULT" value="0" enum="ImportOrder">
diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml
index 62323722f7..4329ccfdf5 100644
--- a/doc/classes/RichTextEffect.xml
+++ b/doc/classes/RichTextEffect.xml
@@ -19,7 +19,7 @@
[b]Note:[/b] As soon as a [RichTextLabel] contains at least one [RichTextEffect], it will continuously process the effect unless the project is paused. This may impact battery life negatively.
</description>
<tutorials>
- <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/ui/bbcode_in_richtextlabel.html</link>
+ <link title="BBCode in RichTextLabel">$DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html</link>
<link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<methods>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 3255c748b7..6bfaca8928 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -11,7 +11,7 @@
[b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property.
</description>
<tutorials>
- <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/ui/bbcode_in_richtextlabel.html</link>
+ <link title="BBCode in RichTextLabel">$DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html</link>
<link title="GUI Rich Text/BBcode Demo">https://godotengine.org/asset-library/asset/132</link>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
diff --git a/doc/classes/RigidDynamicBody3D.xml b/doc/classes/RigidDynamicBody3D.xml
index ba9acdf4bf..c75055e0df 100644
--- a/doc/classes/RigidDynamicBody3D.xml
+++ b/doc/classes/RigidDynamicBody3D.xml
@@ -10,7 +10,7 @@
If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator].
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml
index 5db13de44f..203a48996f 100644
--- a/doc/classes/RootMotionView.xml
+++ b/doc/classes/RootMotionView.xml
@@ -8,7 +8,7 @@
[b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project, and will also be converted to a plain [Node] in the running project. This means a script attached to a [RootMotionView] node [i]must[/i] have [code]extends Node[/code] instead of [code]extends RootMotionView[/code]. Additionally, it must not be a [code]@tool[/code] script.
</description>
<tutorials>
- <link title="Using AnimationTree - Root motion">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#root-motion</link>
+ <link title="Using AnimationTree - Root motion">$DOCS_URL/tutorials/animation/animation_tree.html#root-motion</link>
</tutorials>
<members>
<member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path">
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 6d0ec44b69..c1dca44896 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -9,8 +9,8 @@
[SceneTree] is the default [MainLoop] implementation used by scenes, and is thus in charge of the game loop.
</description>
<tutorials>
- <link title="SceneTree">https://docs.godotengine.org/en/latest/tutorials/scripting/scene_tree.html</link>
- <link title="Multiple resolutions">https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html</link>
+ <link title="SceneTree">$DOCS_URL/tutorials/scripting/scene_tree.html</link>
+ <link title="Multiple resolutions">$DOCS_URL/tutorials/rendering/multiple_resolutions.html</link>
</tutorials>
<methods>
<method name="call_group" qualifiers="vararg">
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 7c59e87848..ab88bdaa73 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -8,7 +8,7 @@
The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
- <link title="Scripting documentation index">https://docs.godotengine.org/en/latest/tutorials/scripting/index.html</link>
+ <link title="Scripting documentation index">$DOCS_URL/tutorials/scripting/index.html</link>
</tutorials>
<methods>
<method name="can_instantiate" qualifiers="const">
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index 9ff9cc0c87..9e1d8012b7 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -7,7 +7,7 @@
A synchronization semaphore which can be used to synchronize multiple [Thread]s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see [Mutex].
</description>
<tutorials>
- <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/performance/using_multiple_threads.html</link>
+ <link title="Using multiple threads">$DOCS_URL/tutorials/performance/using_multiple_threads.html</link>
</tutorials>
<methods>
<method name="post">
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index 99e38e969d..d81b4bc372 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -7,15 +7,17 @@
This class allows you to define a custom shader program that can be used by a [ShaderMaterial]. Shaders allow you to write your own custom behavior for rendering objects or updating particle information. For a detailed explanation and usage, please see the tutorials linked below.
</description>
<tutorials>
- <link title="Shaders documentation index">https://docs.godotengine.org/en/latest/tutorials/shaders/index.html</link>
+ <link title="Shaders documentation index">$DOCS_URL/tutorials/shaders/index.html</link>
</tutorials>
<methods>
<method name="get_default_texture_param" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="param" type="StringName" />
+ <argument index="1" name="index" type="int" default="0" />
<description>
Returns the texture that is set as default for the specified parameter.
[b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
+ [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
</description>
</method>
<method name="get_mode" qualifiers="const">
@@ -36,9 +38,11 @@
<return type="void" />
<argument index="0" name="param" type="StringName" />
<argument index="1" name="texture" type="Texture2D" />
+ <argument index="2" name="index" type="int" default="0" />
<description>
Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial].
[b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
+ [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
</description>
</method>
</methods>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index d5fc3fd210..04f0fac104 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -7,7 +7,7 @@
A material that uses a custom [Shader] program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader.
</description>
<tutorials>
- <link title="Shaders documentation index">https://docs.godotengine.org/en/latest/tutorials/shaders/index.html</link>
+ <link title="Shaders documentation index">$DOCS_URL/tutorials/shaders/index.html</link>
</tutorials>
<methods>
<method name="get_shader_param" qualifiers="const">
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index 04f91d19da..9746519173 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -7,7 +7,7 @@
Base class for all 2D shapes. All 2D shape types inherit from this.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
</tutorials>
<methods>
<method name="collide">
diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml
index 96f8833486..67af52768f 100644
--- a/doc/classes/Shape3D.xml
+++ b/doc/classes/Shape3D.xml
@@ -7,7 +7,7 @@
Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a [PhysicsBody3D] or [Area3D] objects.
</description>
<tutorials>
- <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
</tutorials>
<methods>
<method name="get_debug_mesh">
diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml
new file mode 100644
index 0000000000..74ebafe069
--- /dev/null
+++ b/doc/classes/ShapeCast2D.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ShapeCast2D" inherits="Node2D" version="4.0">
+ <brief_description>
+ Node for physics collision sweep and immediate overlap queries. Similar to the [RayCast2D] node.
+ </brief_description>
+ <description>
+ Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons).
+ Immediate collision overlaps can be done with the [member target_position] set to [code]Vector2(0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area2D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area2D] nodes, and when using the signals creates unnecessary complexity.
+ The node can detect multiple collision objects, but usually the first detected collision
+ [b]Note:[/b] shape casting is more computationally expensive compared to ray casting.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_exception">
+ <return type="void" />
+ <argument index="0" name="node" type="Object" />
+ <description>
+ Adds a collision exception so the shape does not report collisions with the specified node.
+ </description>
+ </method>
+ <method name="add_exception_rid">
+ <return type="void" />
+ <argument index="0" name="rid" type="RID" />
+ <description>
+ Adds a collision exception so the shape does not report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="clear_exceptions">
+ <return type="void" />
+ <description>
+ Removes all collision exceptions for this shape.
+ </description>
+ </method>
+ <method name="force_shapecast_update">
+ <return type="void" />
+ <description>
+ Updates the collision information for the shape. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the shape or its parent has changed state.
+ [b]Note:[/b] [code]enabled == true[/code] is not required for this to work.
+ </description>
+ </method>
+ <method name="get_closest_collision_safe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction of the motion (between 0 and 1) of how far the shape can move without triggering a collision. The motion is determined by [member target_position].
+ </description>
+ </method>
+ <method name="get_closest_collision_unsafe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction of the motion (between 0 and 1) when the shape triggers a collision. The motion is determined by [member target_position].
+ </description>
+ </method>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the shape ID of one of the multiple collisions at [code]index[/code] that the shape intersects, or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
+ <method name="get_collision_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by [method get_collider], [method get_collider_shape], [method get_collision_point], and [method get_collision_normal] methods.
+ </description>
+ </method>
+ <method name="get_collision_mask_value" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="layer_number" type="int" />
+ <description>
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ <method name="get_collision_normal" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the normal containing one of the multiple collisions at [code]index[/code] of the intersecting object.
+ </description>
+ </method>
+ <method name="get_collision_point" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the collision point containing one of the multiple collisions at [code]index[/code] at which the shape intersects the object.
+ [b]Note:[/b] this point is in the [b]global[/b] coordinate system.
+ </description>
+ </method>
+ <method name="is_colliding" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether any object is intersecting with the shape's vector (considering the vector length).
+ </description>
+ </method>
+ <method name="remove_exception">
+ <return type="void" />
+ <argument index="0" name="node" type="Object" />
+ <description>
+ Removes a collision exception so the shape does report collisions with the specified node.
+ </description>
+ </method>
+ <method name="remove_exception_rid">
+ <return type="void" />
+ <argument index="0" name="rid" type="RID" />
+ <description>
+ Removes a collision exception so the shape does report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="set_collision_mask_value">
+ <return type="void" />
+ <argument index="0" name="layer_number" type="int" />
+ <argument index="1" name="value" type="bool" />
+ <description>
+ Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
+ If [code]true[/code], collision with [Area2D]s will be reported.
+ </member>
+ <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
+ If [code]true[/code], collision with [PhysicsBody2D]s will be reported.
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
+ The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected.
+ </member>
+ <member name="collision_result" type="Array" setter="" getter="_get_collision_result" default="[]">
+ A complete collision information. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method.
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
+ If [code]true[/code], collisions will be reported.
+ </member>
+ <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
+ If [code]true[/code], the parent node will be excluded from collision detection.
+ </member>
+ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision.
+ </member>
+ <member name="max_results" type="int" setter="set_max_results" getter="get_max_results" default="32">
+ The number of intersections can be limited with this parameter, to reduce the processing time.
+ </member>
+ <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
+ Any [Shape2D] derived shape used for collision queries.
+ </member>
+ <member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 50)">
+ The shape's destination point, relative to this node's [code]position[/code].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 7aa06985bf..20bec14795 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -8,7 +8,7 @@
To setup different types of inverse kinematics for the given Skeleton2D, a [SkeletonModificationStack2D] should be created. They can be applied by creating the desired number of modifications, which can be done by increasing [member SkeletonModificationStack2D.modification_count].
</description>
<tutorials>
- <link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link>
+ <link title="2D skeletons">$DOCS_URL/tutorials/animation/2d_skeletons.html</link>
</tutorials>
<methods>
<method name="execute_modifications">
diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml
index 80f8ba4e5b..0e83cd0b28 100644
--- a/doc/classes/SkeletonModification3DTwoBoneIK.xml
+++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml
@@ -4,7 +4,7 @@
A modification that moves two bones to reach the target.
</brief_description>
<description>
- This [SkeletonModification3D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three verticies of the triangle. Because the algorithm works by making a triangle, it can only opperate on two bones.
+ This [SkeletonModification3D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only opperate on two bones.
TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification3DFABRIK], but gives similar, natural looking results.
A [Node3D]-based node can be used to define the pole, or bend direction, allowing control over which direction the joint takes when bending to reach the target when the target is within reach.
</description>
diff --git a/doc/classes/SoftDynamicBody3D.xml b/doc/classes/SoftDynamicBody3D.xml
index f999f77e78..fceebddf35 100644
--- a/doc/classes/SoftDynamicBody3D.xml
+++ b/doc/classes/SoftDynamicBody3D.xml
@@ -7,7 +7,7 @@
A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials.
</description>
<tutorials>
- <link title="SoftBody">https://docs.godotengine.org/en/latest/tutorials/physics/soft_body.html</link>
+ <link title="SoftBody">$DOCS_URL/tutorials/physics/soft_body.html</link>
</tutorials>
<methods>
<method name="add_collision_exception_with">
@@ -92,11 +92,11 @@
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
The physics layers this SoftDynamicBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The physics layers this SoftDynamicBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
- [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01">
</member>
diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml
index 8c10ec36a8..f9f9a62baa 100644
--- a/doc/classes/SpotLight3D.xml
+++ b/doc/classes/SpotLight3D.xml
@@ -7,7 +7,7 @@
A Spotlight is a type of [Light3D] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of [Light3D].
</description>
<tutorials>
- <link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<members>
diff --git a/doc/classes/SpringArm3D.xml b/doc/classes/SpringArm3D.xml
index 2cd8fa71cf..a54578cff4 100644
--- a/doc/classes/SpringArm3D.xml
+++ b/doc/classes/SpringArm3D.xml
@@ -41,7 +41,7 @@
</methods>
<members>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The layers against which the collision check shall be done. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ The layers against which the collision check shall be done. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.01">
When the collision check is made, a candidate length for the SpringArm3D is given.
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index 5a7fd537e0..4ad78429e9 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -36,5 +36,10 @@
Emitted when the [member frame] changes.
</description>
</signal>
+ <signal name="texture_changed">
+ <description>
+ Emitted when the [member texture] changes.
+ </description>
+ </signal>
</signals>
</class>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index b723c9f4d4..32abd1caea 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -60,7 +60,8 @@
If [code]true[/code], texture is flipped vertically.
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
- A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light.
+ A color value used to [i]multiply[/i] the texture's colors. Can be used for mood-coloring or to simulate the color of light.
+ [b]Note:[/b] If a [member GeometryInstance3D.material_override] is defined on the [SpriteBase3D], the material override must be configured to take vertex colors into account for albedo. Otherwise, the color defined in [member modulate] will be ignored. For a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] must be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/color] must be inserted in the shader's [code]fragment()[/code] function.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The texture's drawing offset.
diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml
index 43ba95e345..1a8bf0e202 100644
--- a/doc/classes/StandardMaterial3D.xml
+++ b/doc/classes/StandardMaterial3D.xml
@@ -5,6 +5,6 @@
<description>
</description>
<tutorials>
- <link title="Standard Material 3D">https://docs.godotengine.org/en/latest/tutorials/3d/standard_material_3d.html</link>
+ <link title="Standard Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
</tutorials>
</class>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index 50389f912d..5e6e07fe36 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -8,7 +8,7 @@
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
- <link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link>
+ <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
<method name="accept_stream">
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index a58bfd5c15..ce902c1216 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -7,7 +7,7 @@
This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference-counted and use a copy-on-write approach, so passing them around is cheap in resources.
</description>
<tutorials>
- <link title="GDScript format strings">https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_format_string.html</link>
+ <link title="GDScript format strings">$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html</link>
</tutorials>
<constructors>
<constructor name="String">
diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml
index c2a76b587f..f0b85cdad5 100644
--- a/doc/classes/SubViewport.xml
+++ b/doc/classes/SubViewport.xml
@@ -6,8 +6,8 @@
<description>
</description>
<tutorials>
- <link title="Using Viewports">https://docs.godotengine.org/en/latest/tutorials/rendering/viewports.html</link>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
+ <link title="Using Viewports">$DOCS_URL/tutorials/rendering/viewports.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
<link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link>
<link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 1f32bba5a1..ad1e5c0050 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -4,8 +4,9 @@
Tabbed container.
</brief_description>
<description>
- Sets the active tab's [code]visible[/code] property to the value [code]true[/code]. Sets all other children's to [code]false[/code].
+ Arranges [Control] children into a tabbed view, creating a tab for each one. The active tab's corresponding [Control] has its [code]visible[/code] property set to [code]true[/code], and all other children's to [code]false[/code].
Ignores non-[Control] children.
+ [b]Note:[/b] The drawing of the clickable tabs themselves is handled by this node. Adding [TabBar]s as children is not needed.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index b8e2f7f03c..d14f8a9b35 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -233,8 +233,9 @@
<method name="get_line_column_at_pos" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="position" type="Vector2i" />
+ <argument index="1" name="allow_out_of_bounds" type="bool" default="true" />
<description>
- Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line.
+ Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If [code]allow_out_of_bounds[/code] is [code]false[/code] and the position is not over the text, both vector values will be set to [code]-1[/code].
</description>
</method>
<method name="get_line_count" qualifiers="const">
@@ -361,6 +362,24 @@
Returns OpenType feature [code]tag[/code].
</description>
</method>
+ <method name="get_pos_at_line_column" qualifiers="const">
+ <return type="Vector2i" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="column" type="int" />
+ <description>
+ Returns the local position for the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] of the returned vector equal [code]-1[/code], the position is outside of the viewable area of the control.
+ [b]Note:[/b] The Y position corresponds to the bottom side of the line. Use [method get_rect_at_line_column] to get the top side position.
+ </description>
+ </method>
+ <method name="get_rect_at_line_column" qualifiers="const">
+ <return type="Rect2i" />
+ <argument index="0" name="line" type="int" />
+ <argument index="1" name="column" type="int" />
+ <description>
+ Returns the local position and size for the grapheme at the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] position of the returned rect equal [code]-1[/code], the position is outside of the viewable area of the control.
+ [b]Note:[/b] The Y position of the returned rect corresponds to the top side of the line, unlike [method get_pos_at_line_column] which returns the bottom side.
+ </description>
+ </method>
<method name="get_saved_version" qualifiers="const">
<return type="int" />
<description>
@@ -453,6 +472,14 @@
Returns the number of visible lines, including wrapped text.
</description>
</method>
+ <method name="get_visible_line_count_in_range" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="from_line" type="int" />
+ <argument index="1" name="to_line" type="int" />
+ <description>
+ Returns the total number of visible + wrapped lines between the two lines.
+ </description>
+ </method>
<method name="get_word_at_pos" qualifiers="const">
<return type="String" />
<argument index="0" name="position" type="Vector2" />
@@ -559,6 +586,13 @@
Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided).
</description>
</method>
+ <method name="is_mouse_over_selection" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="edges" type="bool" />
+ <description>
+ Returns whether the mouse is over selection. If [code]edges[/code] is [code]true[/code], the edges are considered part of the selection.
+ </description>
+ </method>
<method name="is_overtype_mode_enabled" qualifiers="const">
<return type="bool" />
<description>
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index e1c05165de..512078c56c 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -1028,6 +1028,14 @@
Returns text glyphs in the visual order.
</description>
</method>
+ <method name="shaped_text_get_grapheme_bounds" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="pos" type="int" />
+ <description>
+ Returns composite character's bounds as offsets from the start of the line.
+ </description>
+ </method>
<method name="shaped_text_get_line_breaks" qualifiers="const">
<return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 684a1aa755..32f8107e0a 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -1037,6 +1037,14 @@
Copies text glyphs in the visual order, into preallocated array of the size returned by [method _shaped_text_get_glyph_count].
</description>
</method>
+ <method name="_shaped_text_get_grapheme_bounds" qualifiers="virtual const">
+ <return type="Vector2" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument index="1" name="pos" type="int" />
+ <description>
+ Returns composite character's bounds as offsets from the start of the line.
+ </description>
+ </method>
<method name="_shaped_text_get_line_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<argument index="0" name="shaped" type="RID" />
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index 52a419ce0f..d1a48fda55 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -8,7 +8,7 @@
Theme resources can alternatively be loaded by writing them in a [code].theme[/code] file, see the documentation for more information.
</description>
<tutorials>
- <link title="GUI skinning">https://docs.godotengine.org/en/latest/tutorials/ui/gui_skinning.html</link>
+ <link title="GUI skinning">$DOCS_URL/tutorials/ui/gui_skinning.html</link>
</tutorials>
<methods>
<method name="clear">
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index eb2df8a4f9..bd9a6c865a 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -8,8 +8,8 @@
[b]Note:[/b] Breakpoints won't break on code if it's running in a thread. This is a current limitation of the GDScript debugger.
</description>
<tutorials>
- <link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/performance/using_multiple_threads.html</link>
- <link title="Thread-safe APIs">https://docs.godotengine.org/en/latest/tutorials/performance/thread_safe_apis.html</link>
+ <link title="Using multiple threads">$DOCS_URL/tutorials/performance/using_multiple_threads.html</link>
+ <link title="Thread-safe APIs">$DOCS_URL/tutorials/performance/thread_safe_apis.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 22d61c7285..6e552e3649 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -7,7 +7,7 @@
Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles which are used to create grid-based maps. A TileMap may have several layers, layouting tiles on top of each other.
</description>
<tutorials>
- <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
+ <link title="Using Tilemaps">$DOCS_URL/tutorials/2d/using_tilemaps.html</link>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
<link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link>
<link title="2D Hexagonal Demo">https://godotengine.org/asset-library/asset/111</link>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 45d6f9ca6c..5d9065f823 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -13,7 +13,7 @@
See the functions to add new layers for more information.
</description>
<tutorials>
- <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
+ <link title="Using Tilemaps">$DOCS_URL/tutorials/2d/using_tilemaps.html</link>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
<link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link>
<link title="2D Hexagonal Demo">https://godotengine.org/asset-library/asset/111</link>
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
index 881a1c3d07..6580c6bd4c 100644
--- a/doc/classes/TileSetAtlasSource.xml
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -45,6 +45,21 @@
Returns the alternative ID a following call to [method create_alternative_tile] would return.
</description>
</method>
+ <method name="get_runtime_texture" qualifiers="const">
+ <return type="Texture2D" />
+ <description>
+ If [member use_texture_padding] is [code]false[/code], returns [member texture]. Otherwise, returns and internal [ImageTexture] created that includes the padding.
+ </description>
+ </method>
+ <method name="get_runtime_tile_texture_region" qualifiers="const">
+ <return type="Rect2i" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="frame" type="int" />
+ <description>
+ Returns the region of the tile at coordinates [code]atlas_coords[/code] for frame [code]frame[/code] inside the texture returned by [method get_runtime_texture].
+ [b]Note:[/b] If [member use_texture_padding] is [code]false[/code], returns the same as [method get_tile_texture_region].
+ </description>
+ </method>
<method name="get_tile_animation_columns" qualifiers="const">
<return type="int" />
<argument index="0" name="atlas_coords" type="Vector2i" />
@@ -232,5 +247,9 @@
<member name="texture_region_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i(16, 16)">
The base tile size in the texture (in pixel). This size must be bigger than the TileSet's [code]tile_size[/code] value.
</member>
+ <member name="use_texture_padding" type="bool" setter="set_use_texture_padding" getter="get_use_texture_padding" default="true">
+ If [code]true[/code], generates an internal texture with an additional one pixel padding around each tile. Texture padding avoids a common artifact where lines appear between tiles.
+ Disabling this setting might lead a small performance improvement, as generating the internal texture requires both memory and processing time when the TileSetAtlasSource resource is modified.
+ </member>
</members>
</class>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index ab7632e08e..97cbf6918d 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -8,8 +8,8 @@
For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Matrices and transforms">$DOCS_URL/tutorials/math/matrices_and_transforms.html</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
@@ -213,30 +213,36 @@
<return type="bool" />
<argument index="0" name="right" type="Transform2D" />
<description>
+ Returns [code]true[/code] if the transforms are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="PackedVector2Array" />
<argument index="0" name="right" type="PackedVector2Array" />
<description>
+ Transforms (multiplies) each element of the [Vector2] array by the given [Transform2D] matrix.
</description>
</operator>
<operator name="operator *">
- <return type="Transform2D" />
- <argument index="0" name="right" type="Transform2D" />
+ <return type="Rect2" />
+ <argument index="0" name="right" type="Rect2" />
<description>
+ Transforms (multiplies) the [Rect2] by the given [Transform2D] matrix.
</description>
</operator>
<operator name="operator *">
- <return type="Rect2" />
- <argument index="0" name="right" type="Rect2" />
+ <return type="Transform2D" />
+ <argument index="0" name="right" type="Transform2D" />
<description>
+ Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent).
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Transforms (multiplies) the [Vector2] by the given [Transform2D] matrix.
</description>
</operator>
<operator name="operator *">
@@ -262,12 +268,15 @@
<return type="bool" />
<argument index="0" name="right" type="Transform2D" />
<description>
+ Returns [code]true[/code] if the transforms are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator []">
<return type="Vector2" />
<argument index="0" name="index" type="int" />
<description>
+ Access transform components using their index. [code]t[0][/code] is equivalent to [code]t.x[/code], [code]t[1][/code] is equivalent to [code]t.y[/code], and [code]t[2][/code] is equivalent to [code]t.origin[/code].
</description>
</operator>
</operators>
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index 8c4965abb4..e62cb9216e 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -8,9 +8,9 @@
For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
- <link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Matrices and transforms">$DOCS_URL/tutorials/math/matrices_and_transforms.html</link>
+ <link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.html</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
@@ -147,30 +147,36 @@
<return type="bool" />
<argument index="0" name="right" type="Transform3D" />
<description>
+ Returns [code]true[/code] if the transforms are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
- <return type="PackedVector3Array" />
- <argument index="0" name="right" type="PackedVector3Array" />
+ <return type="AABB" />
+ <argument index="0" name="right" type="AABB" />
<description>
+ Transforms (multiplies) the [AABB] by the given [Transform3D] matrix.
</description>
</operator>
<operator name="operator *">
- <return type="Transform3D" />
- <argument index="0" name="right" type="Transform3D" />
+ <return type="PackedVector3Array" />
+ <argument index="0" name="right" type="PackedVector3Array" />
<description>
+ Transforms (multiplies) each element of the [Vector3] array by the given [Transform3D] matrix.
</description>
</operator>
<operator name="operator *">
- <return type="AABB" />
- <argument index="0" name="right" type="AABB" />
+ <return type="Transform3D" />
+ <argument index="0" name="right" type="Transform3D" />
<description>
+ Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent).
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Transforms (multiplies) the [Vector3] by the given [Transform3D] matrix.
</description>
</operator>
<operator name="operator *">
@@ -196,6 +202,8 @@
<return type="bool" />
<argument index="0" name="right" type="Transform3D" />
<description>
+ Returns [code]true[/code] if the transforms are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
</operators>
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index 2a0695d42e..defebf7ab4 100644
--- a/doc/classes/Translation.xml
+++ b/doc/classes/Translation.xml
@@ -7,8 +7,8 @@
Translations are resources that can be loaded and unloaded on demand. They map a string to another string.
</description>
<tutorials>
- <link title="Internationalizing games">https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link>
- <link title="Locales">https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link>
+ <link title="Internationalizing games">$DOCS_URL/tutorials/i18n/internationalizing_games.html</link>
+ <link title="Locales">$DOCS_URL/tutorials/i18n/locales.html</link>
</tutorials>
<methods>
<method name="_get_message" qualifiers="virtual const">
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 8a6fa3571a..a1b4404079 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -7,8 +7,8 @@
Server that manages all translations. Translations can be set to it and removed from it.
</description>
<tutorials>
- <link title="Internationalizing games">https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link>
- <link title="Locales">https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link>
+ <link title="Internationalizing games">$DOCS_URL/tutorials/i18n/internationalizing_games.html</link>
+ <link title="Locales">$DOCS_URL/tutorials/i18n/locales.html</link>
</tutorials>
<methods>
<method name="add_translation">
@@ -49,7 +49,7 @@
<argument index="0" name="locale" type="String" />
<description>
Returns the [Translation] instance based on the [code]locale[/code] passed in.
- It will return a [code]nullptr[/code] if there is no [Translation] instance that matches the [code]locale[/code].
+ It will return [code]null[/code] if there is no [Translation] instance that matches the [code]locale[/code].
</description>
</method>
<method name="pseudolocalize" qualifiers="const">
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index 88644e2f8a..b8649a2836 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -72,6 +72,6 @@
Modifications to a container will modify all references to it. A [Mutex] should be created to lock it if multi-threaded access is desired.
</description>
<tutorials>
- <link title="Variant class">https://docs.godotengine.org/en/latest/development/cpp/variant_class.html</link>
+ <link title="Variant class">$DOCS_URL/development/cpp/variant_class.html</link>
</tutorials>
</class>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index eaaf41561a..15f7d2f9e3 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -9,9 +9,9 @@
[b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code].
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
- <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.html</link>
<link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="All 2D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/2d</link>
@@ -75,6 +75,7 @@
<argument index="0" name="to" type="Vector2" />
<description>
Returns the angle between the line connecting the two points and the X axis, in radians.
+ [code]a.angle_to_point(b)[/code] is equivalent of doing [code](b - a).angle()[/code].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to_point.png]Illustration of the returned angle.[/url]
</description>
</method>
@@ -124,16 +125,16 @@
</method>
<method name="direction_to" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="b" type="Vector2" />
+ <argument index="0" name="to" type="Vector2" />
<description>
- Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code].
+ Returns the normalized vector pointing from this vector to [code]to[/code]. This is equivalent to using [code](b - a).normalized()[/code].
</description>
</method>
<method name="distance_squared_to" qualifiers="const">
<return type="float" />
<argument index="0" name="to" type="Vector2" />
<description>
- Returns the squared distance between this vector and [code]b[/code].
+ Returns the squared distance between this vector and [code]to[/code].
This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
@@ -351,72 +352,97 @@
<return type="bool" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
+ <argument index="0" name="right" type="Transform2D" />
<description>
+ Inversely transforms (multiplies) the [Vector2] by the given [Transform2D] transformation matrix.
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="Transform2D" />
+ <argument index="0" name="right" type="Vector2" />
<description>
+ Multiplies each component of the [Vector2] by the components of the given [Vector2].
+ [codeblock]
+ print(Vector2(10, 20) * Vector2(3, 4)) # Prints "(30, 80)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Vector2] by the given [float].
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Vector2] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector2" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Adds each component of the [Vector2] by the components of the given [Vector2].
+ [codeblock]
+ print(Vector2(10, 20) + Vector2(3, 4)) # Prints "(13, 24)"
+ [/codeblock]
</description>
</operator>
<operator name="operator -">
<return type="Vector2" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Subtracts each component of the [Vector2] by the components of the given [Vector2].
+ [codeblock]
+ print(Vector2(10, 20) - Vector2(3, 4)) # Prints "(7, 16)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector2" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Divides each component of the [Vector2] by the components of the given [Vector2].
+ [codeblock]
+ print(Vector2(10, 20) / Vector2(2, 5)) # Prints "(5, 4)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector2" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Vector2] by the given [float].
</description>
</operator>
<operator name="operator /">
<return type="Vector2" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Vector2] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Compares two [Vector2] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Compares two [Vector2] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
@@ -428,34 +454,41 @@
<return type="bool" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Returns [code]true[/code] if the vectors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector2" />
<description>
+ Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator []">
<return type="float" />
<argument index="0" name="index" type="int" />
<description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], and [code]v[1][/code] is equivalent to [code]v.y[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Vector2" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Vector2" />
<description>
+ Returns the negative value of the [Vector2]. This is the same as writing [code]Vector2(-v.x, -v.y)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative.
</description>
</operator>
</operators>
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 71882e5b0c..62362409a5 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -9,8 +9,8 @@
[b]Note:[/b] In a boolean context, a Vector2i will evaluate to [code]false[/code] if it's equal to [code]Vector2i(0, 0)[/code]. Otherwise, a Vector2i will always evaluate to [code]true[/code].
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
<link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
</tutorials>
<constructors>
@@ -115,78 +115,115 @@
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
</description>
</operator>
<operator name="operator %">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Gets the remainder of each component of the [Vector2i] with the components of the given [Vector2i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector2i(10, -20) % Vector2i(7, 8)) # Prints "(3, -4)"
+ [/codeblock]
</description>
</operator>
<operator name="operator %">
<return type="Vector2i" />
<argument index="0" name="right" type="int" />
<description>
+ Gets the remainder of each component of the [Vector2i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector2i(10, -20) % 7) # Prints "(3, -6)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Multiplies each component of the [Vector2i] by the components of the given [Vector2i].
+ [codeblock]
+ print(Vector2i(10, 20) * Vector2i(3, 4)) # Prints "(30, 80)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector2i" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Vector2i] by the given [float] truncated to an integer.
+ [codeblock]
+ print(Vector2i(10, 20) * 0.9) # Prints "(0, 0)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector2i" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Vector2i] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Adds each component of the [Vector2i] by the components of the given [Vector2i].
+ [codeblock]
+ print(Vector2i(10, 20) + Vector2i(3, 4)) # Prints "(13, 24)"
+ [/codeblock]
</description>
</operator>
<operator name="operator -">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Subtracts each component of the [Vector2i] by the components of the given [Vector2i].
+ [codeblock]
+ print(Vector2i(10, 20) - Vector2i(3, 4)) # Prints "(7, 16)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Divides each component of the [Vector2i] by the components of the given [Vector2i].
+ [codeblock]
+ print(Vector2i(10, 20) / Vector2i(2, 5)) # Prints "(5, 4)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector2i" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Vector2i] by the given [float] truncated to an integer.
+ [codeblock]
+ print(Vector2i(10, 20) / 2.9) # Prints "(5, 10)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector2i" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Vector2i] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
@@ -198,34 +235,40 @@
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Returns [code]true[/code] if the vectors are equal.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
+ Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator []">
<return type="int" />
<argument index="0" name="index" type="int" />
<description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], and [code]v[1][/code] is equivalent to [code]v.y[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Vector2i" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Vector2i" />
<description>
+ Returns the negative value of the [Vector2i]. This is the same as writing [code]Vector2i(-v.x, -v.y)[/code]. This operation flips the direction of the vector while keeping the same magnitude.
</description>
</operator>
</operators>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index a94cc0086f..6d87ce9ea8 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -9,9 +9,9 @@
[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code].
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
- <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">$DOCS_URL/tutorials/math/vectors_advanced.html</link>
<link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
<link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
<link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link>
@@ -86,7 +86,7 @@
<return type="Vector3" />
<argument index="0" name="with" type="Vector3" />
<description>
- Returns the cross product of this vector and [code]b[/code].
+ Returns the cross product of this vector and [code]with[/code].
</description>
</method>
<method name="cubic_interpolate" qualifiers="const">
@@ -101,31 +101,31 @@
</method>
<method name="direction_to" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="b" type="Vector3" />
+ <argument index="0" name="to" type="Vector3" />
<description>
- Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code].
+ Returns the normalized vector pointing from this vector to [code]to[/code]. This is equivalent to using [code](b - a).normalized()[/code].
</description>
</method>
<method name="distance_squared_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="b" type="Vector3" />
+ <argument index="0" name="to" type="Vector3" />
<description>
- Returns the squared distance between this vector and [code]b[/code].
+ Returns the squared distance between this vector and [code]to[/code].
This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="b" type="Vector3" />
+ <argument index="0" name="to" type="Vector3" />
<description>
- Returns the distance between this vector and [code]b[/code].
+ Returns the distance between this vector and [code]to[/code].
</description>
</method>
<method name="dot" qualifiers="const">
<return type="float" />
<argument index="0" name="with" type="Vector3" />
<description>
- Returns the dot product of this vector and [code]b[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
+ Returns the dot product of this vector and [code]with[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees.
When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned.
[b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code].
@@ -225,7 +225,7 @@
<return type="Basis" />
<argument index="0" name="with" type="Vector3" />
<description>
- Returns the outer product with [code]b[/code].
+ Returns the outer product with [code]with[/code].
</description>
</method>
<method name="posmod" qualifiers="const">
@@ -367,84 +367,111 @@
<return type="bool" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <argument index="0" name="right" type="Basis" />
<description>
+ Inversely transforms (multiplies) the [Vector3] by the given [Basis] matrix.
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Basis" />
+ <argument index="0" name="right" type="Quaternion" />
<description>
+ Inversely transforms (multiplies) the [Vector3] by the given [Quaternion].
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Quaternion" />
+ <argument index="0" name="right" type="Transform3D" />
<description>
+ Inversely transforms (multiplies) the [Vector3] by the given [Transform3D] transformation matrix.
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Transform3D" />
+ <argument index="0" name="right" type="Vector3" />
<description>
+ Multiplies each component of the [Vector3] by the components of the given [Vector3].
+ [codeblock]
+ print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints "(30, 80, 150)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Vector3] by the given [float].
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Vector3] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector3" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Adds each component of the [Vector3] by the components of the given [Vector3].
+ [codeblock]
+ print(Vector3(10, 20, 30) + Vector3(3, 4, 5)) # Prints "(13, 24, 35)"
+ [/codeblock]
</description>
</operator>
<operator name="operator -">
<return type="Vector3" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Subtracts each component of the [Vector3] by the components of the given [Vector3].
+ [codeblock]
+ print(Vector3(10, 20, 30) - Vector3(3, 4, 5)) # Prints "(7, 16, 25)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector3" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Divides each component of the [Vector3] by the components of the given [Vector3].
+ [codeblock]
+ print(Vector3(10, 20, 30) / Vector3(2, 5, 3)) # Prints "(5, 4, 10)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector3" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Vector3] by the given [float].
</description>
</operator>
<operator name="operator /">
<return type="Vector3" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Vector3] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Compares two [Vector3] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Compares two [Vector3] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
@@ -456,34 +483,41 @@
<return type="bool" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Returns [code]true[/code] if the vectors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector3" />
<description>
+ Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator []">
<return type="float" />
<argument index="0" name="index" type="int" />
<description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], and [code]v[2][/code] is equivalent to [code]v.z[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Vector3" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Vector3" />
<description>
+ Returns the negative value of the [Vector3]. This is the same as writing [code]Vector3(-v.x, -v.y, -v.z)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative.
</description>
</operator>
</operators>
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index 5cd458a2be..17febdea83 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -9,8 +9,8 @@
[b]Note:[/b] In a boolean context, a Vector3i will evaluate to [code]false[/code] if it's equal to [code]Vector3i(0, 0, 0)[/code]. Otherwise, a Vector3i will always evaluate to [code]true[/code].
</description>
<tutorials>
- <link title="Math documentation index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
- <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
+ <link title="Vector math">$DOCS_URL/tutorials/math/vector_math.html</link>
<link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
</tutorials>
<constructors>
@@ -133,78 +133,115 @@
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
</description>
</operator>
<operator name="operator %">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Gets the remainder of each component of the [Vector3i] with the components of the given [Vector3i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector3i(10, -20, 30) % Vector3i(7, 8, 9)) # Prints "(3, -4, 3)"
+ [/codeblock]
</description>
</operator>
<operator name="operator %">
<return type="Vector3i" />
<argument index="0" name="right" type="int" />
<description>
+ Gets the remainder of each component of the [Vector3i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector2i(10, -20, 30) % 7) # Prints "(3, -6, 2)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Multiplies each component of the [Vector3i] by the components of the given [Vector3i].
+ [codeblock]
+ print(Vector3i(10, 20, 30) * Vector3i(3, 4, 5)) # Prints "(30, 80, 150)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector3i" />
<argument index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Vector3i] by the given [float] truncated to an integer.
+ [codeblock]
+ print(Vector3i(10, 20, 30) * 0.9) # Prints "(0, 0, 0)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector3i" />
<argument index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Vector3i] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Adds each component of the [Vector3i] by the components of the given [Vector3i].
+ [codeblock]
+ print(Vector3i(10, 20, 30) + Vector3i(3, 4, 5)) # Prints "(13, 24, 35)"
+ [/codeblock]
</description>
</operator>
<operator name="operator -">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Subtracts each component of the [Vector3i] by the components of the given [Vector3i].
+ [codeblock]
+ print(Vector3i(10, 20, 30) - Vector3i(3, 4, 5)) # Prints "(7, 16, 25)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Divides each component of the [Vector3i] by the components of the given [Vector3i].
+ [codeblock]
+ print(Vector3i(10, 20, 30) / Vector3i(2, 5, 3)) # Prints "(5, 4, 10)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector3i" />
<argument index="0" name="right" type="float" />
<description>
+ Divides each component of the [Vector3i] by the given [float] truncated to an integer.
+ [codeblock]
+ print(Vector3i(10, 20, 30) / 2.9) # Prints "(5, 10, 15)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector3i" />
<argument index="0" name="right" type="int" />
<description>
+ Divides each component of the [Vector3i] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
@@ -216,34 +253,40 @@
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Returns [code]true[/code] if the vectors are equal.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
+ Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator []">
<return type="int" />
<argument index="0" name="index" type="int" />
<description>
+ Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], and [code]v[2][/code] is equivalent to [code]v.z[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Vector3i" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Vector3i" />
<description>
+ Returns the negative value of the [Vector3i]. This is the same as writing [code]Vector3i(-v.x, -v.y, -v.z)[/code]. This operation flips the direction of the vector while keeping the same magnitude.
</description>
</operator>
</operators>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index e79cf0d233..4a3f99696d 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -12,8 +12,8 @@
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
</description>
<tutorials>
- <link title="Using Viewports">https://docs.godotengine.org/en/latest/tutorials/rendering/viewports.html</link>
- <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
+ <link title="Using Viewports">$DOCS_URL/tutorials/rendering/viewports.html</link>
+ <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
<link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link>
<link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
@@ -25,13 +25,13 @@
<method name="find_world_2d" qualifiers="const">
<return type="World2D" />
<description>
- Returns the 2D world of the viewport.
+ Returns the first valid [World2D] for this viewport, searching the [member world_2d] property of itself and any Viewport ancestor.
</description>
</method>
<method name="find_world_3d" qualifiers="const">
<return type="World3D" />
<description>
- Returns the 3D world of the viewport, or if none the world of the parent viewport.
+ Returns the first valid [World3D] for this viewport, searching the [member world_3d] property of itself and any Viewport ancestor.
</description>
</method>
<method name="get_camera_2d" qualifiers="const">
@@ -107,6 +107,12 @@
Returns the drag data from the GUI, that was previously returned by [method Control._get_drag_data].
</description>
</method>
+ <method name="gui_is_drag_successful" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the drag operation is successful.
+ </description>
+ </method>
<method name="gui_is_dragging" qualifiers="const">
<return type="bool" />
<description>
@@ -188,6 +194,14 @@
<member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false">
Disable 3D rendering (but keep 2D rendering).
</member>
+ <member name="fsr_mipmap_bias" type="float" setter="set_fsr_mipmap_bias" getter="get_fsr_mipmap_bias" default="0.0">
+ Affects the final texture sharpness by reading from a lower or higher mipmap when using FSR. Mipmap bias does nothing when FSR is not being used. Negative values make textures sharper, while positive values make textures blurrier. This value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]. This updates the rendering server's mipmap bias when called
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_mipmap_bias] project setting.
+ </member>
+ <member name="fsr_sharpness" type="float" setter="set_fsr_sharpness" getter="get_fsr_sharpness" default="0.2">
+ Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_sharpness] project setting.
+ </member>
<member name="global_canvas_transform" type="Transform2D" setter="set_global_canvas_transform" getter="get_global_canvas_transform">
The global canvas transform of the viewport. The canvas transform is relative to this.
</member>
@@ -204,7 +218,7 @@
<member name="lod_threshold" type="float" setter="set_lod_threshold" getter="get_lod_threshold" default="1.0">
</member>
<member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0">
- The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also [member scale_3d] for supersampling, which provides higher quality but is much more expensive.
+ The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d [member scaling_3d_mode] for supersampling, which provides higher quality but is much more expensive.
</member>
<member name="own_world_3d" type="bool" setter="set_use_own_world_3d" getter="is_using_own_world_3d" default="false">
If [code]true[/code], the viewport will use the [World3D] defined in [member world_3d].
@@ -212,9 +226,14 @@
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
</member>
- <member name="scale_3d" type="float" setter="set_scale_3d" getter="get_scale_3d" default="1.0">
- Scales the 3D render buffer based on the viewport size and displays the result with linear filtering. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
- To control this property on the root viewport, set the [member ProjectSettings.rendering/3d/viewport/scale] project setting.
+ <member name="scaling_3d_mode" type="int" setter="set_scaling_3d_mode" getter="get_scaling_3d_mode" enum="Viewport.Scaling3DMode" default="0">
+ Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/mode] project setting.
+ </member>
+ <member name="scaling_3d_scale" type="float" setter="set_scaling_3d_scale" getter="get_scaling_3d_scale" default="1.0">
+ Scales the 3D render buffer based on the viewport size uses an image filter specified in [member ProjectSettings.rendering/scaling_3d/mode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member ProjectSettings.rendering/anti_aliasing/quality/msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
+ When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/scale] project setting.
</member>
<member name="screen_space_aa" type="int" setter="set_screen_space_aa" getter="get_screen_space_aa" enum="Viewport.ScreenSpaceAA" default="0">
Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
@@ -300,6 +319,15 @@
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv">
Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum.
</constant>
+ <constant name="SCALING_3D_MODE_BILINEAR" value="0" enum="Scaling3DMode">
+ Enables bilinear scaling on 3D viewports. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="SCALING_3D_MODE_FSR" value="1" enum="Scaling3DMode">
+ Enables FSR upscaling on 3D viewports. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear supersampling will be used instead. A value of [code]1.0[/code] disables scaling.
+ </constant>
+ <constant name="SCALING_3D_MODE_MAX" value="2" enum="Scaling3DMode">
+ Represents the size of the [enum Scaling3DMode] enum.
+ </constant>
<constant name="MSAA_DISABLED" value="0" enum="MSAA">
Multisample antialiasing mode disabled. This is the default value, and is also the fastest setting.
</constant>
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml
index b752e94490..cebe7f215f 100644
--- a/doc/classes/VisualShaderNode.xml
+++ b/doc/classes/VisualShaderNode.xml
@@ -7,7 +7,7 @@
Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node has also connection ports that allow to connect it to another nodes and control the flow of the shader.
</description>
<tutorials>
- <link title="VisualShaders">https://docs.godotengine.org/en/latest/tutorials/shaders/visual_shaders.html</link>
+ <link title="VisualShaders">$DOCS_URL/tutorials/shaders/visual_shaders.html</link>
</tutorials>
<methods>
<method name="clear_default_input_values">
diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml
index b87b59c3e4..995f2796dd 100644
--- a/doc/classes/VisualShaderNodeCustom.xml
+++ b/doc/classes/VisualShaderNodeCustom.xml
@@ -13,7 +13,7 @@
[/codeblock]
</description>
<tutorials>
- <link title="Visual Shader plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link>
+ <link title="Visual Shader plugins">$DOCS_URL/tutorials/plugins/editor/visual_shader_plugins.html</link>
</tutorials>
<methods>
<method name="_get_category" qualifiers="virtual const">
@@ -27,8 +27,8 @@
<return type="String" />
<argument index="0" name="input_vars" type="PackedStringArray" />
<argument index="1" name="output_vars" type="String[]" />
- <argument index="2" name="mode" type="int" />
- <argument index="3" name="type" type="int" />
+ <argument index="2" name="mode" type="int" enum="Shader.Mode" />
+ <argument index="3" name="type" type="int" enum="VisualShader.Type" />
<description>
Override this method to define the actual shader code of the associated custom node. The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience).
The [code]input_vars[/code] and [code]output_vars[/code] arrays contain the string names of the various input and output variables, as defined by [code]_get_input_*[/code] and [code]_get_output_*[/code] virtual methods in this class.
@@ -46,7 +46,7 @@
</method>
<method name="_get_global_code" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="mode" type="int" />
+ <argument index="0" name="mode" type="int" enum="Shader.Mode" />
<description>
Override this method to add shader code on top of the global shader, to define your own standard library of reusable methods, varyings, constants, uniforms, etc. The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience).
Be careful with this functionality as it can cause name conflicts with other custom nodes, so be sure to give the defined entities unique names.
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index 46d7dd6322..a7b501c6a0 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -7,7 +7,7 @@
Gives access to input variables (built-ins) available for the shader. See the shading reference for the list of available built-ins for each shader type (check [code]Tutorials[/code] section for link).
</description>
<tutorials>
- <link title="Shading reference index">https://docs.godotengine.org/en/latest/tutorials/shaders/shader_reference/index.html</link>
+ <link title="Shading reference index">$DOCS_URL/tutorials/shaders/shader_reference/index.html</link>
</tutorials>
<methods>
<method name="get_input_real_name" qualifiers="const">
diff --git a/doc/classes/VisualShaderNodeParticleMeshEmitter.xml b/doc/classes/VisualShaderNodeParticleMeshEmitter.xml
new file mode 100644
index 0000000000..7abb330fd3
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParticleMeshEmitter.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParticleMeshEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
+ </member>
+ <member name="surface_index" type="int" setter="set_surface_index" getter="get_surface_index" default="0">
+ </member>
+ <member name="use_all_surfaces" type="bool" setter="set_use_all_surfaces" getter="is_use_all_surfaces" default="true">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/VoxelGI.xml b/doc/classes/VoxelGI.xml
index f6470782ee..2c3605aa1c 100644
--- a/doc/classes/VoxelGI.xml
+++ b/doc/classes/VoxelGI.xml
@@ -4,12 +4,13 @@
Real-time global illumination (GI) probe.
</brief_description>
<description>
- [VoxelGI]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [VoxelGI]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
- Having [VoxelGI]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/voxel_gi/quality].
- [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
+ [VoxelGI]s are used to provide high-quality real-time indirect light and reflections to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [VoxelGI]s need to be baked before having a visible effect. However, once baked, dynamic objects will receive light from them. Furthermore, lights can be fully dynamic or baked.
+ [b]Procedural generation:[/b] [VoxelGI] can be baked in an exported project, which makes it suitable for procedurally generated or user-built levels as long as all the geometry is generated in advance. For games where geometry is generated at any time during gameplay, SDFGI is more suitable (see [member Environment.sdfgi_enabled]).
+ [b]Performance:[/b] [VoxelGI] is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider [LightmapGI] instead). To improve performance, adjust [member ProjectSettings.rendering/global_illumination/voxel_gi/quality] and enable [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution] in the Project Settings. To provide a fallback for low-end hardware, consider adding an option to disable [VoxelGI] in your project's options menus. A [VoxelGI] node can be disabled by hiding it.
+ [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. To further prevent light leaks, you can also strategically place temporary [MeshInstance3D] nodes with their [member GeometryInstance3D.gi_mode] set to [constant GeometryInstance3D.GI_MODE_BAKED]. These temporary nodes can then be hidden after baking the [VoxelGI] node.
</description>
<tutorials>
- <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
+ <link title="GI probes">$DOCS_URL/tutorials/3d/gi_probes.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
@@ -19,6 +20,7 @@
<argument index="1" name="create_visual_debug" type="bool" default="false" />
<description>
Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_DYNAMIC] or [constant Light3D.BAKE_STATIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [VoxelGI]'s data and debug any issues that may be occurring.
+ [b]Note:[/b] [method bake] works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a [VoxelGI] node generally takes from 5 to 20 seconds in most scenes. Reducing [member subdiv] can speed up baking.
</description>
</method>
<method name="debug_bake">
@@ -50,7 +52,7 @@
Use 256 subdivisions.
</constant>
<constant name="SUBDIV_512" value="3" enum="Subdiv">
- Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware this could cause the GPU to stall.
+ Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware, this could cause the GPU to stall.
</constant>
<constant name="SUBDIV_MAX" value="4" enum="Subdiv">
Represents the size of the [enum Subdiv] enum.
diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml
index f0bd2a0601..36907c88ba 100644
--- a/doc/classes/VoxelGIData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VoxelGIData" inherits="Resource" version="4.0">
<brief_description>
+ Contains baked voxel global illumination data for use in a [VoxelGI] node.
</brief_description>
<description>
+ [VoxelGIData] contains baked voxel global illumination for use in a [VoxelGI] node. [VoxelGIData] also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the [VoxelGI] node again.
+ [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the inspector then choosing [b]Save As...[/b].
</description>
<tutorials>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
@@ -23,6 +26,8 @@
<method name="get_bounds" qualifiers="const">
<return type="AABB" />
<description>
+ Returns the bounds of the baked voxel data as an [AABB], which should match [member VoxelGI.extents] after being baked (which only contains the size as a [Vector3]).
+ [b]Note:[/b] If the extents were modified without baking the VoxelGI data, then the value of [method get_bounds] and [member VoxelGI.extents] will not match.
</description>
</method>
<method name="get_data_cells" qualifiers="const">
@@ -53,18 +58,25 @@
</methods>
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5">
+ The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code].
</member>
<member name="dynamic_range" type="float" setter="set_dynamic_range" getter="get_dynamic_range" default="4.0">
+ The dynamic range to use ([code]1.0[/code] represents a low dynamic range scene brightness). Higher values can be used to provide brighter indirect lighting, at the cost of more visible color banding in dark areas (both in indirect lighting and reflections). To avoid color banding, it's recommended to use the lowest value that does not result in visible light clipping.
</member>
<member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
+ The energy of the indirect lighting and reflections produced by the [VoxelGI] node. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
+ If [code]true[/code], [Environment] lighting is ignored by the [VoxelGI] node. If [code]false[/code], [Environment] lighting is taken into account by the [VoxelGI] node. [Environment] lighting updates in real-time, which means it can be changed without having to bake the [VoxelGI] node again.
</member>
<member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
+ The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. See also [member bias]. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code].
</member>
<member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7">
+ If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
</member>
<member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false">
+ If [code]true[/code], performs two bounces of indirect lighting instead of one. This makes indirect lighting look more natural and brighter at a small performance cost. The second bounce is also visible in reflections. If the scene appears too bright after enabling [member use_two_bounces], adjust [member propagation] and [member energy].
</member>
</members>
</class>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 0653c8b453..3fee1feae8 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -230,6 +230,12 @@
<description>
</description>
</method>
+ <method name="reset_size">
+ <return type="void" />
+ <description>
+ Resets the size to the minimum size, which is the max of [member min_size] and (if [member wrap_controls] is enabled) [method get_contents_minimum_size]. This is equivalent to calling [code]set_size(Vector2i())[/code] (or any size below the minimum).
+ </description>
+ </method>
<method name="set_flag">
<return type="void" />
<argument index="0" name="flag" type="int" enum="Window.Flags" />
@@ -384,7 +390,7 @@
</constant>
<constant name="MODE_FULLSCREEN" value="3" enum="Mode">
Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
</constant>
<constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags">
The window's ability to be resized.
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index a6a4701dd4..47ab4b3612 100644
--- a/doc/classes/World2D.xml
+++ b/doc/classes/World2D.xml
@@ -7,7 +7,7 @@
Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world.
</description>
<tutorials>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<members>
<member name="canvas" type="RID" setter="" getter="get_canvas">
diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml
index 136ca2c598..fd2f96985c 100644
--- a/doc/classes/World3D.xml
+++ b/doc/classes/World3D.xml
@@ -7,7 +7,7 @@
Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Node3D nodes register their resources into the current world.
</description>
<tutorials>
- <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<members>
<member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index bd25a74c5b..793479e074 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -9,7 +9,7 @@
The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene.
</description>
<tutorials>
- <link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link>
+ <link title="Environment and post-processing">$DOCS_URL/tutorials/3d/environment_and_post_processing.html</link>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
<link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
diff --git a/doc/classes/XRCamera3D.xml b/doc/classes/XRCamera3D.xml
index 31f05ca06c..ca81f5b169 100644
--- a/doc/classes/XRCamera3D.xml
+++ b/doc/classes/XRCamera3D.xml
@@ -8,6 +8,6 @@
The position and orientation of this node is automatically updated by the XR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the XR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the XRCamera3D can lag a few milliseconds behind what is used for rendering as a result.
</description>
<tutorials>
- <link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
</class>
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index eb91196e00..0e2785f246 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -10,7 +10,7 @@
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>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_axis" qualifiers="const">
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 7ae70f97a2..3b03447ed1 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -8,7 +8,7 @@
Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through [XRServer].
</description>
<tutorials>
- <link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_camera_feed_id">
diff --git a/doc/classes/XROrigin3D.xml b/doc/classes/XROrigin3D.xml
index 0d8acfeb1b..fc15102976 100644
--- a/doc/classes/XROrigin3D.xml
+++ b/doc/classes/XROrigin3D.xml
@@ -10,7 +10,7 @@
For example, if your character is driving a car, the XROrigin3D node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node.
</description>
<tutorials>
- <link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index bd6a518835..439bcfc382 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -9,7 +9,7 @@
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>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_input" qualifiers="const">
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 87164ebb52..3a7fdea8d0 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -7,7 +7,7 @@
The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing.
</description>
<tutorials>
- <link title="VR documentation index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
+ <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="add_interface">
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 8231173bac..9effe9d5bf 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -62,17 +62,20 @@
</description>
</operator>
<operator name="operator *">
- <return type="float" />
- <argument index="0" name="right" type="float" />
+ <return type="Color" />
+ <argument index="0" name="right" type="Color" />
<description>
- Multiplies two [float]s.
+ Multiplies each component of the [Color] by the given [float].
+ [codeblock]
+ print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75)
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
- Multiplies each component of the [Quaternion] by the given [float].
+ Multiplies each component of the [Quaternion] by the given [float]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator *">
@@ -81,7 +84,7 @@
<description>
Multiplies each component of the [Vector2] by the given [float].
[codeblock]
- print(2.5 * Vector2(1, 1)) # Vector2(2.5, 2.5)
+ print(2.5 * Vector2(1, 3)) # Prints "(2.5, 7.5)"
[/codeblock]
</description>
</operator>
@@ -89,9 +92,9 @@
<return type="Vector2i" />
<argument index="0" name="right" type="Vector2i" />
<description>
- Multiplies each component of the [Vector2i] by the given [float].
+ Multiplies each component of the [Vector2i] by the given [float] truncated to an integer.
[codeblock]
- print(2.0 * Vector2i(1, 1)) # Vector2i(2.0, 2.0)
+ print(0.9 * Vector2i(10, 20)) # Prints "(0, 0)"
[/codeblock]
</description>
</operator>
@@ -106,17 +109,17 @@
<return type="Vector3i" />
<argument index="0" name="right" type="Vector3i" />
<description>
- Multiplies each component of the [Vector3i] by the given [float].
+ Multiplies each component of the [Vector3i] by the given [float] truncated to an integer.
+ [codeblock]
+ print(0.9 * Vector3i(10, 20, 30)) # Prints "(0, 0, 0)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
- <return type="Color" />
- <argument index="0" name="right" type="Color" />
+ <return type="float" />
+ <argument index="0" name="right" type="float" />
<description>
- Multiplies each component of the [Color] by the given [float].
- [codeblock]
- print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75)
- [/codeblock]
+ Multiplies two [float]s.
</description>
</operator>
<operator name="operator *">
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 94c2601e4a..d212fe42bf 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -91,11 +91,11 @@
<return type="int" />
<argument index="0" name="right" type="int" />
<description>
- Returns the result of the modulo operator for two integers, i.e. the remainder after dividing both numbers.
+ Returns the remainder after dividing two integers. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
[codeblock]
print(5 % 2) # 1
print(12 % 4) # 0
- print(12 % 2) # 2
+ print(-5 % 3) # -2
[/codeblock]
</description>
</operator>
@@ -121,26 +121,14 @@
<return type="Color" />
<argument index="0" name="right" type="Color" />
<description>
+ Multiplies each component of the [Color] by the given [int].
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
<argument index="0" name="right" type="Quaternion" />
<description>
- </description>
- </operator>
- <operator name="operator *">
- <return type="int" />
- <argument index="0" name="right" type="int" />
- <description>
- Multiplies two [int]s.
- </description>
- </operator>
- <operator name="operator *">
- <return type="float" />
- <argument index="0" name="right" type="float" />
- <description>
- Multiplies an [int] and a [float]. The result is a [float].
+ Multiplies each component of the [Quaternion] by the given [int]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator *">
@@ -174,6 +162,20 @@
Multiplies each component of the [Vector3i] by the given [int].
</description>
</operator>
+ <operator name="operator *">
+ <return type="float" />
+ <argument index="0" name="right" type="float" />
+ <description>
+ Multiplies an [int] and a [float]. The result is a [float].
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="int" />
+ <argument index="0" name="right" type="int" />
+ <description>
+ Multiplies two [int]s.
+ </description>
+ </operator>
<operator name="operator +">
<return type="float" />
<argument index="0" name="right" type="float" />