summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml147
-rw-r--r--doc/classes/AABB.xml17
-rw-r--r--doc/classes/AStar.xml12
-rw-r--r--doc/classes/AStar2D.xml12
-rw-r--r--doc/classes/AcceptDialog.xml10
-rw-r--r--doc/classes/AnimatedSprite2D.xml10
-rw-r--r--doc/classes/AnimatedSprite3D.xml2
-rw-r--r--doc/classes/Animation.xml29
-rw-r--r--doc/classes/AnimationNode.xml4
-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.xml4
-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.xml2
-rw-r--r--doc/classes/Array.xml9
-rw-r--r--doc/classes/ArrayMesh.xml2
-rw-r--r--doc/classes/AspectRatioContainer.xml10
-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.xml8
-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.xml17
-rw-r--r--doc/classes/Basis.xml13
-rw-r--r--doc/classes/BoxContainer.xml13
-rw-r--r--doc/classes/Button.xml60
-rw-r--r--doc/classes/ButtonGroup.xml2
-rw-r--r--doc/classes/CPUParticles2D.xml5
-rw-r--r--doc/classes/CPUParticles3D.xml9
-rw-r--r--doc/classes/Camera2D.xml24
-rw-r--r--doc/classes/Camera3D.xml4
-rw-r--r--doc/classes/CanvasItem.xml36
-rw-r--r--doc/classes/CanvasLayer.xml4
-rw-r--r--doc/classes/CharFXTransform.xml2
-rw-r--r--doc/classes/CharacterBody2D.xml10
-rw-r--r--doc/classes/CharacterBody3D.xml6
-rw-r--r--doc/classes/CheckBox.xml66
-rw-r--r--doc/classes/CheckButton.xml52
-rw-r--r--doc/classes/CodeEdit.xml114
-rw-r--r--doc/classes/CodeHighlighter.xml6
-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.xml30
-rw-r--r--doc/classes/ColorPicker.xml30
-rw-r--r--doc/classes/ColorPickerButton.xml38
-rw-r--r--doc/classes/ConfirmationDialog.xml6
-rw-r--r--doc/classes/Container.xml2
-rw-r--r--doc/classes/Control.xml33
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/CryptoKey.xml2
-rw-r--r--doc/classes/Dictionary.xml2
-rw-r--r--doc/classes/DirectionalLight3D.xml4
-rw-r--r--doc/classes/Directory.xml42
-rw-r--r--doc/classes/DisplayServer.xml6
-rw-r--r--doc/classes/EditorCommandPalette.xml2
-rw-r--r--doc/classes/EditorExportPlugin.xml12
-rw-r--r--doc/classes/EditorFileDialog.xml4
-rw-r--r--doc/classes/EditorImportPlugin.xml4
-rw-r--r--doc/classes/EditorInspector.xml4
-rw-r--r--doc/classes/EditorInspectorPlugin.xml2
-rw-r--r--doc/classes/EditorInterface.xml12
-rw-r--r--doc/classes/EditorNode3DGizmo.xml2
-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/EditorResourcePicker.xml2
-rw-r--r--doc/classes/EditorSceneFormatImporter.xml22
-rw-r--r--doc/classes/EditorScenePostImport.xml2
-rw-r--r--doc/classes/EditorSpinSlider.xml2
-rw-r--r--doc/classes/Engine.xml7
-rw-r--r--doc/classes/Environment.xml24
-rw-r--r--doc/classes/File.xml5
-rw-r--r--doc/classes/FileDialog.xml22
-rw-r--r--doc/classes/Font.xml12
-rw-r--r--doc/classes/FontData.xml21
-rw-r--r--doc/classes/GPUParticles2D.xml2
-rw-r--r--doc/classes/GPUParticles3D.xml2
-rw-r--r--doc/classes/GPUParticlesAttractorBox3D.xml (renamed from doc/classes/GPUParticlesAttractorBox.xml)2
-rw-r--r--doc/classes/GPUParticlesAttractorSphere3D.xml (renamed from doc/classes/GPUParticlesAttractorSphere.xml)2
-rw-r--r--doc/classes/GPUParticlesAttractorVectorField3D.xml (renamed from doc/classes/GPUParticlesAttractorVectorField.xml)2
-rw-r--r--doc/classes/GPUParticlesCollisionBox3D.xml (renamed from doc/classes/GPUParticlesCollisionBox.xml)2
-rw-r--r--doc/classes/GPUParticlesCollisionHeightField3D.xml (renamed from doc/classes/GPUParticlesCollisionHeightField.xml)6
-rw-r--r--doc/classes/GPUParticlesCollisionSDF3D.xml (renamed from doc/classes/GPUParticlesCollisionSDF.xml)4
-rw-r--r--doc/classes/GPUParticlesCollisionSphere3D.xml (renamed from doc/classes/GPUParticlesCollisionSphere.xml)2
-rw-r--r--doc/classes/GeometryInstance3D.xml24
-rw-r--r--doc/classes/GraphEdit.xml102
-rw-r--r--doc/classes/GraphNode.xml66
-rw-r--r--doc/classes/HMACContext.xml84
-rw-r--r--doc/classes/HScrollBar.xml18
-rw-r--r--doc/classes/HSlider.xml16
-rw-r--r--doc/classes/HSplitContainer.xml6
-rw-r--r--doc/classes/HTTPClient.xml22
-rw-r--r--doc/classes/HTTPRequest.xml22
-rw-r--r--doc/classes/Image.xml14
-rw-r--r--doc/classes/ImageTexture.xml2
-rw-r--r--doc/classes/Input.xml20
-rw-r--r--doc/classes/InputEvent.xml6
-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.xml2
-rw-r--r--doc/classes/InputEventMIDI.xml69
-rw-r--r--doc/classes/InputEventMouse.xml6
-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.xml4
-rw-r--r--doc/classes/InputEventWithModifiers.xml2
-rw-r--r--doc/classes/InputMap.xml2
-rw-r--r--doc/classes/ItemList.xml52
-rw-r--r--doc/classes/JNISingleton.xml2
-rw-r--r--doc/classes/JavaScript.xml4
-rw-r--r--doc/classes/Joint2D.xml1
-rw-r--r--doc/classes/Label.xml76
-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/LineEdit.xml56
-rw-r--r--doc/classes/LinkButton.xml22
-rw-r--r--doc/classes/MenuButton.xml40
-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/MultiplayerReplicator.xml12
-rw-r--r--doc/classes/Mutex.xml2
-rw-r--r--doc/classes/NinePatchRect.xml2
-rw-r--r--doc/classes/Node.xml24
-rw-r--r--doc/classes/Node2D.xml2
-rw-r--r--doc/classes/Node3D.xml16
-rw-r--r--doc/classes/OS.xml91
-rw-r--r--doc/classes/Object.xml8
-rw-r--r--doc/classes/OmniLight3D.xml2
-rw-r--r--doc/classes/OptionButton.xml63
-rw-r--r--doc/classes/PCKPacker.xml4
-rw-r--r--doc/classes/PackedByteArray.xml21
-rw-r--r--doc/classes/PackedColorArray.xml18
-rw-r--r--doc/classes/PackedFloat32Array.xml18
-rw-r--r--doc/classes/PackedFloat64Array.xml18
-rw-r--r--doc/classes/PackedInt32Array.xml18
-rw-r--r--doc/classes/PackedInt64Array.xml18
-rw-r--r--doc/classes/PackedScene.xml4
-rw-r--r--doc/classes/PackedStringArray.xml18
-rw-r--r--doc/classes/PackedVector2Array.xml18
-rw-r--r--doc/classes/PackedVector3Array.xml18
-rw-r--r--doc/classes/PacketPeerUDP.xml56
-rw-r--r--doc/classes/PanelContainer.xml2
-rw-r--r--doc/classes/ParallaxBackground.xml2
-rw-r--r--doc/classes/ParticlesMaterial.xml20
-rw-r--r--doc/classes/PhysicalSkyMaterial.xml4
-rw-r--r--doc/classes/PhysicsBody2D.xml4
-rw-r--r--doc/classes/PhysicsBody3D.xml2
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml87
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml89
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml4
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml4
-rw-r--r--doc/classes/PhysicsPointQueryParameters2D.xml2
-rw-r--r--doc/classes/PhysicsPointQueryParameters3D.xml2
-rw-r--r--doc/classes/PhysicsRayQueryParameters2D.xml2
-rw-r--r--doc/classes/PhysicsRayQueryParameters3D.xml2
-rw-r--r--doc/classes/PhysicsServer2D.xml117
-rw-r--r--doc/classes/PhysicsServer3D.xml128
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml2
-rw-r--r--doc/classes/PhysicsShapeQueryParameters3D.xml2
-rw-r--r--doc/classes/PhysicsTestMotionResult2D.xml20
-rw-r--r--doc/classes/PhysicsTestMotionResult3D.xml20
-rw-r--r--doc/classes/Plane.xml8
-rw-r--r--doc/classes/Popup.xml10
-rw-r--r--doc/classes/PopupMenu.xml190
-rw-r--r--doc/classes/PrimitiveMesh.xml2
-rw-r--r--doc/classes/ProgressBar.xml26
-rw-r--r--doc/classes/ProjectSettings.xml118
-rw-r--r--doc/classes/ProximityGroup3D.xml42
-rw-r--r--doc/classes/Quaternion.xml17
-rw-r--r--doc/classes/RDFramebufferPass.xml2
-rw-r--r--doc/classes/RandomNumberGenerator.xml2
-rw-r--r--doc/classes/RayCast2D.xml4
-rw-r--r--doc/classes/RayCast3D.xml7
-rw-r--r--doc/classes/Rect2.xml12
-rw-r--r--doc/classes/Rect2i.xml7
-rw-r--r--doc/classes/RefCounted.xml2
-rw-r--r--doc/classes/ReferenceRect.xml2
-rw-r--r--doc/classes/ReflectionProbe.xml33
-rw-r--r--doc/classes/RenderingDevice.xml21
-rw-r--r--doc/classes/RenderingServer.xml136
-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.xml134
-rw-r--r--doc/classes/RigidDynamicBody2D.xml67
-rw-r--r--doc/classes/RigidDynamicBody3D.xml66
-rw-r--r--doc/classes/RootMotionView.xml2
-rw-r--r--doc/classes/SceneState.xml7
-rw-r--r--doc/classes/SceneTree.xml4
-rw-r--r--doc/classes/SceneTreeTimer.xml3
-rw-r--r--doc/classes/Script.xml3
-rw-r--r--doc/classes/ScriptCreateDialog.xml4
-rw-r--r--doc/classes/ScrollBar.xml4
-rw-r--r--doc/classes/ScrollContainer.xml46
-rw-r--r--doc/classes/Semaphore.xml2
-rw-r--r--doc/classes/Shader.xml2
-rw-r--r--doc/classes/ShaderMaterial.xml2
-rw-r--r--doc/classes/Shape2D.xml5
-rw-r--r--doc/classes/Shape3D.xml6
-rw-r--r--doc/classes/Skeleton2D.xml2
-rw-r--r--doc/classes/Skeleton3D.xml4
-rw-r--r--doc/classes/SkeletonModification3D.xml2
-rw-r--r--doc/classes/SkeletonModification3DCCDIK.xml2
-rw-r--r--doc/classes/SkeletonModification3DFABRIK.xml4
-rw-r--r--doc/classes/SkeletonModification3DJiggle.xml4
-rw-r--r--doc/classes/SkeletonModification3DTwoBoneIK.xml2
-rw-r--r--doc/classes/SkeletonModificationStack3D.xml2
-rw-r--r--doc/classes/Slider.xml17
-rw-r--r--doc/classes/SoftDynamicBody3D.xml6
-rw-r--r--doc/classes/SpinBox.xml7
-rw-r--r--doc/classes/SpotLight3D.xml4
-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/StreamPeer.xml2
-rw-r--r--doc/classes/StreamPeerSSL.xml2
-rw-r--r--doc/classes/String.xml15
-rw-r--r--doc/classes/SubViewport.xml4
-rw-r--r--doc/classes/TabBar.xml86
-rw-r--r--doc/classes/TabContainer.xml51
-rw-r--r--doc/classes/TextEdit.xml88
-rw-r--r--doc/classes/TextLine.xml7
-rw-r--r--doc/classes/TextParagraph.xml8
-rw-r--r--doc/classes/TextServer.xml26
-rw-r--r--doc/classes/TextServerExtension.xml18
-rw-r--r--doc/classes/TextureButton.xml2
-rw-r--r--doc/classes/TextureProgressBar.xml2
-rw-r--r--doc/classes/TextureRect.xml2
-rw-r--r--doc/classes/Theme.xml2
-rw-r--r--doc/classes/Thread.xml4
-rw-r--r--doc/classes/TileMap.xml12
-rw-r--r--doc/classes/TileSet.xml6
-rw-r--r--doc/classes/TileSetScenesCollectionSource.xml6
-rw-r--r--doc/classes/Transform2D.xml21
-rw-r--r--doc/classes/Transform3D.xml32
-rw-r--r--doc/classes/Translation.xml4
-rw-r--r--doc/classes/TranslationServer.xml6
-rw-r--r--doc/classes/Tree.xml176
-rw-r--r--doc/classes/TreeItem.xml19
-rw-r--r--doc/classes/UndoRedo.xml2
-rw-r--r--doc/classes/VScrollBar.xml22
-rw-r--r--doc/classes/VSlider.xml20
-rw-r--r--doc/classes/VSplitContainer.xml6
-rw-r--r--doc/classes/Variant.xml2
-rw-r--r--doc/classes/Vector2.xml81
-rw-r--r--doc/classes/Vector2i.xml80
-rw-r--r--doc/classes/Vector3.xml92
-rw-r--r--doc/classes/Vector3i.xml74
-rw-r--r--doc/classes/VehicleBody3D.xml2
-rw-r--r--doc/classes/VehicleWheel3D.xml7
-rw-r--r--doc/classes/VideoStream.xml2
-rw-r--r--doc/classes/VideoStreamPlayer.xml (renamed from doc/classes/VideoPlayer.xml)4
-rw-r--r--doc/classes/Viewport.xml74
-rw-r--r--doc/classes/ViewportTexture.xml2
-rw-r--r--doc/classes/VisualShaderNode.xml2
-rw-r--r--doc/classes/VisualShaderNodeCustom.xml4
-rw-r--r--doc/classes/VisualShaderNodeInput.xml2
-rw-r--r--doc/classes/VisualShaderNodeIntFunc.xml5
-rw-r--r--doc/classes/VisualShaderNodeIntOp.xml17
-rw-r--r--doc/classes/VisualShaderNodeTextureUniform.xml36
-rw-r--r--doc/classes/VoxelGI.xml12
-rw-r--r--doc/classes/VoxelGIData.xml14
-rw-r--r--doc/classes/Window.xml32
-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
304 files changed, 3362 insertions, 1941 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 21b5147386..20a371c3d0 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].
@@ -356,14 +358,16 @@
<argument index="1" name="to" type="float" />
<argument index="2" name="weight" type="float" />
<description>
- Returns a normalized value considering the given range. This is the opposite of [method lerp].
+ Returns an interpolation or extrapolation factor considering the range specified in [code]from[/code] and [code]to[/code], and the interpolated value specified in [code]weight[/code]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [code]weight[/code] is between [code]from[/code] and [code]to[/code] (inclusive). If [code]weight[/code] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]).
[codeblock]
+ # The interpolation ratio in the `lerp()` call below is 0.75.
var middle = lerp(20, 30, 0.75)
# `middle` is now 27.5.
# Now, we pretend to have forgotten the original ratio and want to get it back.
var ratio = inverse_lerp(20, 30, 27.5)
# `ratio` is now 0.75.
[/codeblock]
+ See also [method lerp] which performs the reverse of this operation.
</description>
</method>
<method name="is_equal_approx">
@@ -418,10 +422,11 @@
<argument index="1" name="to" type="float" />
<argument index="2" name="weight" type="float" />
<description>
- Linearly interpolates between two values by a normalized value. This is the opposite of [method inverse_lerp].
+ Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i].
[codeblock]
lerp(0, 4, 0.75) # Returns 3.0
[/codeblock]
+ See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep].
</description>
</method>
<method name="lerp_angle">
@@ -431,7 +436,7 @@
<argument index="2" name="weight" type="float" />
<description>
Linearly interpolates between two angles (in radians) by a normalized value.
- Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU].
+ Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU]. To perform eased interpolation with [method lerp_angle], combine it with [method ease] or [method smoothstep].
[codeblock]
extends Sprite
var elapsed = 0.0
@@ -723,6 +728,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>
@@ -1200,56 +1213,59 @@
</constant>
<constant name="COUNTERCLOCKWISE" value="1" enum="ClockDirection">
</constant>
- <constant name="HALIGN_LEFT" value="0" enum="HAlign">
+ <constant name="HORIZONTAL_ALIGNMENT_LEFT" value="0" enum="HorizontalAlignment">
Horizontal left alignment, usually for text-derived classes.
</constant>
- <constant name="HALIGN_CENTER" value="1" enum="HAlign">
+ <constant name="HORIZONTAL_ALIGNMENT_CENTER" value="1" enum="HorizontalAlignment">
Horizontal center alignment, usually for text-derived classes.
</constant>
- <constant name="HALIGN_RIGHT" value="2" enum="HAlign">
+ <constant name="HORIZONTAL_ALIGNMENT_RIGHT" value="2" enum="HorizontalAlignment">
Horizontal right alignment, usually for text-derived classes.
</constant>
- <constant name="HALIGN_FILL" value="3" enum="HAlign">
+ <constant name="HORIZONTAL_ALIGNMENT_FILL" value="3" enum="HorizontalAlignment">
Expand row to fit width, usually for text-derived classes.
</constant>
- <constant name="VALIGN_TOP" value="0" enum="VAlign">
+ <constant name="VERTICAL_ALIGNMENT_TOP" value="0" enum="VerticalAlignment">
Vertical top alignment, usually for text-derived classes.
</constant>
- <constant name="VALIGN_CENTER" value="1" enum="VAlign">
+ <constant name="VERTICAL_ALIGNMENT_CENTER" value="1" enum="VerticalAlignment">
Vertical center alignment, usually for text-derived classes.
</constant>
- <constant name="VALIGN_BOTTOM" value="2" enum="VAlign">
+ <constant name="VERTICAL_ALIGNMENT_BOTTOM" value="2" enum="VerticalAlignment">
Vertical bottom alignment, usually for text-derived classes.
</constant>
- <constant name="INLINE_ALIGN_TOP_TO" value="0" enum="InlineAlign">
- Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant.
+ <constant name="VERTICAL_ALIGNMENT_FILL" value="3" enum="VerticalAlignment">
+ Expand rows to fit height, usually for text-derived classes.
</constant>
- <constant name="INLINE_ALIGN_CENTER_TO" value="1" enum="InlineAlign">
- Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant.
+ <constant name="INLINE_ALIGNMENT_TOP_TO" value="0" enum="InlineAlignment">
+ Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
</constant>
- <constant name="INLINE_ALIGN_BOTTOM_TO" value="2" enum="InlineAlign">
- Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant.
+ <constant name="INLINE_ALIGNMENT_CENTER_TO" value="1" enum="InlineAlignment">
+ Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
</constant>
- <constant name="INLINE_ALIGN_TO_TOP" value="0" enum="InlineAlign">
- Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the top of the text.
+ <constant name="INLINE_ALIGNMENT_BOTTOM_TO" value="2" enum="InlineAlignment">
+ Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.
</constant>
- <constant name="INLINE_ALIGN_TO_CENTER" value="4" enum="InlineAlign">
- Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the center of the text.
+ <constant name="INLINE_ALIGNMENT_TO_TOP" value="0" enum="InlineAlignment">
+ Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the top of the text.
</constant>
- <constant name="INLINE_ALIGN_TO_BASELINE" value="8" enum="InlineAlign">
- Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the baseline of the text.
+ <constant name="INLINE_ALIGNMENT_TO_CENTER" value="4" enum="InlineAlignment">
+ Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the center of the text.
</constant>
- <constant name="INLINE_ALIGN_TO_BOTTOM" value="12" enum="InlineAlign">
+ <constant name="INLINE_ALIGNMENT_TO_BASELINE" value="8" enum="InlineAlignment">
+ Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the baseline of the text.
+ </constant>
+ <constant name="INLINE_ALIGNMENT_TO_BOTTOM" value="12" enum="InlineAlignment">
Aligns inline object (e.g. image, table) to the bottom of the text.
</constant>
- <constant name="INLINE_ALIGN_TOP" value="0" enum="InlineAlign">
- Aligns top of the inline object (e.g. image, table) to the top of the text. Equvalent to [code]INLINE_ALIGN_TOP_TO | INLINE_ALIGN_TO_TOP[/code].
+ <constant name="INLINE_ALIGNMENT_TOP" value="0" enum="InlineAlignment">
+ Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to [code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code].
</constant>
- <constant name="INLINE_ALIGN_CENTER" value="5" enum="InlineAlign">
- Aligns center of the inline object (e.g. image, table) to the center of the text. Equvalent to [code]INLINE_ALIGN_CENTER_TO | INLINE_ALIGN_TO_CENTER[/code].
+ <constant name="INLINE_ALIGNMENT_CENTER" value="5" enum="InlineAlignment">
+ Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to [code]INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER[/code].
</constant>
- <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 name="INLINE_ALIGNMENT_BOTTOM" value="14" enum="InlineAlignment">
+ Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code].
</constant>
<constant name="KEY_SPECIAL" value="16777216" enum="Key">
Keycodes with this bit applied are non-printable.
@@ -2149,25 +2165,58 @@
The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.
</constant>
<constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage">
- MIDI note OFF message.
+ MIDI note OFF message. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
</constant>
<constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage">
- MIDI note ON message.
+ MIDI note ON message. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
</constant>
<constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MIDIMessage">
- MIDI aftertouch message.
+ MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out".
</constant>
<constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MIDIMessage">
- MIDI control change message.
+ MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers.
</constant>
<constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MIDIMessage">
- MIDI program change message.
+ MIDI program change message. This message sent when the program patch number changes.
</constant>
<constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MIDIMessage">
- MIDI channel pressure message.
+ MIDI channel pressure message. This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys.
</constant>
<constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MIDIMessage">
- MIDI pitch bend message.
+ MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically).
+ </constant>
+ <constant name="MIDI_MESSAGE_SYSTEM_EXCLUSIVE" value="240" enum="MIDIMessage">
+ MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Godot.
+ </constant>
+ <constant name="MIDI_MESSAGE_QUARTER_FRAME" value="241" enum="MIDIMessage">
+ MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Godot.
+ </constant>
+ <constant name="MIDI_MESSAGE_SONG_POSITION_POINTER" value="242" enum="MIDIMessage">
+ MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Godot.
+ </constant>
+ <constant name="MIDI_MESSAGE_SONG_SELECT" value="243" enum="MIDIMessage">
+ MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Godot.
+ </constant>
+ <constant name="MIDI_MESSAGE_TUNE_REQUEST" value="246" enum="MIDIMessage">
+ MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators.
+ </constant>
+ <constant name="MIDI_MESSAGE_TIMING_CLOCK" value="248" enum="MIDIMessage">
+ MIDI timing clock message. Sent 24 times per quarter note when synchronization is required.
+ </constant>
+ <constant name="MIDI_MESSAGE_START" value="250" enum="MIDIMessage">
+ MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks.
+ </constant>
+ <constant name="MIDI_MESSAGE_CONTINUE" value="251" enum="MIDIMessage">
+ MIDI continue message. Continue at the point the sequence was stopped.
+ </constant>
+ <constant name="MIDI_MESSAGE_STOP" value="252" enum="MIDIMessage">
+ MIDI stop message. Stop the current sequence.
+ </constant>
+ <constant name="MIDI_MESSAGE_ACTIVE_SENSING" value="254" enum="MIDIMessage">
+ MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive.
+ </constant>
+ <constant name="MIDI_MESSAGE_SYSTEM_RESET" value="255" enum="MIDIMessage">
+ MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.
</constant>
<constant name="OK" value="0" enum="Error">
Methods that return [enum Error] return [constant OK] when no error occurred. Note that many functions don't return an error code but will print error messages to standard output.
@@ -2650,31 +2699,31 @@
<constant name="TYPE_ARRAY" value="25" enum="Variant.Type">
Variable is of type [Array].
</constant>
- <constant name="TYPE_RAW_ARRAY" value="26" enum="Variant.Type">
+ <constant name="TYPE_PACKED_BYTE_ARRAY" value="26" enum="Variant.Type">
Variable is of type [PackedByteArray].
</constant>
- <constant name="TYPE_INT32_ARRAY" value="27" enum="Variant.Type">
+ <constant name="TYPE_PACKED_INT32_ARRAY" value="27" enum="Variant.Type">
Variable is of type [PackedInt32Array].
</constant>
- <constant name="TYPE_INT64_ARRAY" value="28" enum="Variant.Type">
+ <constant name="TYPE_PACKED_INT64_ARRAY" value="28" enum="Variant.Type">
Variable is of type [PackedInt64Array].
</constant>
- <constant name="TYPE_FLOAT32_ARRAY" value="29" enum="Variant.Type">
+ <constant name="TYPE_PACKED_FLOAT32_ARRAY" value="29" enum="Variant.Type">
Variable is of type [PackedFloat32Array].
</constant>
- <constant name="TYPE_FLOAT64_ARRAY" value="30" enum="Variant.Type">
+ <constant name="TYPE_PACKED_FLOAT64_ARRAY" value="30" enum="Variant.Type">
Variable is of type [PackedFloat64Array].
</constant>
- <constant name="TYPE_STRING_ARRAY" value="31" enum="Variant.Type">
+ <constant name="TYPE_PACKED_STRING_ARRAY" value="31" enum="Variant.Type">
Variable is of type [PackedStringArray].
</constant>
- <constant name="TYPE_VECTOR2_ARRAY" value="32" enum="Variant.Type">
+ <constant name="TYPE_PACKED_VECTOR2_ARRAY" value="32" enum="Variant.Type">
Variable is of type [PackedVector2Array].
</constant>
- <constant name="TYPE_VECTOR3_ARRAY" value="33" enum="Variant.Type">
+ <constant name="TYPE_PACKED_VECTOR3_ARRAY" value="33" enum="Variant.Type">
Variable is of type [PackedVector3Array].
</constant>
- <constant name="TYPE_COLOR_ARRAY" value="34" enum="Variant.Type">
+ <constant name="TYPE_PACKED_COLOR_ARRAY" value="34" enum="Variant.Type">
Variable is of type [PackedColorArray].
</constant>
<constant name="TYPE_MAX" value="35" enum="Variant.Type">
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 15d146fba1..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">
@@ -157,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">
@@ -233,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 ==">
@@ -250,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/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index df0cc6f268..8fa4e9a309 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -68,11 +68,11 @@
<member name="dialog_text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The text displayed by the dialog.
</member>
- <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" override="true" default="true" />
- <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Alert!&quot;" />
- <member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" />
- <member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
- <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" override="true" default="true" />
+ <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" overrides="Window" default="true" />
+ <member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Alert!&quot;" />
+ <member name="transient" type="bool" setter="set_transient" getter="is_transient" overrides="Window" default="true" />
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible" overrides="Window" default="false" />
+ <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" overrides="Window" default="true" />
</members>
<signals>
<signal name="cancelled">
diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml
index b468e1d109..1710b28537 100644
--- a/doc/classes/AnimatedSprite2D.xml
+++ b/doc/classes/AnimatedSprite2D.xml
@@ -8,16 +8,10 @@
[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>
- <method name="is_playing" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if an animation is currently being played.
- </description>
- </method>
<method name="play">
<return type="void" />
<argument index="0" name="anim" type="StringName" default="&amp;&quot;&quot;" />
@@ -55,7 +49,7 @@
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The texture's drawing offset.
</member>
- <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false">
+ <member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false">
If [code]true[/code], the [member animation] is currently playing.
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
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..08290523f7 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -5,10 +5,10 @@
</brief_description>
<description>
Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.
- Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
+ 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..48507471e9 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">
@@ -72,6 +72,6 @@
</method>
</methods>
<members>
- <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
</members>
</class>
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 8abdaac45f..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>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index b74d4c1d3d..5b1861bc9a 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>
@@ -449,7 +449,10 @@
<argument index="2" name="step" type="int" default="1" />
<argument index="3" name="deep" type="bool" default="false" />
<description>
- Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. Wraps around if [code]begin[/code] or [code]end[/code] are out of bounds or negative. Returns an empty array for invalid parameters.
+ Returns the slice of the [Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [Array].
+ If [code]end[/code] is negative, it will be relative to the end of the array.
+ If specified, [code]step[/code] is the relative index between source elements.
+ If [code]deep[/code] is true, each element will be copied by value rather than by reference.
</description>
</method>
<method name="sort">
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/AspectRatioContainer.xml b/doc/classes/AspectRatioContainer.xml
index 4c0af0b997..237bec4e61 100644
--- a/doc/classes/AspectRatioContainer.xml
+++ b/doc/classes/AspectRatioContainer.xml
@@ -9,10 +9,10 @@
<tutorials>
</tutorials>
<members>
- <member name="alignment_horizontal" type="int" setter="set_alignment_horizontal" getter="get_alignment_horizontal" enum="AspectRatioContainer.AlignMode" default="1">
+ <member name="alignment_horizontal" type="int" setter="set_alignment_horizontal" getter="get_alignment_horizontal" enum="AspectRatioContainer.AlignmentMode" default="1">
Specifies the horizontal relative position of child controls.
</member>
- <member name="alignment_vertical" type="int" setter="set_alignment_vertical" getter="get_alignment_vertical" enum="AspectRatioContainer.AlignMode" default="1">
+ <member name="alignment_vertical" type="int" setter="set_alignment_vertical" getter="get_alignment_vertical" enum="AspectRatioContainer.AlignmentMode" default="1">
Specifies the vertical relative position of child controls.
</member>
<member name="ratio" type="float" setter="set_ratio" getter="get_ratio" default="1.0">
@@ -36,13 +36,13 @@
The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio.
When the bounding rectangle of child controls exceed the container's size and [member Control.rect_clip_content] is enabled, this allows to show only the container's area restricted by its own bounding rectangle.
</constant>
- <constant name="ALIGN_BEGIN" value="0" enum="AlignMode">
+ <constant name="ALIGNMENT_BEGIN" value="0" enum="AlignmentMode">
Aligns child controls with the beginning (left or top) of the container.
</constant>
- <constant name="ALIGN_CENTER" value="1" enum="AlignMode">
+ <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
Aligns child controls with the center of the container.
</constant>
- <constant name="ALIGN_END" value="2" enum="AlignMode">
+ <constant name="ALIGNMENT_END" value="2" enum="AlignmentMode">
Aligns child controls with the end (right or bottom) of the container.
</constant>
</constants>
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..d523472b8e 100644
--- a/doc/classes/AudioEffectRecord.xml
+++ b/doc/classes/AudioEffectRecord.xml
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectRecord" inherits="AudioEffect" version="4.0">
<brief_description>
- Audio effect used for recording sound from a microphone.
+ Audio effect used for recording the sound from an audio bus.
</brief_description>
<description>
- 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.
+ Allows the user to record the sound from an audio bus. This can include all audio output by Godot when used on the "Master" audio bus.
+ Can be used (with an [AudioStreamMicrophone]) to record 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 981b3167d9..1b77a5b4d8 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -57,7 +57,7 @@
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside" default="false">
If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it.
[b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value.
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 818ab50030..7a2120379f 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">
@@ -79,13 +79,16 @@
Threshold at which the alpha scissor will discard values.
</member>
<member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy" default="0.0">
- The strength of the anisotropy effect.
+ The strength of the anisotropy effect. This is multiplied by [member anisotropy_flowmap]'s alpha channel if a texture is defined there and the texture contains an alpha channel.
</member>
<member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Mesh tangents are needed for this to work. If the mesh does not contain tangents the anisotropy effect will appear broken.
+ If [code]true[/code], anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections.
+ [b]Note:[/b] Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken.
+ [b]Note:[/b] Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting [member texture_filter] to [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC].
</member>
<member name="anisotropy_flowmap" type="Texture2D" setter="set_texture" getter="get_texture">
- Texture that offsets the tangent map for anisotropy calculations.
+ Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion.
+ If present, the texture's alpha channel will be used to multiply the strength of the [member anisotropy] effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored.
</member>
<member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], ambient occlusion is enabled. Ambient occlusion darkens areas based on the [member ao_texture].
@@ -136,7 +139,7 @@
Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel.
</member>
<member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="BaseMaterial3D.CullMode" default="0">
- Which side of the object is not drawn when backfaces are rendered. See [enum CullMode].
+ Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. See [enum CullMode].
</member>
<member name="depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="BaseMaterial3D.DepthDrawMode" default="0">
Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member transparency].
@@ -576,10 +579,10 @@
No depth draw.
</constant>
<constant name="CULL_BACK" value="0" enum="CullMode">
- Default cull mode. The back of the object is culled when not visible.
+ Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes this means that only the exterior of the mesh will be visible.
</constant>
<constant name="CULL_FRONT" value="1" enum="CullMode">
- The front of the object is culled when not visible.
+ Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes this means that the interior of the mesh will be drawn instead of the exterior.
</constant>
<constant name="CULL_DISABLED" value="2" enum="CullMode">
No culling is performed.
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/BoxContainer.xml b/doc/classes/BoxContainer.xml
index ec81b866f6..a968e855a5 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -18,19 +18,16 @@
</method>
</methods>
<members>
- <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0">
- The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER], or [constant ALIGN_END]).
+ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignmentMode" default="0">
+ The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END]).
</member>
</members>
<constants>
- <constant name="ALIGN_BEGIN" value="0" enum="AlignMode">
- Aligns children with the beginning of the container.
+ <constant name="ALIGNMENT_BEGIN" value="0" enum="AlignmentMode">
</constant>
- <constant name="ALIGN_CENTER" value="1" enum="AlignMode">
- Aligns children with the center of the container.
+ <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
</constant>
- <constant name="ALIGN_END" value="2" enum="AlignMode">
- Aligns children with the end of the container.
+ <constant name="ALIGNMENT_END" value="2" enum="AlignmentMode">
</constant>
</constants>
</class>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index ba55fda59c..65b66b2fd5 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -64,8 +64,8 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign" default="1">
- Text alignment policy for the button's text, use one of the [enum TextAlign] constants.
+ <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" enum="HorizontalAlignment" default="1">
+ Text alignment policy for the button's text, use one of the [enum @GlobalScope.HorizontalAlignment] constants.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false">
When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text.
@@ -78,9 +78,10 @@
</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.
+ <member name="icon_alignment" type="int" setter="set_icon_alignment" getter="get_icon_alignment" enum="HorizontalAlignment" default="0">
+ Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum @GlobalScope.HorizontalAlignment] constants as the text alignment. If centered, text will draw on top of the icon.
</member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
@@ -92,27 +93,7 @@
Base text writing direction.
</member>
</members>
- <constants>
- <constant name="ALIGN_LEFT" value="0" enum="TextAlign">
- Align the text to the left.
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="TextAlign">
- Align the text to the center.
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="TextAlign">
- Align the text to the right.
- </constant>
- </constants>
<theme_items>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [Button] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] of the [Button]'s text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the [Button].
</theme_item>
@@ -134,15 +115,6 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [Button] is being pressed.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [Button]'s text.
- </theme_item>
- <theme_item name="hover" data_type="style" type="StyleBox">
- [StyleBox] used when the [Button] is being hovered.
- </theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="2">
- The horizontal space between [Button]'s icon and text.
- </theme_item>
<theme_item name="icon_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is disabled.
</theme_item>
@@ -161,12 +133,30 @@
<theme_item name="icon_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is being pressed.
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Default [StyleBox] for the [Button].
+ <theme_item name="hseparation" data_type="constant" type="int" default="2">
+ The horizontal space between [Button]'s icon and text.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [Button]'s text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [Button]'s text.
+ </theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [Button] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [Button] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="hover" data_type="style" type="StyleBox">
+ [StyleBox] used when the [Button] is being hovered.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Default [StyleBox] for the [Button].
+ </theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is being pressed.
</theme_item>
diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml
index 9229e69fa7..e3e781ac10 100644
--- a/doc/classes/ButtonGroup.xml
+++ b/doc/classes/ButtonGroup.xml
@@ -24,7 +24,7 @@
</method>
</methods>
<members>
- <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
</members>
<signals>
<signal name="pressed">
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index 9226140c1a..a4415e89db 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">
@@ -116,6 +116,9 @@
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. If [member texture] is defined, it will be multiplied by this color.
</member>
+ <member name="color_initial_ramp" type="Gradient" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
+ Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]).
+ </member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [Gradient] (multiplied with [member color]).
</member>
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index ad491465f2..da9c63c0f7 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -96,13 +96,13 @@
Minimum angle.
</member>
<member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
- Each particle's angular velocity will vary along this [Curve].
+ Each particle's angular velocity (rotation speed) will vary along this [Curve] over its lifetime.
</member>
<member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum angular velocity.
+ Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum angular velocity.
+ Minimum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation offset will vary along this [Curve].
@@ -125,6 +125,9 @@
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
</member>
+ <member name="color_initial_ramp" type="Gradient" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
+ Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]).
+ </member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]).
</member>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index a3a891cdcb..90663bfaa5 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -30,13 +30,15 @@
<method name="get_camera_position" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the camera position.
+ Returns the camera's [code]position[/code] (the tracked point the camera attempts to follow), relative to the origin.
+ [b]Note:[/b] The returned value is not the same as [member Node2D.position] or [member Node2D.global_position], as it is affected by the [code]drag[/code] properties.
</description>
</method>
<method name="get_camera_screen_center" qualifiers="const">
<return type="Vector2" />
<description>
Returns the location of the [Camera2D]'s screen-center, relative to the origin.
+ [b]Note:[/b] The real [code]position[/code] of the camera may be different, see [method get_camera_position].
</description>
</method>
<method name="get_drag_margin" qualifiers="const">
@@ -57,7 +59,7 @@
<return type="void" />
<description>
Sets the camera's position immediately to its current smoothing destination.
- This has no effect if smoothing is disabled.
+ This method has no effect if [member smoothing_enabled] is [code]false[/code].
</description>
</method>
<method name="set_drag_margin">
@@ -95,7 +97,7 @@
</member>
<member name="drag_horizontal_offset" type="float" setter="set_drag_horizontal_offset" getter="get_drag_horizontal_offset" default="0.0">
The relative horizontal drag offset of the camera between the right ([code]-1[/code]) and left ([code]1[/code]) drag margins.
- [b]Note:[/b] Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when the horizontal drag margin is enabled or the drag margins are changed.
+ [b]Note:[/b] Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when [member drag_horizontal_enabled] is [code]true[/code] or the drag margins are changed.
</member>
<member name="drag_left_margin" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the left edge of the screen.
@@ -111,7 +113,7 @@
</member>
<member name="drag_vertical_offset" type="float" setter="set_drag_vertical_offset" getter="get_drag_vertical_offset" default="0.0">
The relative vertical drag offset of the camera between the bottom ([code]-1[/code]) and top ([code]1[/code]) drag margins.
- [b]Note:[/b] Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when the vertical drag margin is enabled or the drag margins are changed.
+ [b]Note:[/b] Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when [member drag_vertical_enabled] is [code]true[/code] or the drag margins are changed.
</member>
<member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled" default="false">
If [code]true[/code], draws the camera's drag margin rectangle in the editor.
@@ -123,30 +125,30 @@
If [code]true[/code], draws the camera's screen rectangle in the editor.
</member>
<member name="limit_bottom" type="int" setter="set_limit" getter="get_limit" default="10000000">
- Bottom scroll limit in pixels. The camera stops moving when reaching this value.
+ Bottom scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
<member name="limit_left" type="int" setter="set_limit" getter="get_limit" default="-10000000">
- Left scroll limit in pixels. The camera stops moving when reaching this value.
+ Left scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
<member name="limit_right" type="int" setter="set_limit" getter="get_limit" default="10000000">
- Right scroll limit in pixels. The camera stops moving when reaching this value.
+ Right scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
<member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled" default="false">
If [code]true[/code], the camera smoothly stops when reaches its limits.
- This has no effect if smoothing is disabled.
+ This property has no effect if [member smoothing_enabled] is [code]false[/code].
[b]Note:[/b] To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [method reset_smoothing].
</member>
<member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000">
- Top scroll limit in pixels. The camera stops moving when reaching this value.
+ Top scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
- The camera's offset, useful for looking around or camera shake animations.
+ The camera's relative offset. Useful for looking around or camera shake animations. The offsetted camera can go past the limits defined in [member limit_top], [member limit_bottom], [member limit_left] and [member limit_right].
</member>
<member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1">
The camera's process callback. See [enum Camera2DProcessCallback].
</member>
<member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false">
- If [code]true[/code], the camera rotates with the target.
+ If [code]true[/code], the camera view rotates with the target.
</member>
<member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled" default="false">
If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed].
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..a7b2434def 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>
@@ -44,7 +44,7 @@
<argument index="6" name="width" type="float" default="1.0" />
<argument index="7" name="antialiased" type="bool" default="false" />
<description>
- Draws an arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve.
+ Draws a unfilled arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve. See also [method draw_circle].
</description>
</method>
<method name="draw_char" qualifiers="const">
@@ -67,7 +67,7 @@
<argument index="1" name="radius" type="float" />
<argument index="2" name="color" type="Color" />
<description>
- Draws a colored circle.
+ Draws a colored, unfilled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon].
</description>
</method>
<method name="draw_colored_polygon">
@@ -77,7 +77,7 @@
<argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
<argument index="3" name="texture" type="Texture2D" default="null" />
<description>
- Draws a colored polygon of any amount of points, convex or concave.
+ Draws a colored polygon of any amount of points, convex or concave. Unlike [method draw_polygon], a single color must be specified for the whole polygon.
</description>
</method>
<method name="draw_end_animation">
@@ -93,7 +93,7 @@
<argument index="2" name="color" type="Color" />
<argument index="3" name="width" type="float" default="1.0" />
<description>
- Draws a line from a 2D point to another, with a given color and width.
+ Draws a line from a 2D point to another, with a given color and width. See also [method draw_multiline] and [method draw_polyline].
</description>
</method>
<method name="draw_mesh">
@@ -126,7 +126,7 @@
<argument index="1" name="color" type="Color" />
<argument index="2" name="width" type="float" default="1.0" />
<description>
- Draws multiple, parallel lines with a uniform [code]color[/code].
+ Draws multiple disconnected lines with a uniform [code]color[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead.
</description>
</method>
<method name="draw_multiline_colors">
@@ -135,7 +135,7 @@
<argument index="1" name="colors" type="PackedColorArray" />
<argument index="2" name="width" type="float" default="1.0" />
<description>
- Draws multiple, parallel lines with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code].
+ Draws multiple disconnected lines with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead.
</description>
</method>
<method name="draw_multiline_string" qualifiers="const">
@@ -143,7 +143,7 @@
<argument index="0" name="font" type="Font" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="text" type="String" />
- <argument index="3" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="max_lines" type="int" default="-1" />
<argument index="6" name="size" type="int" default="16" />
@@ -170,7 +170,7 @@
<argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
<argument index="3" name="texture" type="Texture2D" default="null" />
<description>
- Draws a polygon of any amount of points, convex or concave.
+ Draws a solid polygon of any amount of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors].
</description>
</method>
<method name="draw_polyline">
@@ -180,7 +180,7 @@
<argument index="2" name="width" type="float" default="1.0" />
<argument index="3" name="antialiased" type="bool" default="false" />
<description>
- Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code].
+ Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline] instead. See also [method draw_polygon].
</description>
</method>
<method name="draw_polyline_colors">
@@ -190,7 +190,7 @@
<argument index="2" name="width" type="float" default="1.0" />
<argument index="3" name="antialiased" type="bool" default="false" />
<description>
- Draws interconnected line segments with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code].
+ Draws interconnected line segments with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline_colors] instead. See also [method draw_polygon].
</description>
</method>
<method name="draw_primitive">
@@ -201,7 +201,7 @@
<argument index="3" name="texture" type="Texture2D" default="null" />
<argument index="4" name="width" type="float" default="1.0" />
<description>
- Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad.
+ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also [method draw_line], [method draw_polyline], [method draw_polygon], and [method draw_rect].
</description>
</method>
<method name="draw_rect">
@@ -236,7 +236,7 @@
<argument index="0" name="font" type="Font" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="text" type="String" />
- <argument index="3" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="size" type="int" default="16" />
<argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
@@ -253,7 +253,7 @@
# so the Control is only created once.
var default_font = Control.new().get_font("font")
var default_font_size = Control.new().get_font_size("font_size")
- draw_string(default_font, Vector2(64, 64), "Hello world", HALIGN_LEFT, -1, font_size)
+ draw_string(default_font, Vector2(64, 64), "Hello world", HORIZONTAL_ALIGNMENT_LEFT, -1, font_size)
[/gdscript]
[csharp]
// If using this method in a script that redraws constantly, move the
@@ -261,7 +261,7 @@
// so the Control is only created once.
Font defaultFont = new Control().GetFont("font");
int defaultFontSize = new Control().GetFontSize("font_size");
- DrawString(defaultFont, new Vector2(64, 64), "Hello world", HALIGN_LEFT, -1, defaultFontSize);
+ DrawString(defaultFont, new Vector2(64, 64), "Hello world", HORIZONTAL_ALIGNMENT_LEFT, -1, defaultFontSize);
[/csharp]
[/codeblocks]
See also [method Font.draw_string].
@@ -382,7 +382,7 @@
<method name="hide">
<return type="void" />
<description>
- Hide the [CanvasItem] if it's currently visible.
+ Hide the [CanvasItem] if it's currently visible. This is equivalent to setting [member visible] to [code]false[/code].
</description>
</method>
<method name="is_local_transform_notification_enabled" qualifiers="const">
@@ -434,7 +434,7 @@
<method name="show">
<return type="void" />
<description>
- Show the [CanvasItem] if it's currently hidden. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
+ Show the [CanvasItem] if it's currently hidden. This is equivalent to setting [member visible] to [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
</description>
</method>
<method name="update">
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..47ee5d5487 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>
@@ -135,7 +135,7 @@
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.
Modifies [member motion_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision].
When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.
- The general behaviour and available properties change according to the [member motion_mode].
+ The general behavior and available properties change according to the [member motion_mode].
Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code].
</description>
</method>
@@ -172,13 +172,13 @@
Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
</member>
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0">
- Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes.
+ Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes.
</member>
<member name="motion_velocity" type="Vector2" setter="set_motion_velocity" getter="get_motion_velocity" default="Vector2(0, 0)">
Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide].
</member>
<member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody2D.MovingPlatformApplyVelocityOnLeave" default="0">
- Sets the behaviour to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behaviour.
+ Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior.
</member>
<member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 24b26fb16e..e35471b4f6 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>
@@ -154,13 +154,13 @@
Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
</member>
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody3D.MotionMode" default="0">
- Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes.
+ Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes.
</member>
<member name="motion_velocity" type="Vector3" setter="set_motion_velocity" getter="get_motion_velocity" default="Vector3(0, 0, 0)">
Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide].
</member>
<member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody3D.MovingPlatformApplyVelocityOnLeave" default="0">
- Sets the behaviour to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behaviour.
+ Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior.
</member>
<member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 18f668a052..6180f56858 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -10,28 +10,10 @@
<tutorials>
</tutorials>
<members>
- <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
+ <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<theme_items>
- <theme_item name="check_vadjust" data_type="constant" type="int" default="0">
- The vertical offset used when rendering the check icons (in pixels).
- </theme_item>
- <theme_item name="checked" data_type="icon" type="Texture2D">
- The check icon to display when the [CheckBox] is checked.
- </theme_item>
- <theme_item name="checked_disabled" data_type="icon" type="Texture2D">
- The check icon to display when the [CheckBox] is checked and disabled.
- </theme_item>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is focused.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- The [Font] to use for the [CheckBox] text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
The [CheckBox] text's font color.
</theme_item>
@@ -53,26 +35,26 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckBox] text's font color when it's pressed.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [CheckBox]'s text.
- </theme_item>
- <theme_item name="hover" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is hovered.
- </theme_item>
- <theme_item name="hover_pressed" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
+ <theme_item name="check_vadjust" data_type="constant" type="int" default="0">
+ The vertical offset used when rendering the check icons (in pixels).
</theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The separation between the check icon and the text (in pixels).
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background.
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="pressed" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckBox] is pressed.
+ <theme_item name="font" data_type="font" type="Font">
+ The [Font] to use for the [CheckBox] text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [CheckBox]'s text.
+ </theme_item>
+ <theme_item name="checked" data_type="icon" type="Texture2D">
+ The check icon to display when the [CheckBox] is checked.
+ </theme_item>
+ <theme_item name="checked_disabled" data_type="icon" type="Texture2D">
+ The check icon to display when the [CheckBox] is checked and disabled.
</theme_item>
<theme_item name="radio_checked" data_type="icon" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
@@ -90,5 +72,23 @@
<theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
The check icon to display when the [CheckBox] is unchecked and disabled.
</theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="hover" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is hovered.
+ </theme_item>
+ <theme_item name="hover_pressed" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background.
+ </theme_item>
+ <theme_item name="pressed" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckBox] is pressed.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index c86fadb6b0..659fb5126f 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -10,22 +10,10 @@
<tutorials>
</tutorials>
<members>
- <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
+ <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<theme_items>
- <theme_item name="check_vadjust" data_type="constant" type="int" default="0">
- The vertical offset used when rendering the toggle icons (in pixels).
- </theme_item>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckButton] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckButton] is focused.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- The [Font] to use for the [CheckButton] text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
The [CheckButton] text's font color.
</theme_item>
@@ -47,20 +35,20 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckButton] text's font color when it's pressed.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [CheckButton]'s text.
- </theme_item>
- <theme_item name="hover" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckButton] is hovered.
- </theme_item>
- <theme_item name="hover_pressed" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed.
+ <theme_item name="check_vadjust" data_type="constant" type="int" default="0">
+ The vertical offset used when rendering the toggle icons (in pixels).
</theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The separation between the toggle icon and the text (in pixels).
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- The [StyleBox] to display as a background.
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ The [Font] to use for the [CheckButton] text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [CheckButton]'s text.
</theme_item>
<theme_item name="off" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is unchecked (for left-to-right layouts).
@@ -86,8 +74,20 @@
<theme_item name="on_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked (for right-to-left layouts).
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="hover" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is hovered.
+ </theme_item>
+ <theme_item name="hover_pressed" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ The [StyleBox] to display as a background.
</theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is pressed.
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index bb1a4a79f0..697b0443f1 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -234,7 +234,7 @@
<method name="get_folded_lines" qualifiers="const">
<return type="int[]" />
<description>
- Return all lines that are current folded.
+ Returns all lines that are current folded.
</description>
</method>
<method name="get_text_for_code_completion" qualifiers="const">
@@ -288,7 +288,7 @@
<argument index="0" name="line" type="int" />
<argument index="1" name="column" type="int" default="-1" />
<description>
- Return delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code].
+ Returns delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code].
</description>
</method>
<method name="is_in_string" qualifiers="const">
@@ -296,7 +296,7 @@
<argument index="0" name="line" type="int" />
<argument index="1" name="column" type="int" default="-1" />
<description>
- Return the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code].
+ Returns the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code].
</description>
</method>
<method name="is_line_bookmarked" qualifiers="const">
@@ -487,7 +487,7 @@
<member name="indent_use_spaces" type="bool" setter="set_indent_using_spaces" getter="is_indent_using_spaces" default="false">
Use spaces instead of tabs for indentation.
</member>
- <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" override="true" enum="Control.LayoutDirection" default="2" />
+ <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" overrides="Control" enum="Control.LayoutDirection" default="2" />
<member name="line_folding" type="bool" setter="set_line_folding_enabled" getter="is_line_folding_enabled" default="false">
Sets whether line folding is allowed.
</member>
@@ -497,7 +497,7 @@
<member name="symbol_lookup_on_click" type="bool" setter="set_symbol_lookup_on_click_enabled" getter="is_symbol_lookup_on_click_enabled" default="false">
Set when a validated word from [signal symbol_validate] is clicked, the [signal symbol_lookup] should be emitted.
</member>
- <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" override="true" enum="Control.TextDirection" default="1" />
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" overrides="TextEdit" enum="Control.TextDirection" default="1" />
</members>
<signals>
<signal name="breakpoint_toggled">
@@ -562,24 +562,15 @@
<theme_item name="background_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
Sets the background [Color].
</theme_item>
- <theme_item name="bookmark" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked lines.
- </theme_item>
<theme_item name="bookmark_color" data_type="color" type="Color" default="Color(0.5, 0.64, 1, 0.8)">
[Color] of the bookmark icon for bookmarked lines.
</theme_item>
<theme_item name="brace_mismatch_color" data_type="color" type="Color" default="Color(1, 0.2, 0.2, 1)">
[Color] of the text to highlight mismatched braces.
</theme_item>
- <theme_item name="breakpoint" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed lines.
- </theme_item>
<theme_item name="breakpoint_color" data_type="color" type="Color" default="Color(0.9, 0.29, 0.3, 1)">
[Color] of the breakpoint icon for bookmarked lines.
</theme_item>
- <theme_item name="can_fold" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw in the line folding gutter when a line can be folded.
- </theme_item>
<theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
[Color] of the text behind the caret when block caret is enabled.
</theme_item>
@@ -589,9 +580,6 @@
<theme_item name="code_folding_color" data_type="color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)">
[Color] for all icons related to line folding.
</theme_item>
- <theme_item name="completion" data_type="style" type="StyleBox">
- [StyleBox] for the code completion popup.
- </theme_item>
<theme_item name="completion_background_color" data_type="color" type="Color" default="Color(0.17, 0.16, 0.2, 1)">
Sets the background [Color] for the code completion popup.
</theme_item>
@@ -601,42 +589,18 @@
<theme_item name="completion_font_color" data_type="color" type="Color" default="Color(0.67, 0.67, 0.67, 1)">
Font [Color] for the code completion popup.
</theme_item>
- <theme_item name="completion_lines" data_type="constant" type="int" default="7">
- Max number of options to display in the code completion popup at any one time.
- </theme_item>
- <theme_item name="completion_max_width" data_type="constant" type="int" default="50">
- Max width of options in the code completion popup. Options longer then this will be cut off.
- </theme_item>
<theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
[Color] of the scrollbar in the code completion popup.
</theme_item>
- <theme_item name="completion_scroll_width" data_type="constant" type="int" default="3">
- Width of the scrollbar in the code completion popup.
- </theme_item>
<theme_item name="completion_selected_color" data_type="color" type="Color" default="Color(0.26, 0.26, 0.27, 1)">
Background highlight [Color] for the current selected option item in the code completion popup.
</theme_item>
<theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
Background [Color] of the line containing the caret.
</theme_item>
- <theme_item name="executing_line" data_type="icon" type="Texture2D">
- Icon to draw in the executing gutter for executing lines.
- </theme_item>
<theme_item name="executing_line_color" data_type="color" type="Color" default="Color(0.98, 0.89, 0.27, 1)">
[Color] of the executing icon for executing lines.
</theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- Sets the [StyleBox] when in focus.
- </theme_item>
- <theme_item name="folded" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw in the line folding gutter when a line is folded and can be unfolded.
- </theme_item>
- <theme_item name="folded_eol_icon" data_type="icon" type="Texture2D">
- Sets a custom [Texture2D] to draw at the end of a folded line.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- Sets the default [Font].
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Sets the font [Color].
</theme_item>
@@ -649,35 +613,62 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Sets default font size.
- </theme_item>
<theme_item name="line_length_guideline_color" data_type="color" type="Color" default="Color(0.3, 0.5, 0.8, 0.1)">
[Color] of the main line length guideline, secondary guidelines will have 50% alpha applied.
</theme_item>
<theme_item name="line_number_color" data_type="color" type="Color" default="Color(0.67, 0.67, 0.67, 0.4)">
Sets the [Color] of line numbers.
</theme_item>
+ <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
+ [Color] of the border around text that matches the search query.
+ </theme_item>
+ <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
+ [Color] behind the text that matches the search query.
+ </theme_item>
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
+ Sets the highlight [Color] of text selections.
+ </theme_item>
+ <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
+ Sets the highlight [Color] of multiple occurrences. [member TextEdit.highlight_all_occurrences] has to be enabled.
+ </theme_item>
+ <theme_item name="completion_lines" data_type="constant" type="int" default="7">
+ Max number of options to display in the code completion popup at any one time.
+ </theme_item>
+ <theme_item name="completion_max_width" data_type="constant" type="int" default="50">
+ Max width of options in the code completion popup. Options longer then this will be cut off.
+ </theme_item>
+ <theme_item name="completion_scroll_width" data_type="constant" type="int" default="3">
+ Width of the scrollbar in the code completion popup.
+ </theme_item>
<theme_item name="line_spacing" data_type="constant" type="int" default="4">
Sets the spacing between the lines.
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Sets the [StyleBox].
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="read_only" data_type="style" type="StyleBox">
- Sets the [StyleBox] when [member TextEdit.editable] is disabled.
+ <theme_item name="font" data_type="font" type="Font">
+ Sets the default [Font].
</theme_item>
- <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
- [Color] of the border around text that matches the search query.
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Sets default font size.
</theme_item>
- <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
- [Color] behind the text that matches the search query.
+ <theme_item name="bookmark" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked lines.
</theme_item>
- <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
- Sets the highlight [Color] of text selections.
+ <theme_item name="breakpoint" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed lines.
+ </theme_item>
+ <theme_item name="can_fold" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw in the line folding gutter when a line can be folded.
+ </theme_item>
+ <theme_item name="executing_line" data_type="icon" type="Texture2D">
+ Icon to draw in the executing gutter for executing lines.
+ </theme_item>
+ <theme_item name="folded" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw in the line folding gutter when a line is folded and can be unfolded.
+ </theme_item>
+ <theme_item name="folded_eol_icon" data_type="icon" type="Texture2D">
+ Sets a custom [Texture2D] to draw at the end of a folded line.
</theme_item>
<theme_item name="space" data_type="icon" type="Texture2D">
Sets a custom [Texture2D] for space text characters.
@@ -685,8 +676,17 @@
<theme_item name="tab" data_type="icon" type="Texture2D">
Sets a custom [Texture2D] for tab text characters.
</theme_item>
- <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
- Sets the highlight [Color] of multiple occurrences. [member TextEdit.highlight_all_occurrences] has to be enabled.
+ <theme_item name="completion" data_type="style" type="StyleBox">
+ [StyleBox] for the code completion popup.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ Sets the [StyleBox] when in focus. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Sets the [StyleBox].
+ </theme_item>
+ <theme_item name="read_only" data_type="style" type="StyleBox">
+ Sets the [StyleBox] when [member TextEdit.editable] is disabled.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml
index 064be0c29d..efd8f618e7 100644
--- a/doc/classes/CodeHighlighter.xml
+++ b/doc/classes/CodeHighlighter.xml
@@ -76,21 +76,21 @@
<return type="bool" />
<argument index="0" name="start_key" type="String" />
<description>
- Return [code]true[/code] if the start key exists, else [code]false[/code].
+ Returns [code]true[/code] if the start key exists, else [code]false[/code].
</description>
</method>
<method name="has_keyword_color" qualifiers="const">
<return type="bool" />
<argument index="0" name="keyword" type="String" />
<description>
- Return [code]true[/code] if the keyword exists, else [code]false[/code].
+ Returns [code]true[/code] if the keyword exists, else [code]false[/code].
</description>
</method>
<method name="has_member_keyword_color" qualifiers="const">
<return type="bool" />
<argument index="0" name="member_keyword" type="String" />
<description>
- Return [code]true[/code] if the member keyword exists, else [code]false[/code].
+ Returns [code]true[/code] if the member keyword exists, else [code]false[/code].
</description>
</method>
<method name="remove_color_region">
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 650f10a97f..f3fcd90f51 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -4,7 +4,7 @@
Color in RGBA format using floats on the range of 0 to 1.
</brief_description>
<description>
- A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
+ A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for opacity. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
You can also create a color from standardized color names by using the string constructor or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
@@ -30,10 +30,10 @@
Constructs a [Color] from an existing color, but with a custom alpha value.
[codeblocks]
[gdscript]
- var red = Color(Color.red, 0.5) # 50% transparent red.
+ var red = Color(Color.red, 0.2) # 20% opaque red.
[/gdscript]
[csharp]
- var red = new Color(Colors.Red, 0.5f); // 50% transparent red.
+ var red = new Color(Colors.Red, 0.2f); // 20% opaque red.
[/csharp]
[/codeblocks]
</description>
@@ -178,6 +178,13 @@
<description>
</description>
</method>
+ <method name="get_luminance" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the luminance of the color in the [code][0.0, 1.0][/code] range.
+ This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark.
+ </description>
+ </method>
<method name="get_named_color" qualifiers="static">
<return type="Color" />
<argument index="0" name="idx" type="int" />
@@ -398,7 +405,7 @@
</methods>
<members>
<member name="a" type="float" setter="" getter="" default="1.0">
- The color's alpha (transparency) component, typically on the range of 0 to 1.
+ The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque.
</member>
<member name="a8" type="int" setter="" getter="" default="255">
Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1.
@@ -881,54 +888,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 ==">
@@ -940,22 +957,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/ColorPicker.xml b/doc/classes/ColorPicker.xml
index fca6a7631a..cb543afaba 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -41,7 +41,7 @@
If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).
</member>
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
- If [code]true[/code], shows an alpha channel slider (transparency).
+ If [code]true[/code], shows an alpha channel slider (opacity).
</member>
<member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode" default="false">
If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders.
@@ -93,6 +93,20 @@
</constant>
</constants>
<theme_items>
+ <theme_item name="h_width" data_type="constant" type="int" default="30">
+ The width of the hue selection slider.
+ </theme_item>
+ <theme_item name="label_width" data_type="constant" type="int" default="10">
+ </theme_item>
+ <theme_item name="margin" data_type="constant" type="int" default="4">
+ The margin around the [ColorPicker].
+ </theme_item>
+ <theme_item name="sv_height" data_type="constant" type="int" default="256">
+ The height of the saturation-value selection box.
+ </theme_item>
+ <theme_item name="sv_width" data_type="constant" type="int" default="256">
+ The width of the saturation-value selection box.
+ </theme_item>
<theme_item name="add_preset" data_type="icon" type="Texture2D">
The icon for the "Add Preset" button.
</theme_item>
@@ -104,14 +118,6 @@
</theme_item>
<theme_item name="color_sample" data_type="icon" type="Texture2D">
</theme_item>
- <theme_item name="h_width" data_type="constant" type="int" default="30">
- The width of the hue selection slider.
- </theme_item>
- <theme_item name="label_width" data_type="constant" type="int" default="10">
- </theme_item>
- <theme_item name="margin" data_type="constant" type="int" default="4">
- The margin around the [ColorPicker].
- </theme_item>
<theme_item name="overbright_indicator" data_type="icon" type="Texture2D">
The indicator used to signalize that the color value is outside the 0-1 range.
</theme_item>
@@ -122,11 +128,5 @@
<theme_item name="screen_picker" data_type="icon" type="Texture2D">
The icon for the screen color picker button.
</theme_item>
- <theme_item name="sv_height" data_type="constant" type="int" default="256">
- The height of the saturation-value selection box.
- </theme_item>
- <theme_item name="sv_width" data_type="constant" type="int" default="256">
- The width of the saturation-value selection box.
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index fff27d2d56..7fd6ffcc0d 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -35,7 +35,7 @@
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible.
</member>
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<signals>
<signal name="color_changed">
@@ -56,18 +56,6 @@
</signal>
</signals>
<theme_items>
- <theme_item name="bg" data_type="icon" type="Texture2D">
- The background of the color preview rect on the button.
- </theme_item>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [ColorPickerButton] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [ColorPickerButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] of the [ColorPickerButton]'s text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Default text [Color] of the [ColorPickerButton].
</theme_item>
@@ -86,21 +74,33 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(0.8, 0.8, 0.8, 1)">
Text [Color] used when the [ColorPickerButton] is being pressed.
</theme_item>
+ <theme_item name="hseparation" data_type="constant" type="int" default="2">
+ The horizontal space between [ColorPickerButton]'s icon and text.
+ </theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [ColorPickerButton]'s text.
+ </theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [ColorPickerButton]'s text.
</theme_item>
+ <theme_item name="bg" data_type="icon" type="Texture2D">
+ The background of the color preview rect on the button.
+ </theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [ColorPickerButton] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [ColorPickerButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [ColorPickerButton] is being hovered.
</theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="2">
- The horizontal space between [ColorPickerButton]'s icon and text.
- </theme_item>
<theme_item name="normal" data_type="style" type="StyleBox">
Default [StyleBox] for the [ColorPickerButton].
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
- </theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [ColorPickerButton] is being pressed.
</theme_item>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index c4bdaf436d..bf4210ac98 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -27,8 +27,8 @@
</method>
</methods>
<members>
- <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" override="true" default="Vector2i(200, 70)" />
- <member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i(200, 100)" />
- <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Please Confirm...&quot;" />
+ <member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" overrides="Window" default="Vector2i(200, 70)" />
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" overrides="Window" default="Vector2i(200, 100)" />
+ <member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Please Confirm...&quot;" />
</members>
</class>
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index 24e73534d3..83655425fc 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -26,7 +26,7 @@
</method>
</methods>
<members>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" />
</members>
<signals>
<signal name="pre_sort_children">
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 63e3eb7a5f..3d8199831d 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>
@@ -102,6 +102,7 @@
<description>
Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member rect_min_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately).
If not overridden, defaults to [constant Vector2.ZERO].
+ [b]Note:[/b] This method will not be called when the script is attached to a [Control] node that already overrides its minimum size (e.g. [Label], [Button], [PanelContainer] etc.). It can only be used with most basic GUI nodes, like [Control], [Container], [Panel] etc.
</description>
</method>
<method name="_gui_input" qualifiers="virtual">
@@ -200,7 +201,7 @@
<argument index="1" name="text" type="String" />
<description>
User defined BiDi algorithm override function.
- Return [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately.
+ Returns [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
<method name="accept_event">
@@ -654,16 +655,16 @@
See [method add_theme_stylebox_override].
</description>
</method>
- <method name="is_layout_rtl" qualifiers="const">
+ <method name="is_drag_successful" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if layout is right-to-left.
+ Returns [code]true[/code] if drag operation is successful.
</description>
</method>
- <method name="minimum_size_changed">
- <return type="void" />
+ <method name="is_layout_rtl" qualifiers="const">
+ <return type="bool" />
<description>
- Invalidates the size cache in this node and in parent nodes up to top_level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member rect_min_size] directly calls this method automatically.
+ Returns [code]true[/code] if layout is right-to-left.
</description>
</method>
<method name="release_focus">
@@ -714,6 +715,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" />
@@ -921,6 +928,12 @@
If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
+ <method name="update_minimum_size">
+ <return type="void" />
+ <description>
+ Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member rect_min_size] directly calls this method automatically.
+ </description>
+ </method>
<method name="warp_mouse">
<return type="void" />
<argument index="0" name="to_position" type="Vector2" />
@@ -1043,7 +1056,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/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index ec7583e68b..62f8f00a82 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -20,7 +20,7 @@
</methods>
<members>
<member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array()">
- The polygon's list of vertices. Can be in either clockwise or counterclockwise order.
+ The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use [method set_point_cloud] to generate a convex hull shape from concave shape points.
</member>
</members>
</class>
diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml
index 111da858ea..9e56a41fee 100644
--- a/doc/classes/CryptoKey.xml
+++ b/doc/classes/CryptoKey.xml
@@ -14,7 +14,7 @@
<method name="is_public_only" qualifiers="const">
<return type="bool" />
<description>
- Return [code]true[/code] if this CryptoKey only has the public part, and not the private one.
+ Returns [code]true[/code] if this CryptoKey only has the public part, and not the private one.
</description>
</method>
<method name="load">
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..74450c311e 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">
@@ -34,7 +34,7 @@
<member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5">
The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS].
</member>
- <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.1" />
+ <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.1" />
<member name="use_in_sky_only" type="bool" setter="set_sky_only" getter="is_sky_only" default="false">
If [code]true[/code], this [DirectionalLight3D] will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.
</member>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index 93f04ff2a2..3f0a5610b1 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">
@@ -108,17 +108,37 @@
Returns the currently opened directory's drive index. See [method get_drive] to convert returned index to the name of the drive.
</description>
</method>
+ <method name="get_directories">
+ <return type="PackedStringArray" />
+ <description>
+ Returns a [PackedStringArray] containing filenames of the directory contents, excluding files. The array is sorted alphabetically.
+ Affected by [member include_hidden] and [member include_navigational].
+ </description>
+ </method>
<method name="get_drive">
<return type="String" />
<argument index="0" name="idx" type="int" />
<description>
- On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not exist, the method returns an empty String.
+ On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]).
+ On macOS, returns the path to the mounted volume passed as an argument.
+ On Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an argument.
+ On other platforms, or if the requested drive does not exist, the method returns an empty String.
</description>
</method>
<method name="get_drive_count">
<return type="int" />
<description>
- On Windows, returns the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0.
+ On Windows, returns the number of drives (partitions) mounted on the current filesystem.
+ On macOS, returns the number of mounted volumes.
+ On Linux, returns the number of mounted volumes and GTK 3 bookmarks.
+ On other platforms, the method returns 0.
+ </description>
+ </method>
+ <method name="get_files">
+ <return type="PackedStringArray" />
+ <description>
+ Returns a [PackedStringArray] containing filenames of the directory contents, excluding directories. The array is sorted alphabetically.
+ Affected by [member include_hidden].
</description>
</method>
<method name="get_next">
@@ -136,12 +156,10 @@
</method>
<method name="list_dir_begin">
<return type="int" enum="Error" />
- <argument index="0" name="show_navigational" type="bool" default="false" />
- <argument index="1" name="show_hidden" type="bool" default="false" />
<description>
Initializes the stream used to list all files and directories using the [method get_next] function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].
- If [code]show_navigational[/code] is [code]true[/code], [code].[/code] and [code]..[/code] are included too.
- If [code]show_hidden[/code] is [code]true[/code], hidden files are included too.
+ Affected by [member include_hidden] and [member include_navigational].
+ [b]Note:[/b] The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use [method get_files] or [method get_directories].
</description>
</method>
<method name="list_dir_end">
@@ -192,4 +210,14 @@
</description>
</method>
</methods>
+ <members>
+ <member name="include_hidden" type="bool" setter="set_include_hidden" getter="get_include_hidden" default="false">
+ If [code]true[/code], hidden files are included when the navigating directory.
+ Affects [method list_dir_begin], [method get_directories] and [method get_files].
+ </member>
+ <member name="include_navigational" type="bool" setter="set_include_navigational" getter="get_include_navigational" default="false">
+ If [code]true[/code], [code].[/code] and [code]..[/code] are included when navigating the directory.
+ Affects [method list_dir_begin] and [method get_directories].
+ </member>
+ </members>
</class>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 92d6a220d2..a41875385c 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -392,7 +392,7 @@
<method name="screen_get_max_scale" qualifiers="const">
<return type="float" />
<description>
- Return the greatest scale factor of all screens.
+ Returns the greatest scale factor of all screens.
[b]Note:[/b] On macOS returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases.
[b]Note:[/b] This method is implemented on macOS.
</description>
@@ -413,7 +413,7 @@
<return type="float" />
<argument index="0" name="screen" type="int" default="-1" />
<description>
- Return the scale factor of the specified screen by index.
+ Returns the scale factor of the specified screen by index.
[b]Note:[/b] On macOS returned value is [code]2.0[/code] for hiDPI (Retina) screen, and [code]1.0[/code] for all other cases.
[b]Note:[/b] This method is implemented on macOS.
</description>
@@ -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/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml
index 01b8593f89..28f51228ca 100644
--- a/doc/classes/EditorCommandPalette.xml
+++ b/doc/classes/EditorCommandPalette.xml
@@ -49,6 +49,6 @@
</method>
</methods>
<members>
- <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
+ <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
</members>
</class>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 3830bfc60e..9c01921df1 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -96,12 +96,22 @@
Adds a static lib from the given [code]path[/code] to the iOS project.
</description>
</method>
+ <method name="add_osx_plugin_file">
+ <return type="void" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ Adds file or directory matching [code]path[/code] to [code]PlugIns[/code] directory of macOS app bundle.
+ [b]Note:[/b] This is useful only for macOS exports.
+ </description>
+ </method>
<method name="add_shared_object">
<return type="void" />
<argument index="0" name="path" type="String" />
<argument index="1" name="tags" type="PackedStringArray" />
<description>
- Adds a shared object with the given [code]tags[/code] and destination [code]path[/code].
+ Adds a shared object or a directory containing only shared objects with the given [code]tags[/code] and destination [code]path[/code].
+ [b]Note:[/b] In case of macOS exports, those shared objects will be added to [code]Frameworks[/code] directory of app bundle.
+ In case of a directory code-sign will error if you place non code object in directory.
</description>
</method>
<method name="skip">
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 79758281ac..1d2146348a 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -49,7 +49,7 @@
<member name="current_path" type="String" setter="set_current_path" getter="get_current_path" default="&quot;res://&quot;">
The file system path in the address bar.
</member>
- <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
+ <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
<member name="disable_overwrite_warning" type="bool" setter="set_disable_overwrite_warning" getter="is_overwrite_warning_disabled" default="false">
If [code]true[/code], the [EditorFileDialog] will not warn the user before overwriting files.
</member>
@@ -62,7 +62,7 @@
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog].
</member>
- <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
+ <member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Save a File&quot;" />
</members>
<signals>
<signal name="dir_selected">
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index 28f4c65384..50c227dc0a 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -111,7 +111,7 @@
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">
@@ -163,7 +163,7 @@
}
[/csharp]
[/codeblocks]
- Return [code]true[/code] to make all options always visible.
+ Returns [code]true[/code] to make all options always visible.
</description>
</method>
<method name="_get_preset_count" qualifiers="virtual const">
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index 0c47298180..39589138fa 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -10,7 +10,7 @@
<tutorials>
</tutorials>
<members>
- <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false" />
+ <member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" />
</members>
<signals>
<signal name="object_id_selected">
@@ -33,6 +33,8 @@
</signal>
<signal name="property_keyed">
<argument index="0" name="property" type="String" />
+ <argument index="1" name="value" type="Variant" />
+ <argument index="2" name="advance" type="bool" />
<description>
Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled.
</description>
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index bc5df47d57..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">
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 5790d8c5af..15d31cd0f0 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -21,7 +21,17 @@
<return type="void" />
<argument index="0" name="resource" type="Resource" />
<description>
- Edits the given [Resource].
+ Edits the given [Resource]. If the resource is a [Script] you can also edit it with [method edit_script] to specify the line and column position.
+ </description>
+ </method>
+ <method name="edit_script">
+ <return type="void" />
+ <argument index="0" name="script" type="Script" />
+ <argument index="1" name="line" type="int" default="-1" />
+ <argument index="2" name="column" type="int" default="0" />
+ <argument index="3" name="grab_focus" type="bool" default="true" />
+ <description>
+ Edits the given [Script]. The line and column on which to open the script can also be specified. The script will be open with the user-configured editor for the script's language which may be an external editor.
</description>
</method>
<method name="get_base_control">
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index c804bb70e0..60c329935a 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -135,7 +135,7 @@
</method>
<method name="add_mesh">
<return type="void" />
- <argument index="0" name="mesh" type="ArrayMesh" />
+ <argument index="0" name="mesh" type="Mesh" />
<argument index="1" name="material" type="Material" default="null" />
<argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" />
<argument index="3" name="skeleton" type="SkinReference" default="null" />
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/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
index b26b6f9527..f374b5f425 100644
--- a/doc/classes/EditorResourcePicker.xml
+++ b/doc/classes/EditorResourcePicker.xml
@@ -11,7 +11,7 @@
</tutorials>
<methods>
<method name="_handle_menu_selected" qualifiers="virtual">
- <return type="void" />
+ <return type="bool" />
<argument index="0" name="id" type="int" />
<description>
This virtual method can be implemented to handle context menu items not handled by default. See [method _set_create_options].
diff --git a/doc/classes/EditorSceneFormatImporter.xml b/doc/classes/EditorSceneFormatImporter.xml
index 5b5d6c4598..63f4cde5f3 100644
--- a/doc/classes/EditorSceneFormatImporter.xml
+++ b/doc/classes/EditorSceneFormatImporter.xml
@@ -37,7 +37,8 @@
<return type="Animation" />
<argument index="0" name="path" type="String" />
<argument index="1" name="flags" type="int" />
- <argument index="2" name="bake_fps" type="int" />
+ <argument index="2" name="options" type="Dictionary" />
+ <argument index="3" name="bake_fps" type="int" />
<description>
</description>
</method>
@@ -45,23 +46,8 @@
<return type="Object" />
<argument index="0" name="path" type="String" />
<argument index="1" name="flags" type="int" />
- <argument index="2" name="bake_fps" type="int" />
- <description>
- </description>
- </method>
- <method name="import_animation_from_other_importer">
- <return type="Animation" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="flags" type="int" />
- <argument index="2" name="bake_fps" type="int" />
- <description>
- </description>
- </method>
- <method name="import_scene_from_other_importer">
- <return type="Node" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="flags" type="int" />
- <argument index="2" name="bake_fps" type="int" />
+ <argument index="2" name="options" type="Dictionary" />
+ <argument index="3" name="bake_fps" type="int" />
<description>
</description>
</method>
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/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 9341b514c7..9636c33565 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -11,7 +11,7 @@
<members>
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="label" type="String" setter="set_label" getter="get_label" default="&quot;&quot;">
</member>
<member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false">
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index f05a216301..d0c4d28c55 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>
@@ -187,7 +187,8 @@
[b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code].
</member>
<member name="physics_ticks_per_second" type="int" setter="set_physics_ticks_per_second" getter="get_physics_ticks_per_second" default="60">
- The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage. See also [member target_fps].
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [member target_fps] and [member ProjectSettings.physics/common/physics_ticks_per_second].
+ [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS.
</member>
<member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true">
If [code]false[/code], stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting.
@@ -195,7 +196,7 @@
[b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor.
</member>
<member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0">
- The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. See also [member physics_ticks_per_second].
+ The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. See also [member physics_ticks_per_second] and [member ProjectSettings.debug/settings/fps/force_fps].
</member>
<member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0">
Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed.
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 4ea7f67eed..2090672acc 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">
@@ -237,7 +238,22 @@
The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality.
</member>
<member name="ssao_sharpness" type="float" setter="set_ssao_sharpness" getter="get_ssao_sharpness" default="0.98">
- Sharpness refers to the amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
+ The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
+ </member>
+ <member name="ssil_enabled" type="bool" setter="set_ssil_enabled" getter="is_ssil_enabled" default="false">
+ If [code]true[/code], the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or [VoxelGI]. Screen-space indirect lighting is not affected by individual light's [member Light3D.light_indirect_energy].
+ </member>
+ <member name="ssil_intensity" type="float" setter="set_ssil_intensity" getter="get_ssil_intensity" default="1.0">
+ The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light.
+ </member>
+ <member name="ssil_normal_rejection" type="float" setter="set_ssil_normal_rejection" getter="get_ssil_normal_rejection" default="1.0">
+ Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera.
+ </member>
+ <member name="ssil_radius" type="float" setter="set_ssil_radius" getter="get_ssil_radius" default="5.0">
+ The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources.
+ </member>
+ <member name="ssil_sharpness" type="float" setter="set_ssil_sharpness" getter="get_ssil_sharpness" default="0.98">
+ The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
</member>
<member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0">
The default exposure used for tonemapping.
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 811aeb8aab..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>
@@ -417,6 +417,7 @@
<argument index="0" name="string" type="String" />
<description>
Appends [code]string[/code] to the file without a line return, encoding the text as UTF-8.
+ [b]Note:[/b] This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using [method store_pascal_string] instead. For retrieving strings from a text file, you can use [code]get_buffer(length).get_string_from_utf8()[/code] (if you know the length) or [method get_as_text].
</description>
</method>
<method name="store_var">
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index fa43f97104..1207288159 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -63,7 +63,7 @@
<member name="current_path" type="String" setter="set_current_path" getter="get_current_path" default="&quot;res://&quot;">
The currently selected file path of the file dialog.
</member>
- <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
+ <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
<member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="FileDialog.FileMode" default="4">
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode].
</member>
@@ -76,7 +76,7 @@
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
If [code]true[/code], the dialog will show hidden files.
</member>
- <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
+ <member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Save a File&quot;" />
</members>
<signals>
<signal name="dir_selected">
@@ -125,24 +125,24 @@
</constant>
</constants>
<theme_items>
- <theme_item name="back_folder" data_type="icon" type="Texture2D">
- Custom icon for the back arrow.
- </theme_item>
- <theme_item name="file" data_type="icon" type="Texture2D">
- Custom icon for files.
- </theme_item>
<theme_item name="file_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color modulation applied to the file icon.
</theme_item>
<theme_item name="files_disabled" data_type="color" type="Color" default="Color(0, 0, 0, 0.7)">
The color tint for disabled files (when the [FileDialog] is used in open folder mode).
</theme_item>
- <theme_item name="folder" data_type="icon" type="Texture2D">
- Custom icon for folders.
- </theme_item>
<theme_item name="folder_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color modulation applied to the folder icon.
</theme_item>
+ <theme_item name="back_folder" data_type="icon" type="Texture2D">
+ Custom icon for the back arrow.
+ </theme_item>
+ <theme_item name="file" data_type="icon" type="Texture2D">
+ Custom icon for files.
+ </theme_item>
+ <theme_item name="folder" data_type="icon" type="Texture2D">
+ Custom icon for folders.
+ </theme_item>
<theme_item name="forward_folder" data_type="icon" type="Texture2D">
Custom icon for the forward arrow.
</theme_item>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 01bc2837f1..3537fc0b66 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -96,7 +96,7 @@
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="text" type="String" />
- <argument index="3" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="max_lines" type="int" default="-1" />
<argument index="6" name="size" type="int" default="16" />
@@ -114,7 +114,7 @@
<argument index="0" name="canvas_item" type="RID" />
<argument index="1" name="pos" type="Vector2" />
<argument index="2" name="text" type="String" />
- <argument index="3" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="4" name="width" type="float" default="-1" />
<argument index="5" name="size" type="int" default="16" />
<argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
@@ -202,7 +202,7 @@
<return type="Vector2" />
<argument index="0" name="text" type="String" />
<argument index="1" name="size" type="int" default="16" />
- <argument index="2" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="2" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
<argument index="3" name="width" type="float" default="-1" />
<argument index="4" name="flags" type="int" default="3" />
<description>
@@ -222,7 +222,7 @@
<return type="float" />
<argument index="0" name="size" type="int" default="16" />
<description>
- Return average pixel offset of the underline below the baseline.
+ Returns average pixel offset of the underline below the baseline.
[b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
</description>
</method>
@@ -230,7 +230,7 @@
<return type="float" />
<argument index="0" name="size" type="int" default="16" />
<description>
- Return average thickness of the underline.
+ Returns average thickness of the underline.
[b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
</description>
</method>
@@ -238,7 +238,7 @@
<return type="bool" />
<argument index="0" name="char" type="int" />
<description>
- Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
+ Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
<method name="remove_data">
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index ccfe861c92..0c8386784e 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>
@@ -253,7 +259,7 @@
<return type="Array" />
<argument index="0" name="cache_index" type="int" />
<description>
- Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
<method name="get_spacing" qualifiers="const">
@@ -337,7 +343,7 @@
<return type="bool" />
<argument index="0" name="char" type="int" />
<description>
- Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
+ Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
<method name="is_antialiased" qualifiers="const">
@@ -349,7 +355,7 @@
<method name="is_force_autohinter" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
+ Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="is_language_supported" qualifiers="const">
@@ -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" />
@@ -506,7 +519,7 @@
<return type="void" />
<argument index="0" name="force_autohinter" type="bool" />
<description>
- If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
<method name="set_glyph_advance">
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/GPUParticlesAttractorBox.xml b/doc/classes/GPUParticlesAttractorBox3D.xml
index 93fdc45e56..0795e11b16 100644
--- a/doc/classes/GPUParticlesAttractorBox.xml
+++ b/doc/classes/GPUParticlesAttractorBox3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesAttractorBox" inherits="GPUParticlesAttractor3D" version="4.0">
+<class name="GPUParticlesAttractorBox3D" inherits="GPUParticlesAttractor3D" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesAttractorSphere.xml b/doc/classes/GPUParticlesAttractorSphere3D.xml
index 4398de55e9..590c966d70 100644
--- a/doc/classes/GPUParticlesAttractorSphere.xml
+++ b/doc/classes/GPUParticlesAttractorSphere3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesAttractorSphere" inherits="GPUParticlesAttractor3D" version="4.0">
+<class name="GPUParticlesAttractorSphere3D" inherits="GPUParticlesAttractor3D" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesAttractorVectorField.xml b/doc/classes/GPUParticlesAttractorVectorField3D.xml
index e164343528..d0dbf886f6 100644
--- a/doc/classes/GPUParticlesAttractorVectorField.xml
+++ b/doc/classes/GPUParticlesAttractorVectorField3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesAttractorVectorField" inherits="GPUParticlesAttractor3D" version="4.0">
+<class name="GPUParticlesAttractorVectorField3D" inherits="GPUParticlesAttractor3D" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesCollisionBox.xml b/doc/classes/GPUParticlesCollisionBox3D.xml
index d2bf4ef538..e899637206 100644
--- a/doc/classes/GPUParticlesCollisionBox.xml
+++ b/doc/classes/GPUParticlesCollisionBox3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesCollisionBox" inherits="GPUParticlesCollision3D" version="4.0">
+<class name="GPUParticlesCollisionBox3D" inherits="GPUParticlesCollision3D" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GPUParticlesCollisionHeightField.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml
index 99b2ad3ce0..801120d911 100644
--- a/doc/classes/GPUParticlesCollisionHeightField.xml
+++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesCollisionHeightField" inherits="GPUParticlesCollision3D" version="4.0">
+<class name="GPUParticlesCollisionHeightField3D" inherits="GPUParticlesCollision3D" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -13,9 +13,9 @@
</member>
<member name="follow_camera_push_ratio" type="float" setter="set_follow_camera_push_ratio" getter="get_follow_camera_push_ratio" default="0.1">
</member>
- <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField.Resolution" default="2">
+ <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField3D.Resolution" default="2">
</member>
- <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField.UpdateMode" default="0">
+ <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField3D.UpdateMode" default="0">
</member>
</members>
<constants>
diff --git a/doc/classes/GPUParticlesCollisionSDF.xml b/doc/classes/GPUParticlesCollisionSDF3D.xml
index 8d798a9d28..9e86d16eef 100644
--- a/doc/classes/GPUParticlesCollisionSDF.xml
+++ b/doc/classes/GPUParticlesCollisionSDF3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesCollisionSDF" inherits="GPUParticlesCollision3D" version="4.0">
+<class name="GPUParticlesCollisionSDF3D" inherits="GPUParticlesCollision3D" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -9,7 +9,7 @@
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
- <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF.Resolution" default="2">
+ <member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF3D.Resolution" default="2">
</member>
<member name="texture" type="Texture3D" setter="set_texture" getter="get_texture">
</member>
diff --git a/doc/classes/GPUParticlesCollisionSphere.xml b/doc/classes/GPUParticlesCollisionSphere3D.xml
index ddb2391fd9..82728f853b 100644
--- a/doc/classes/GPUParticlesCollisionSphere.xml
+++ b/doc/classes/GPUParticlesCollisionSphere3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GPUParticlesCollisionSphere" inherits="GPUParticlesCollision3D" version="4.0">
+<class name="GPUParticlesCollisionSphere3D" inherits="GPUParticlesCollision3D" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index 0a2c0fbe81..cecd1e518f 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -38,13 +38,19 @@
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>
<member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0">
</member>
+ <member name="material_overlay" type="Material" setter="set_material_overlay" getter="get_material_overlay">
+ The material overlay for the whole geometry.
+ If a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces.
+ </member>
<member name="material_override" type="Material" setter="set_material_override" getter="get_material_override">
The material override for the whole geometry.
If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
@@ -57,12 +63,14 @@
</member>
<member name="visibility_range_begin_margin" type="float" setter="set_visibility_range_begin_margin" getter="get_visibility_range_begin_margin" default="0.0">
Margin for the [member visibility_range_begin] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_begin] threshold by this amount.
+ If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as an hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than [code]0.0[/code] for the effect to be noticeable.
</member>
<member name="visibility_range_end" type="float" setter="set_visibility_range_end" getter="get_visibility_range_end" default="0.0">
Distance from which the GeometryInstance3D will be hidden, taking [member visibility_range_end_margin] into account as well. The default value of 0 is used to disable the range check.
</member>
<member name="visibility_range_end_margin" type="float" setter="set_visibility_range_end_margin" getter="get_visibility_range_end_margin" default="0.0">
Margin for the [member visibility_range_end] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_end] threshold by this amount.
+ If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as an hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than [code]0.0[/code] for the effect to be noticeable.
</member>
<member name="visibility_range_fade_mode" type="int" setter="set_visibility_range_fade_mode" getter="get_visibility_range_fade_mode" enum="GeometryInstance3D.VisibilityRangeFadeMode" default="0">
Controls which instances will be faded when approaching the limits of the visibility range. See [enum VisibilityRangeFadeMode] for possible values.
@@ -70,7 +78,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,29 +93,37 @@
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.
+ Will not fade itself nor its visibility dependencies, hysteresis will be used instead. This is the fastest approach to manual LOD, but it can result in noticeable LOD transitions depending on how the LOD meshes are authored. See [member visibility_range_begin] and [member Node3D.visibility_parent] for more information.
</constant>
<constant name="VISIBILITY_RANGE_FADE_SELF" value="1" enum="VisibilityRangeFadeMode">
- Will fade-out itself when reaching the limits of its own visibility range. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
+ Will fade-out itself when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
</constant>
<constant name="VISIBILITY_RANGE_FADE_DEPENDENCIES" value="2" enum="VisibilityRangeFadeMode">
- Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
+ Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
</constant>
</constants>
</class>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 673bf19122..46960d7cc4 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -18,6 +18,43 @@
Virtual method which can be overridden to customize how connections are drawn.
</description>
</method>
+ <method name="_is_in_input_hotzone" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="graph_node" type="Object" />
+ <argument index="1" name="slot_index" type="int" />
+ <argument index="2" name="mouse_position" type="Vector2" />
+ <description>
+ Returns whether the [code]mouse_position[/code] is in the input hot zone.
+ By default, a hot zone is a [Rect2] positioned such that its center is at [code]graph_node[/code].[method GraphNode.get_connection_input_position]([code]slot_index[/code]) (For output's case, call [method GraphNode.get_connection_output_position] instead). The hot zone's width is twice the Theme Property [code]port_grab_distance_horizontal[/code], and its height is twice the [code]port_grab_distance_vertical[/code].
+ Below is a sample code to help get started:
+ [codeblock]
+ func _is_in_input_hotzone(graph_node, slot_index, mouse_position):
+ var slot_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
+ var slot_pos : Vector2 = graph_node.get_position() + graph_node.get_connection_input_position(slot_index) - slot_size / 2
+ var rect = Rect2(slot_pos, slot_size)
+
+ return rect.has_point(mouse_position)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="_is_in_output_hotzone" qualifiers="virtual">
+ <return type="bool" />
+ <argument index="0" name="graph_node" type="Object" />
+ <argument index="1" name="slot_index" type="int" />
+ <argument index="2" name="mouse_position" type="Vector2" />
+ <description>
+ Returns whether the [code]mouse_position[/code] is in the output hot zone. For more information on hot zones, see [method _is_in_input_hotzone].
+ Below is a sample code to help get started:
+ [codeblock]
+ func _is_in_output_hotzone(graph_node, slot_index, mouse_position):
+ var slot_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
+ var slot_pos : Vector2 = graph_node.get_position() + graph_node.get_connection_output_position(slot_index) - slot_size / 2
+ var rect = Rect2(slot_pos, slot_size)
+
+ return rect.has_point(mouse_position)
+ [/codeblock]
+ </description>
+ </method>
<method name="add_valid_connection_type">
<return type="void" />
<argument index="0" name="from_type" type="int" />
@@ -72,6 +109,14 @@
Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed.
</description>
</method>
+ <method name="force_connection_drag_end">
+ <return type="void" />
+ <description>
+ Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor.
+ This is best used together with [signal connection_drag_started] and [signal connection_drag_ended] to add custom behavior like node addition through shortcuts.
+ [b]Note:[/b] This method suppresses any other connection request signals apart from [signal connection_drag_ended].
+ </description>
+ </method>
<method name="get_connection_line">
<return type="PackedVector2Array" />
<argument index="0" name="from" type="Vector2" />
@@ -141,7 +186,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">
@@ -159,7 +204,7 @@
<member name="connection_lines_thickness" type="float" setter="set_connection_lines_thickness" getter="get_connection_lines_thickness" default="2.0">
The thickness of the lines between the nodes.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="minimap_enabled" type="bool" setter="set_minimap_enabled" getter="is_minimap_enabled" default="true">
If [code]true[/code], the minimap is visible.
</member>
@@ -169,7 +214,7 @@
<member name="minimap_size" type="Vector2" setter="set_minimap_size" getter="get_minimap_size" default="Vector2(240, 160)">
The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle.
</member>
- <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
+ <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<member name="right_disconnects" type="bool" setter="set_right_disconnects" getter="is_right_disconnects_enabled" default="false">
If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end.
</member>
@@ -204,6 +249,19 @@
Emitted at the beginning of a GraphNode movement.
</description>
</signal>
+ <signal name="connection_drag_ended">
+ <description>
+ Emitted at the end of a connection drag.
+ </description>
+ </signal>
+ <signal name="connection_drag_started">
+ <argument index="0" name="from" type="String" />
+ <argument index="1" name="slot" type="String" />
+ <argument index="2" name="is_output" type="bool" />
+ <description>
+ Emitted at the beginning of a connection drag.
+ </description>
+ </signal>
<signal name="connection_from_empty">
<argument index="0" name="to" type="StringName" />
<argument index="1" name="to_slot" type="int" />
@@ -290,28 +348,21 @@
<theme_items>
<theme_item name="activity" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
</theme_item>
- <theme_item name="bezier_len_neg" data_type="constant" type="int" default="160">
- </theme_item>
- <theme_item name="bezier_len_pos" data_type="constant" type="int" default="80">
- </theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
- The background drawn under the grid.
- </theme_item>
<theme_item name="grid_major" data_type="color" type="Color" default="Color(1, 1, 1, 0.2)">
Color of major grid lines.
</theme_item>
<theme_item name="grid_minor" data_type="color" type="Color" default="Color(1, 1, 1, 0.05)">
Color of minor grid lines.
</theme_item>
- <theme_item name="layout" data_type="icon" type="Texture2D">
+ <theme_item name="selection_fill" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)">
+ The fill color of the selection rectangle.
</theme_item>
- <theme_item name="minimap" data_type="icon" type="Texture2D">
+ <theme_item name="selection_stroke" data_type="color" type="Color" default="Color(1, 1, 1, 0.8)">
+ The outline color of the selection rectangle.
</theme_item>
- <theme_item name="minus" data_type="icon" type="Texture2D">
- The icon for the zoom out button.
+ <theme_item name="bezier_len_neg" data_type="constant" type="int" default="160">
</theme_item>
- <theme_item name="more" data_type="icon" type="Texture2D">
- The icon for the zoom in button.
+ <theme_item name="bezier_len_pos" data_type="constant" type="int" default="80">
</theme_item>
<theme_item name="port_grab_distance_horizontal" data_type="constant" type="int" default="24">
The horizontal range within which a port can be grabbed (on both sides).
@@ -319,17 +370,24 @@
<theme_item name="port_grab_distance_vertical" data_type="constant" type="int" default="6">
The vertical range within which a port can be grabbed (on both sides).
</theme_item>
- <theme_item name="reset" data_type="icon" type="Texture2D">
- The icon for the zoom reset button.
+ <theme_item name="layout" data_type="icon" type="Texture2D">
</theme_item>
- <theme_item name="selection_fill" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)">
- The fill color of the selection rectangle.
+ <theme_item name="minimap" data_type="icon" type="Texture2D">
</theme_item>
- <theme_item name="selection_stroke" data_type="color" type="Color" default="Color(1, 1, 1, 0.8)">
- The outline color of the selection rectangle.
+ <theme_item name="minus" data_type="icon" type="Texture2D">
+ The icon for the zoom out button.
+ </theme_item>
+ <theme_item name="more" data_type="icon" type="Texture2D">
+ The icon for the zoom in button.
+ </theme_item>
+ <theme_item name="reset" data_type="icon" type="Texture2D">
+ The icon for the zoom reset button.
</theme_item>
<theme_item name="snap" data_type="icon" type="Texture2D">
The icon for the snap toggle button.
</theme_item>
+ <theme_item name="bg" data_type="style" type="StyleBox">
+ The background drawn under the grid.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index ff6271d2aa..d5780dce2d 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -218,7 +218,7 @@
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="0" />
<member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay" default="0">
Sets the overlay shown above the GraphNode. See [enum Overlay].
</member>
@@ -285,25 +285,49 @@
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>
- <theme_item name="breakpoint" data_type="style" type="StyleBox">
- The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT].
- </theme_item>
- <theme_item name="close" data_type="icon" type="Texture2D">
- The icon for the close button, visible when [member show_close] is enabled.
- </theme_item>
<theme_item name="close_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The color modulation applied to the close button icon.
</theme_item>
+ <theme_item name="resizer_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ The color modulation applied to the resizer icon.
+ </theme_item>
+ <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ Color of the title text.
+ </theme_item>
<theme_item name="close_offset" data_type="constant" type="int" default="18">
The vertical offset of the close button.
</theme_item>
+ <theme_item name="port_offset" data_type="constant" type="int" default="3">
+ Horizontal offset for the ports.
+ </theme_item>
+ <theme_item name="separation" data_type="constant" type="int" default="1">
+ The vertical distance between ports.
+ </theme_item>
+ <theme_item name="title_offset" data_type="constant" type="int" default="20">
+ Vertical offset of the title text.
+ </theme_item>
+ <theme_item name="title_font" data_type="font" type="Font">
+ Font used for the title text.
+ </theme_item>
+ <theme_item name="close" data_type="icon" type="Texture2D">
+ The icon for the close button, visible when [member show_close] is enabled.
+ </theme_item>
+ <theme_item name="port" data_type="icon" type="Texture2D">
+ The icon used for representing ports.
+ </theme_item>
+ <theme_item name="resizer" data_type="icon" type="Texture2D">
+ The icon used for resizer, visible when [member resizable] is enabled.
+ </theme_item>
+ <theme_item name="breakpoint" data_type="style" type="StyleBox">
+ The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT].
+ </theme_item>
<theme_item name="comment" data_type="style" type="StyleBox">
The [StyleBox] used when [member comment] is enabled.
</theme_item>
@@ -317,35 +341,11 @@
<theme_item name="frame" data_type="style" type="StyleBox">
The default background for [GraphNode].
</theme_item>
- <theme_item name="port" data_type="icon" type="Texture2D">
- The icon used for representing ports.
- </theme_item>
- <theme_item name="port_offset" data_type="constant" type="int" default="3">
- Horizontal offset for the ports.
- </theme_item>
<theme_item name="position" data_type="style" type="StyleBox">
The background used when [member overlay] is set to [constant OVERLAY_POSITION].
</theme_item>
- <theme_item name="resizer" data_type="icon" type="Texture2D">
- The icon used for resizer, visible when [member resizable] is enabled.
- </theme_item>
- <theme_item name="resizer_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
- The color modulation applied to the resizer icon.
- </theme_item>
<theme_item name="selectedframe" data_type="style" type="StyleBox">
The background used when the [GraphNode] is selected.
</theme_item>
- <theme_item name="separation" data_type="constant" type="int" default="1">
- The vertical distance between ports.
- </theme_item>
- <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
- Color of the title text.
- </theme_item>
- <theme_item name="title_font" data_type="font" type="Font">
- Font used for the title text.
- </theme_item>
- <theme_item name="title_offset" data_type="constant" type="int" default="20">
- Vertical offset of the title text.
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml
index 69ad194fe0..0b2d65d339 100644
--- a/doc/classes/HMACContext.xml
+++ b/doc/classes/HMACContext.xml
@@ -5,52 +5,52 @@
</brief_description>
<description>
The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once.
- [codeblocks]
- [gdscript]
- extends Node
- var ctx = HMACContext.new()
+ [codeblocks]
+ [gdscript]
+ extends Node
+ var ctx = HMACContext.new()
- func _ready():
- var key = "supersecret".to_utf8()
- var err = ctx.start(HashingContext.HASH_SHA256, key)
- assert(err == OK)
- var msg1 = "this is ".to_utf8()
- var msg2 = "vewy vewy secret".to_utf8()
- err = ctx.update(msg1)
- assert(err == OK)
- err = ctx.update(msg2)
- assert(err == OK)
- var hmac = ctx.finish()
- print(hmac.hex_encode())
+ func _ready():
+ var key = "supersecret".to_utf8()
+ var err = ctx.start(HashingContext.HASH_SHA256, key)
+ assert(err == OK)
+ var msg1 = "this is ".to_utf8()
+ var msg2 = "super duper secret".to_utf8()
+ err = ctx.update(msg1)
+ assert(err == OK)
+ err = ctx.update(msg2)
+ assert(err == OK)
+ var hmac = ctx.finish()
+ print(hmac.hex_encode())
- [/gdscript]
- [csharp]
- using Godot;
- using System;
- using System.Diagnostics;
+ [/gdscript]
+ [csharp]
+ using Godot;
+ using System;
+ using System.Diagnostics;
- public class CryptoNode : Node
- {
- private HMACContext ctx = new HMACContext();
- public override void _Ready()
- {
- PackedByteArray key = String("supersecret").to_utf8();
- Error err = ctx.Start(HashingContext.HASH_SHA256, key);
- GD.Assert(err == OK);
- PackedByteArray msg1 = String("this is ").to_utf8();
- PackedByteArray msg2 = String("vewy vew secret").to_utf8();
- err = ctx.Update(msg1);
- GD.Assert(err == OK);
- err = ctx.Update(msg2);
- GD.Assert(err == OK);
- PackedByteArray hmac = ctx.Finish();
- GD.Print(hmac.HexEncode());
- }
- }
+ public class CryptoNode : Node
+ {
+ private HMACContext ctx = new HMACContext();
+ public override void _Ready()
+ {
+ PackedByteArray key = String("supersecret").to_utf8();
+ Error err = ctx.Start(HashingContext.HASH_SHA256, key);
+ GD.Assert(err == OK);
+ PackedByteArray msg1 = String("this is ").to_utf8();
+ PackedByteArray msg2 = String("super duper secret").to_utf8();
+ err = ctx.Update(msg1);
+ GD.Assert(err == OK);
+ err = ctx.Update(msg2);
+ GD.Assert(err == OK);
+ PackedByteArray hmac = ctx.Finish();
+ GD.Print(hmac.HexEncode());
+ }
+ }
- [/csharp]
- [/codeblocks]
- [b]Note:[/b] Not available in HTML5 exports.
+ [/csharp]
+ [/codeblocks]
+ [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml
index fa9961710f..3197abcc3f 100644
--- a/doc/classes/HScrollBar.xml
+++ b/doc/classes/HScrollBar.xml
@@ -18,15 +18,6 @@
<theme_item name="decrement_pressed" data_type="icon" type="Texture2D">
Displayed when the decrement button is being pressed.
</theme_item>
- <theme_item name="grabber" data_type="style" type="StyleBox">
- Used as texture for the grabber, the draggable element representing current scroll.
- </theme_item>
- <theme_item name="grabber_highlight" data_type="style" type="StyleBox">
- Used when the mouse hovers over the grabber.
- </theme_item>
- <theme_item name="grabber_pressed" data_type="style" type="StyleBox">
- Used when the grabber is being dragged.
- </theme_item>
<theme_item name="increment" data_type="icon" type="Texture2D">
Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
@@ -36,6 +27,15 @@
<theme_item name="increment_pressed" data_type="icon" type="Texture2D">
Displayed when the increment button is being pressed.
</theme_item>
+ <theme_item name="grabber" data_type="style" type="StyleBox">
+ Used as texture for the grabber, the draggable element representing current scroll.
+ </theme_item>
+ <theme_item name="grabber_highlight" data_type="style" type="StyleBox">
+ Used when the mouse hovers over the grabber.
+ </theme_item>
+ <theme_item name="grabber_pressed" data_type="style" type="StyleBox">
+ Used when the grabber is being dragged.
+ </theme_item>
<theme_item name="scroll" data_type="style" type="StyleBox">
Used as background of this [ScrollBar].
</theme_item>
diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml
index fa88085a70..1b83731a32 100644
--- a/doc/classes/HSlider.xml
+++ b/doc/classes/HSlider.xml
@@ -13,22 +13,22 @@
<theme_item name="grabber" data_type="icon" type="Texture2D">
The texture for the grabber (the draggable element).
</theme_item>
- <theme_item name="grabber_area" data_type="style" type="StyleBox">
- The background of the area to the left of the grabber.
- </theme_item>
- <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
- </theme_item>
<theme_item name="grabber_disabled" data_type="icon" type="Texture2D">
The texture for the grabber when it's disabled.
</theme_item>
<theme_item name="grabber_highlight" data_type="icon" type="Texture2D">
The texture for the grabber when it's focused.
</theme_item>
- <theme_item name="slider" data_type="style" type="StyleBox">
- The background for the whole slider. Determines the height of the [code]grabber_area[/code].
- </theme_item>
<theme_item name="tick" data_type="icon" type="Texture2D">
The texture for the ticks, visible when [member Slider.tick_count] is greater than 0.
</theme_item>
+ <theme_item name="grabber_area" data_type="style" type="StyleBox">
+ The background of the area to the left of the grabber.
+ </theme_item>
+ <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
+ </theme_item>
+ <theme_item name="slider" data_type="style" type="StyleBox">
+ The background for the whole slider. Determines the height of the [code]grabber_area[/code].
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml
index 379d4cfbdb..f2c505b1bc 100644
--- a/doc/classes/HSplitContainer.xml
+++ b/doc/classes/HSplitContainer.xml
@@ -12,13 +12,13 @@
<theme_item name="autohide" data_type="constant" type="int" default="1">
Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
</theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
+ <theme_item name="separation" data_type="constant" type="int" default="12">
+ The space between sides of the container.
</theme_item>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The icon used for the grabber drawn in the middle area.
</theme_item>
- <theme_item name="separation" data_type="constant" type="int" default="12">
- The space between sides of the container.
+ <theme_item name="bg" data_type="style" type="StyleBox">
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 9f33c400f4..e15b065744 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">
@@ -173,6 +173,24 @@
Sends the body data raw, as a byte array and does not encode it in any way.
</description>
</method>
+ <method name="set_http_proxy">
+ <return type="void" />
+ <argument index="0" name="host" type="String" />
+ <argument index="1" name="port" type="int" />
+ <description>
+ Sets the proxy server for HTTP requests.
+ The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ </description>
+ </method>
+ <method name="set_https_proxy">
+ <return type="void" />
+ <argument index="0" name="host" type="String" />
+ <argument index="1" name="port" type="int" />
+ <description>
+ Sets the proxy server for HTTPS requests.
+ The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ </description>
+ </method>
</methods>
<members>
<member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled" default="false">
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 558e51aefe..c92f751c60 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">
@@ -208,6 +208,24 @@
Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host.
</description>
</method>
+ <method name="set_http_proxy">
+ <return type="void" />
+ <argument index="0" name="host" type="String" />
+ <argument index="1" name="port" type="int" />
+ <description>
+ Sets the proxy server for HTTP requests.
+ The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ </description>
+ </method>
+ <method name="set_https_proxy">
+ <return type="void" />
+ <argument index="0" name="host" type="String" />
+ <argument index="1" name="port" type="int" />
+ <description>
+ Sets the proxy server for HTTPS requests.
+ The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ </description>
+ </method>
</methods>
<members>
<member name="accept_gzip" type="bool" setter="set_accept_gzip" getter="is_accepting_gzip" default="true">
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 492bddca1f..29feb107d4 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/tutorials/assets_pipeline/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 684207e9bd..4939e48e97 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>
@@ -187,6 +187,7 @@
Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button.
This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed.
If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ [b]Note:[/b] Due to keyboard ghosting, [method is_action_just_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="is_action_just_released" qualifiers="const">
@@ -205,6 +206,7 @@
<description>
Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed.
If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ [b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="is_joy_button_pressed" qualifiers="const">
@@ -227,6 +229,8 @@
<argument index="0" name="keycode" type="int" enum="Key" />
<description>
Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum Key] constant.
+ [method is_key_pressed] is only recommended over [method is_physical_key_pressed] in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use [method is_physical_key_pressed].
+ [b]Note:[/b] Due to keyboard ghosting, [method is_key_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="is_mouse_button_pressed" qualifiers="const">
@@ -236,15 +240,13 @@
Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton].
</description>
</method>
- <method name="joy_connection_changed">
- <return type="void" />
- <argument index="0" name="device" type="int" />
- <argument index="1" name="connected" type="bool" />
- <argument index="2" name="name" type="String" />
- <argument index="3" name="guid" type="String" />
+ <method name="is_physical_key_pressed" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="keycode" type="int" enum="Key" />
<description>
- Notifies the [Input] singleton that a connection has changed, to update the state for the [code]device[/code] index.
- This is used internally and should not have to be called from user scripts. See [signal joy_connection_changed] for the signal emitted when this is triggered internally.
+ 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.
+ [method is_physical_key_pressed] is recommended over [method is_key_pressed] for in-game actions, as it will make [kbd]W[/kbd]/[kbd]A[/kbd]/[kbd]S[/kbd]/[kbd]D[/kbd] layouts work regardless of the user's keyboard layout. [method is_physical_key_pressed] will also ensure that the top row number keys work on any keyboard layout. If in doubt, use [method is_physical_key_pressed].
+ [b]Note:[/b] Due to keyboard ghosting, [method is_physical_key_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="parse_input_event">
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 9dc8fbeffa..6b7c43c373 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>
@@ -53,6 +53,7 @@
<description>
Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [code]allow_echo[/code] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ [b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="is_action_released" qualifiers="const">
@@ -89,6 +90,7 @@
<return type="bool" />
<description>
Returns [code]true[/code] if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
+ [b]Note:[/b] Due to keyboard ghosting, [method is_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="xformed_by" qualifiers="const">
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 0353c5f0e0..8044bf5b99 100644
--- a/doc/classes/InputEventKey.xml
+++ b/doc/classes/InputEventKey.xml
@@ -7,7 +7,7 @@
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">
diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml
index 040eee7b98..1e41d09ac0 100644
--- a/doc/classes/InputEventMIDI.xml
+++ b/doc/classes/InputEventMIDI.xml
@@ -1,27 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="InputEventMIDI" inherits="InputEvent" version="4.0">
<brief_description>
+ Input event for MIDI inputs.
</brief_description>
<description>
+ InputEventMIDI allows receiving input events from MIDI devices such as a piano. MIDI stands for Musical Instrument Digital Interface.
+ MIDI signals can be sent over a 5-pin MIDI connector or over USB, if your device supports both be sure to check the settings in the device to see which output it's using.
+ To receive input events from MIDI devices, you need to call [method OS.open_midi_inputs]. You can check which devices are detected using [method OS.get_connected_midi_inputs].
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ OS.open_midi_inputs()
+ print(OS.get_connected_midi_inputs())
+
+ func _input(input_event):
+ if input_event is InputEventMIDI:
+ _print_midi_info(input_event)
+
+ func _print_midi_info(midi_event: InputEventMIDI):
+ print(midi_event)
+ print("Channel " + str(midi_event.channel))
+ print("Message " + str(midi_event.message))
+ print("Pitch " + str(midi_event.pitch))
+ print("Velocity " + str(midi_event.velocity))
+ print("Instrument " + str(midi_event.instrument))
+ print("Pressure " + str(midi_event.pressure))
+ print("Controller number: " + str(midi_event.controller_number))
+ print("Controller value: " + str(midi_event.controller_value))
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ OS.OpenMidiInputs();
+ GD.Print(OS.GetConnectedMidiInputs());
+ }
+
+ public override void _Input(InputEvent inputEvent)
+ {
+ if (inputEvent is InputEventMIDI midiEvent)
+ {
+ PrintMIDIInfo(midiEvent);
+ }
+ }
+
+ private void PrintMIDIInfo(InputEventMIDI midiEvent)
+ {
+ GD.Print(midiEvent);
+ GD.Print("Channel " + midiEvent.Channel);
+ GD.Print("Message " + midiEvent.Message);
+ GD.Print("Pitch " + midiEvent.Pitch);
+ GD.Print("Velocity " + midiEvent.Velocity);
+ GD.Print("Instrument " + midiEvent.Instrument);
+ GD.Print("Pressure " + midiEvent.Pressure);
+ GD.Print("Controller number: " + midiEvent.ControllerNumber);
+ GD.Print("Controller value: " + midiEvent.ControllerValue);
+ }
+ [/csharp]
+ [/codeblocks]
+ Note that Godot does not currently support MIDI output, so there is no way to emit MIDI signals from Godot. Only MIDI input works.
</description>
<tutorials>
+ <link title="MIDI Message Status Byte List">https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes</link>
+ <link title="Wikipedia General MIDI Instrument List">https://en.wikipedia.org/wiki/General_MIDI#Program_change_events</link>
+ <link title="Wikipedia Piano Key Frequencies List">https://en.wikipedia.org/wiki/Piano_key_frequencies#List</link>
</tutorials>
<members>
<member name="channel" type="int" setter="set_channel" getter="get_channel" default="0">
+ The MIDI channel of this input event. There are 16 channels, so this value ranges from 0 to 15. MIDI channel 9 is reserved for the use with percussion instruments, the rest of the channels are for non-percussion instruments.
</member>
<member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number" default="0">
+ If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers.
</member>
<member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value" default="0">
+ If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers.
</member>
<member name="instrument" type="int" setter="set_instrument" getter="get_instrument" default="0">
+ The instrument of this input event. This value ranges from 0 to 127. Refer to the instrument list on the General MIDI wikipedia article to see a list of instruments, except that this value is 0-index, so subtract one from every number on that chart. A standard piano will have an instrument number of 0.
</member>
<member name="message" type="int" setter="set_message" getter="get_message" enum="MIDIMessage" default="0">
+ Returns a value indicating the type of message for this MIDI signal. This is a member of the MIDIMessage enum.
+ For MIDI messages between 0x80 and 0xEF, only the left half of the bits are returned as this value, as the other part is the channel (ex: 0x94 becomes 0x9). For MIDI messages from 0xF0 to 0xFF, the value is returned as-is.
+ Notes will return [code]MIDI_MESSAGE_NOTE_ON[/code] when activated, but they might not always return [code]MIDI_MESSAGE_NOTE_OFF[/code] when deactivated, therefore your code should treat the input as stopped if some period of time has passed.
+ For more information, see the MIDI message status byte list chart linked above.
</member>
<member name="pitch" type="int" setter="set_pitch" getter="get_pitch" default="0">
+ The pitch index number of this MIDI signal. This value ranges from 0 to 127. On a piano, middle C is 60, and A440 is 69, see the "MIDI note" column of the piano key frequency chart on Wikipedia for more information.
</member>
<member name="pressure" type="int" setter="set_pressure" getter="get_pressure" default="0">
+ The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero.
</member>
<member name="velocity" type="int" setter="set_velocity" getter="get_velocity" default="0">
+ The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice.
</member>
</members>
</class>
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index a248f1abd9..5215c29b4a 100644
--- a/doc/classes/InputEventMouse.xml
+++ b/doc/classes/InputEventMouse.xml
@@ -7,17 +7,17 @@
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" 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)">
- The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0.
+ The global mouse position relative to the current [Viewport]. If used in [method Control._gui_input] and if the current [Control] is not under the mouse, moving it will not update this value.
</member>
<member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
- The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse.
+ The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse. If the current [Control] is not under the mouse, moving it will not update this value.
</member>
</members>
</class>
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..17f6eeecab 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -8,14 +8,14 @@
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">
The touch index in the case of a multi-touch event. One index = one finger.
</member>
<member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
- The touch position.
+ The touch position, in screen (global) coordinates.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the touch's state is pressed. If [code]false[/code], the touch's state is released.
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/ItemList.xml b/doc/classes/ItemList.xml
index baa0faaae9..593d0c9523 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -155,10 +155,10 @@
Returns an array with the indexes of the selected items.
</description>
</method>
- <method name="get_v_scroll">
+ <method name="get_v_scroll_bar">
<return type="VScrollBar" />
<description>
- Returns the [Object] ID associated with the list.
+ Returns the vertical scrollbar.
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
</description>
</method>
@@ -374,14 +374,14 @@
The size all icons will be adjusted to.
If either X or Y component is not greater than zero, icon size won't be affected.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode" default="1">
The icon position, whether above or to the left of the text. See the [enum IconMode] constants.
</member>
<member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale" default="1.0">
The scale of icon applied after [member fixed_icon_size] and transposing takes effect.
</member>
- <member name="items_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
+ <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
The number of items currently in the list.
</member>
<member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns" default="1">
@@ -393,7 +393,7 @@
Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display.
[b]Note:[/b] This property takes effect only when [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member fixed_column_width] should be greater than zero.
</member>
- <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
+ <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width" default="false">
Whether all columns will have the same width.
If [code]true[/code], the width is equal to the largest column width of all columns.
@@ -463,21 +463,6 @@
</constant>
</constants>
<theme_items>
- <theme_item name="bg" data_type="style" type="StyleBox">
- Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused.
- </theme_item>
- <theme_item name="bg_focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [ItemList] is being focused.
- </theme_item>
- <theme_item name="cursor" data_type="style" type="StyleBox">
- [StyleBox] used for the cursor, when the [ItemList] is being focused.
- </theme_item>
- <theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
- [StyleBox] used for the cursor, when the [ItemList] is not being focused.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] of the item's text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.63, 0.63, 0.63, 1)">
Default text [Color] of the item.
</theme_item>
@@ -487,9 +472,6 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the item is selected.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the item's text.
- </theme_item>
<theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)">
[Color] of the guideline. The guideline is a line drawn between each row of items.
</theme_item>
@@ -505,14 +487,32 @@
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the item text outline.
</theme_item>
+ <theme_item name="vseparation" data_type="constant" type="int" default="2">
+ The vertical spacing between items.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the item's text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the item's text.
+ </theme_item>
+ <theme_item name="bg" data_type="style" type="StyleBox">
+ Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused.
+ </theme_item>
+ <theme_item name="bg_focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [ItemList] is being focused.
+ </theme_item>
+ <theme_item name="cursor" data_type="style" type="StyleBox">
+ [StyleBox] used for the cursor, when the [ItemList] is being focused.
+ </theme_item>
+ <theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
+ [StyleBox] used for the cursor, when the [ItemList] is not being focused.
+ </theme_item>
<theme_item name="selected" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [ItemList] is not being focused.
</theme_item>
<theme_item name="selected_focus" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [ItemList] is being focused.
</theme_item>
- <theme_item name="vseparation" data_type="constant" type="int" default="2">
- The vertical spacing between items.
- </theme_item>
</theme_items>
</class>
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/Joint2D.xml b/doc/classes/Joint2D.xml
index b003224ad4..6b32d680eb 100644
--- a/doc/classes/Joint2D.xml
+++ b/doc/classes/Joint2D.xml
@@ -11,6 +11,7 @@
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0">
When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint.
+ When set to [code]0[/code], the default value from [member ProjectSettings.physics/2d/solver/default_constraint_bias] is used.
</member>
<member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
If [code]true[/code], [member node_a] and [member node_b] can not collide.
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 24ebf08c36..bdf451e710 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -61,15 +61,15 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align" default="0">
- Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [enum Align] constants.
- </member>
<member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="Label.AutowrapMode" default="0">
If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum AutowrapMode].
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false">
If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally.
</member>
+ <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
+ Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
+ </member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
@@ -79,11 +79,12 @@
<member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1">
Limits the lines of text the node shows on screen.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="2" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="2" />
<member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0">
Limits the amount of visible characters. If you set [code]percent_visible[/code] to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box.
+ [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
</member>
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="4" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="4" />
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
@@ -102,38 +103,18 @@
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false">
If [code]true[/code], all the text displays as UPPERCASE.
</member>
- <member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign" default="0">
- Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [enum VAlign] constants.
+ <member name="vertical_alignment" type="int" setter="set_vertical_alignment" getter="get_vertical_alignment" enum="VerticalAlignment" default="0">
+ Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the [enum VerticalAlignment] constants.
</member>
<member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
Restricts the number of characters to display. Set to -1 to disable.
+ [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
+ </member>
+ <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="Label.VisibleCharactersBehavior" default="0">
+ Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum VisibleCharactersBehavior] for more info.
</member>
</members>
<constants>
- <constant name="ALIGN_LEFT" value="0" enum="Align">
- Align rows to the left (default).
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="Align">
- Align rows centered.
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="Align">
- Align rows to the right.
- </constant>
- <constant name="ALIGN_FILL" value="3" enum="Align">
- Expand row to fit the width.
- </constant>
- <constant name="VALIGN_TOP" value="0" enum="VAlign">
- Align the whole text to the top.
- </constant>
- <constant name="VALIGN_CENTER" value="1" enum="VAlign">
- Align the whole text to the center.
- </constant>
- <constant name="VALIGN_BOTTOM" value="2" enum="VAlign">
- Align the whole text to the bottom.
- </constant>
- <constant name="VALIGN_FILL" value="3" enum="VAlign">
- Align the whole text by spreading the rows.
- </constant>
<constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
Autowrap is disabled.
</constant>
@@ -161,11 +142,23 @@
<constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
Trims the text per word and adds an ellipsis to indicate that parts are hidden.
</constant>
+ <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
+ Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
+ </constant>
+ <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
+ Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
+ </constant>
+ <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
+ </constant>
+ <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left.
+ </constant>
+ <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the right.
+ </constant>
</constants>
<theme_items>
- <theme_item name="font" data_type="font" type="Font">
- [Font] used for the [Label]'s text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Default text [Color] of the [Label].
</theme_item>
@@ -175,15 +168,9 @@
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
[Color] of the text's shadow effect.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [Label]'s text.
- </theme_item>
<theme_item name="line_spacing" data_type="constant" type="int" default="3">
Vertical space between lines in multiline [Label].
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Background [StyleBox] for the [Label].
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
Text outline size.
</theme_item>
@@ -196,5 +183,14 @@
<theme_item name="shadow_outline_size" data_type="constant" type="int" default="1">
The size of the shadow outline.
</theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] used for the [Label]'s text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [Label]'s text.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Background [StyleBox] for the [Label].
+ </theme_item>
</theme_items>
</class>
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/LineEdit.xml b/doc/classes/LineEdit.xml
index a75bd2f704..c3e3088d69 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -159,8 +159,8 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0">
- Text alignment as defined in the [enum Align] enum.
+ <member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
+ Text alignment as defined in the [enum HorizontalAlignment] enum.
</member>
<member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false">
If [code]true[/code], the caret (text cursor) blinks.
@@ -199,7 +199,7 @@
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
If [code]true[/code], the [LineEdit] don't display decoration.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
@@ -232,7 +232,7 @@
If [code]false[/code], using middle mouse button to paste clipboard will be disabled.
[b]Note:[/b] This method is only implemented on Linux.
</member>
- <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" />
+ <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="1" />
<member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha" default="0.6">
Opacity of the [member placeholder_text]. From [code]0[/code] to [code]1[/code].
</member>
@@ -292,18 +292,6 @@
</signal>
</signals>
<constants>
- <constant name="ALIGN_LEFT" value="0" enum="Align">
- Aligns the text on the left-hand side of the [LineEdit].
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="Align">
- Centers the text in the middle of the [LineEdit].
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="Align">
- Aligns the text on the right-hand side of the [LineEdit].
- </constant>
- <constant name="ALIGN_FILL" value="3" enum="Align">
- Expand row to fit the [LineEdit]'s width.
- </constant>
<constant name="MENU_CUT" value="0" enum="MenuItems">
Cuts (copies and clears) the selected text.
</constant>
@@ -397,21 +385,12 @@
<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Color of the [LineEdit]'s caret (text cursor).
</theme_item>
- <theme_item name="clear" data_type="icon" type="Texture2D">
- Texture for the clear button. See [member clear_button_enabled].
- </theme_item>
<theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Color used as default tint for the clear button.
</theme_item>
<theme_item name="clear_button_color_pressed" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Color used for the clear button when it's pressed.
</theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- Background used when [LineEdit] has GUI focus.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- Font used for the text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default font color.
</theme_item>
@@ -421,26 +400,35 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
Font color for selected text (inside the selection rectangle).
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [LineEdit]'s text.
- </theme_item>
<theme_item name="font_uneditable_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)">
Font color when editing is disabled.
</theme_item>
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
+ Color of the selection rectangle.
+ </theme_item>
<theme_item name="minimum_character_width" data_type="constant" type="int" default="4">
Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling).
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Default background for the [LineEdit].
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ Font used for the text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [LineEdit]'s text.
+ </theme_item>
+ <theme_item name="clear" data_type="icon" type="Texture2D">
+ Texture for the clear button. See [member clear_button_enabled].
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ Background used when [LineEdit] has GUI focus. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Default background for the [LineEdit].
+ </theme_item>
<theme_item name="read_only" data_type="style" type="StyleBox">
Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]).
</theme_item>
- <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
- Color of the selection rectangle.
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 0329ed833f..a20db4d7e9 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -33,11 +33,11 @@
</method>
</methods>
<members>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="0" />
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
- <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="2" />
+ <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="2" />
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
@@ -66,12 +66,6 @@
</constant>
</constants>
<theme_items>
- <theme_item name="focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [LinkButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] of the [LinkButton]'s text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the [LinkButton].
</theme_item>
@@ -87,14 +81,20 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [LinkButton] is being pressed.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the [LinkButton]'s text.
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
<theme_item name="underline_spacing" data_type="constant" type="int" default="2">
The vertical space between the baseline of text and the underline.
</theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [LinkButton]'s text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the [LinkButton]'s text.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [LinkButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 7f9d3d96dc..632b22c1de 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -27,16 +27,16 @@
</method>
</methods>
<members>
- <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" override="true" enum="BaseButton.ActionMode" default="0" />
- <member name="flat" type="bool" setter="set_flat" getter="is_flat" override="true" default="true" />
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" />
- <member name="items_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
+ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" />
+ <member name="flat" type="bool" setter="set_flat" getter="is_flat" overrides="Button" default="true" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="0" />
+ <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
The number of items currently in the list.
</member>
<member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover" default="false">
If [code]true[/code], when the cursor hovers above another [MenuButton] within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current [MenuButton] and open the other one.
</member>
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<signals>
<signal name="about_to_popup">
@@ -46,15 +46,6 @@
</signal>
</signals>
<theme_items>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [MenuButton] is disabled.
- </theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [MenuButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] of the [MenuButton]'s text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the [MenuButton].
</theme_item>
@@ -73,21 +64,30 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [MenuButton] is being pressed.
</theme_item>
+ <theme_item name="hseparation" data_type="constant" type="int" default="3">
+ The horizontal space between [MenuButton]'s icon and text.
+ </theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [MenuButton]'s text.
+ </theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [MenuButton]'s text.
</theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [MenuButton] is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [MenuButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [MenuButton] is being hovered.
</theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="3">
- The horizontal space between [MenuButton]'s icon and text.
- </theme_item>
<theme_item name="normal" data_type="style" type="StyleBox">
Default [StyleBox] for the [MenuButton].
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
- </theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [MenuButton] is being pressed.
</theme_item>
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/MultiplayerReplicator.xml b/doc/classes/MultiplayerReplicator.xml
index 0f97cc1d0a..c2e93ddeab 100644
--- a/doc/classes/MultiplayerReplicator.xml
+++ b/doc/classes/MultiplayerReplicator.xml
@@ -24,7 +24,7 @@
<argument index="1" name="object" type="Object" />
<argument index="2" name="peer_id" type="int" default="0" />
<description>
- Request a despawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_despawn] for the default behavior.
+ Request a despawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behavior, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_despawn] for the default behavior.
</description>
</method>
<method name="encode_state">
@@ -74,7 +74,7 @@
<argument index="1" name="object" type="Object" />
<argument index="2" name="peer_id" type="int" default="0" />
<description>
- Request a spawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_spawn] for the default behavior.
+ Request a spawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behavior, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_spawn] for the default behavior.
</description>
</method>
<method name="spawn_config">
@@ -85,7 +85,7 @@
<argument index="3" name="custom_send" type="Callable" />
<argument index="4" name="custom_receive" type="Callable" />
<description>
- Configures the MultiplayerReplicator to track instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. When [code]mode[/code] is [constant REPLICATION_MODE_SERVER], the specified [code]properties[/code] will also be replicated to clients during the initial spawn. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the spawn/despawn proecess.
+ Configures the MultiplayerReplicator to track instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. When [code]mode[/code] is [constant REPLICATION_MODE_SERVER], the specified [code]properties[/code] will also be replicated to clients during the initial spawn. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behavior and customize the spawn/despawn proecess.
Tip: You can use a custom property in the scene main script to return a customly optimized state representation.
</description>
</method>
@@ -94,7 +94,7 @@
<argument index="0" name="scene_id" type="int" />
<argument index="1" name="peer_id" type="int" default="0" />
<description>
- Manually request a sync for all the instances of the scene identified by [code]scene_id[/code]. This function will trigger the default sync behaviour, or call your send custom send callable if specified in [method sync_config].
+ Manually request a sync for all the instances of the scene identified by [code]scene_id[/code]. This function will trigger the default sync behavior, or call your send custom send callable if specified in [method sync_config].
[b]Note:[/b] The default implementation only allow syncing from server to clients.
</description>
</method>
@@ -106,8 +106,8 @@
<argument index="3" name="custom_send" type="Callable" />
<argument index="4" name="custom_receive" type="Callable" />
<description>
- Configures the MultiplayerReplicator to sync instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication at the desired [code]interval[/code] (in milliseconds). The specified [code]properties[/code] will be part of the state sync. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the syncronization proecess.
- Tip: You can use a custom property in the scene main script to return a customly optimized state representation (having a single property that returns a PackedByteArray is higly recommended when dealing with many instances).
+ Configures the MultiplayerReplicator to sync instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication at the desired [code]interval[/code] (in milliseconds). The specified [code]properties[/code] will be part of the state sync. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behavior and customize the synchronization proecess.
+ Tip: You can use a custom property in the scene main script to return a customly optimized state representation (having a single property that returns a PackedByteArray is highly recommended when dealing with many instances).
</description>
</method>
<method name="track">
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/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index 636ed368d1..02144d641e 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -35,7 +35,7 @@
<member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true">
If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's borders.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="2" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="2" />
<member name="patch_margin_bottom" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0">
The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
</member>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 3745b394e0..753492ad34 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>
@@ -186,7 +186,7 @@
<argument index="1" name="recursive" type="bool" default="true" />
<argument index="2" name="owned" type="bool" default="true" />
<description>
- Finds a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]).
+ Finds a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]). Returns [code]null[/code] if no matching [Node] is found.
[b]Note:[/b] It does not match against the full path, just against individual node names.
If [code]owned[/code] is [code]true[/code], this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
[b]Note:[/b] As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using [method get_node] instead. To avoid using [method find_node] too often, consider caching the node reference into a variable.
@@ -233,6 +233,14 @@
<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">
@@ -253,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]
@@ -314,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">
@@ -563,6 +571,8 @@
<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.
+ [b]Note:[/b] The given node will become the new parent of any child nodes that the replaced node had.
+ [b]Note:[/b] 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">
@@ -717,7 +727,7 @@
<signals>
<signal name="ready">
<description>
- Emitted when the node is ready.
+ Emitted when the node is ready. Comes after [method _ready] callback and follows the same rules.
</description>
</signal>
<signal name="renamed">
@@ -782,8 +792,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..6b5a627575 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>
@@ -134,6 +134,20 @@
Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D].
</description>
</method>
+ <method name="property_can_revert">
+ <return type="bool" />
+ <argument index="0" name="name" type="String" />
+ <description>
+ Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value.
+ </description>
+ </method>
+ <method name="property_get_revert">
+ <return type="Variant" />
+ <argument index="0" name="name" type="String" />
+ <description>
+ Returns the default value of the Node3D property with given [code]name[/code].
+ </description>
+ </method>
<method name="rotate">
<return type="void" />
<argument index="0" name="axis" type="Vector3" />
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index dcd41e46f0..1ed4b335ad 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -31,6 +31,13 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
+ <method name="crash">
+ <return type="void" />
+ <argument index="0" name="message" type="String" />
+ <description>
+ Crashes the engine (or the editor if called within a [code]@tool[/code] script). This should [i]only[/i] be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) [method @GDScript.assert], [method @GlobalScope.push_error] or [method alert]. See also [method kill].
+ </description>
+ </method>
<method name="create_instance">
<return type="int" />
<argument index="0" name="arguments" type="PackedStringArray" />
@@ -142,7 +149,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 +186,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 +201,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>
@@ -246,6 +253,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>
@@ -256,7 +270,60 @@
<method name="get_name" qualifiers="const">
<return type="String" />
<description>
- Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"macOS"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code].
+ Returns the name of the host OS.
+ On Windows, this is [code]"Windows"[/code] or [code]"UWP"[/code] (Universal Windows Platform) if exported thereon.
+ On macOS, this is [code]"macOS"[/code].
+ On Linux-based operating systems, this is [code]"Linux"[/code].
+ On BSD-based operating systems, this is [code]"FreeBSD"[/code], [code]"NetBSD"[/code], [code]"OpenBSD"[/code], or [code]"BSD"[/code] as a fallback.
+ On Android, this is [code]"Android"[/code].
+ On iOS, this is [code]"iOS"[/code].
+ On the web, this is [code]"HTML5"[/code].
+ [b]Note:[/b] Custom builds of the engine may support additional platforms, such as consoles, yielding other return values.
+ [codeblocks]
+ [gdscript]
+ match OS.get_name():
+ "Windows", "UWP":
+ print("Windows")
+ "macOS":
+ print("macOS")
+ "Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD":
+ print("Linux/BSD")
+ "Android":
+ print("Android")
+ "iOS":
+ print("iOS")
+ "HTML5":
+ print("Web")
+ [/gdscript]
+ [csharp]
+ switch (OS.GetName())
+ {
+ case "Windows":
+ case "UWP":
+ GD.Print("Windows");
+ break;
+ case "macOS":
+ GD.Print("macOS");
+ break;
+ case "Linux":
+ case "FreeBSD":
+ case "NetBSD":
+ case "OpenBSD"
+ case "BSD":
+ GD.Print("Linux/BSD");
+ break;
+ case "Android":
+ GD.Print("Android");
+ break;
+ case "iOS":
+ GD.Print("iOS");
+ break;
+ case "HTML5":
+ GD.Print("Web");
+ break;
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_process_id" qualifiers="const">
@@ -281,7 +348,7 @@
<method name="get_static_memory_usage" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of static memory being used by the program in bytes.
+ Returns the amount of static memory being used by the program in bytes (only works in debug).
</description>
</method>
<method name="get_system_dir" qualifiers="const">
@@ -313,11 +380,13 @@
<return type="String" />
<description>
Returns the absolute directory path where user data is written ([code]user://[/code]).
- On Linux, this is [code]~/.local/share/godot/app_userdata/[project_name][/code], or [code]~/.local/share/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
+ On Windows, this is [code]%AppData%\Godot\app_userdata\[project_name][/code], or [code]%AppData%\[custom_name][/code] if [code]use_custom_user_dir[/code] is set. [code]%AppData%[/code] expands to [code]%UserProfile%\AppData\Roaming[/code].
On macOS, this is [code]~/Library/Application Support/Godot/app_userdata/[project_name][/code], or [code]~/Library/Application Support/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
- On Windows, this is [code]%APPDATA%\Godot\app_userdata\[project_name][/code], or [code]%APPDATA%\[custom_name][/code] if [code]use_custom_user_dir[/code] is set. [code]%APPDATA%[/code] expands to [code]%USERPROFILE%\AppData\Roaming[/code].
- If the project name is empty, [code]user://[/code] falls back to [code]res://[/code].
- Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user data directory.
+ On Linux and BSD, this is [code]~/.local/share/godot/app_userdata/[project_name][/code], or [code]~/.local/share/[custom_name][/code] if [code]use_custom_user_dir[/code] is set.
+ On Android and iOS, this is a sandboxed directory in either internal or external storage, depending on the user's configuration.
+ On the web, this is a virtual directory managed by the browser.
+ If the project name is empty, [code][project_name][/code] falls back to [code][unnamed project][/code].
+ Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user home directory.
</description>
</method>
<method name="has_environment" qualifiers="const">
@@ -332,7 +401,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>
@@ -367,7 +436,7 @@
<return type="int" enum="Error" />
<argument index="0" name="pid" type="int" />
<description>
- Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode.
+ Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. See also [method crash].
[b]Note:[/b] This method can also be used to kill processes that were not spawned by the game.
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 5a84364b92..e796cb2298 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -29,7 +29,8 @@
[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>
+ <link title="Object notifications">$DOCS_URL/tutorials/best_practices/godot_notifications.html</link>
</tutorials>
<methods>
<method name="_get" qualifiers="virtual">
@@ -350,6 +351,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 +569,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 +583,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/OptionButton.xml b/doc/classes/OptionButton.xml
index a3616af999..87561917f3 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -39,12 +39,6 @@
Clears all the items in the [OptionButton].
</description>
</method>
- <method name="get_item_count" qualifiers="const">
- <return type="int" />
- <description>
- Returns the amount of items in the OptionButton, including separators.
- </description>
- </method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="idx" type="int" />
@@ -163,12 +157,15 @@
</method>
</methods>
<members>
- <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" override="true" enum="BaseButton.ActionMode" default="0" />
- <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
+ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" />
+ <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
+ <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
+ The number of items to select from.
+ </member>
<member name="selected" type="int" setter="_select_int" getter="get_selected" default="-1">
The index of the currently selected item, or [code]-1[/code] if no item is selected.
</member>
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
</members>
<signals>
<signal name="item_focused">
@@ -185,24 +182,6 @@
</signal>
</signals>
<theme_items>
- <theme_item name="arrow" data_type="icon" type="Texture2D">
- The arrow icon to be drawn on the right end of the button.
- </theme_item>
- <theme_item name="arrow_margin" data_type="constant" type="int" default="2">
- The horizontal space between the arrow icon and the right edge of the button.
- </theme_item>
- <theme_item name="disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [OptionButton] is disabled (for left-to-right layouts).
- </theme_item>
- <theme_item name="disabled_mirrored" data_type="style" type="StyleBox">
- [StyleBox] used when the [OptionButton] is disabled (for right-to-left layouts).
- </theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [OptionButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] of the [OptionButton]'s text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Default text [Color] of the [OptionButton].
</theme_item>
@@ -221,27 +200,45 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [OptionButton] is being pressed.
</theme_item>
+ <theme_item name="arrow_margin" data_type="constant" type="int" default="2">
+ The horizontal space between the arrow icon and the right edge of the button.
+ </theme_item>
+ <theme_item name="hseparation" data_type="constant" type="int" default="2">
+ The horizontal space between [OptionButton]'s icon and text.
+ </theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the [OptionButton]'s text.
+ </theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [OptionButton]'s text.
</theme_item>
+ <theme_item name="arrow" data_type="icon" type="Texture2D">
+ The arrow icon to be drawn on the right end of the button.
+ </theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is disabled (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="disabled_mirrored" data_type="style" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is disabled (for right-to-left layouts).
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [OptionButton] is being hovered (for left-to-right layouts).
</theme_item>
<theme_item name="hover_mirrored" data_type="style" type="StyleBox">
[StyleBox] used when the [OptionButton] is being hovered (for right-to-left layouts).
</theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="2">
- The horizontal space between [OptionButton]'s icon and text.
- </theme_item>
<theme_item name="normal" data_type="style" type="StyleBox">
Default [StyleBox] for the [OptionButton] (for left-to-right layouts).
</theme_item>
<theme_item name="normal_mirrored" data_type="style" type="StyleBox">
Default [StyleBox] for the [OptionButton] (for right-to-left layouts).
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
- </theme_item>
<theme_item name="pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [OptionButton] is being pressed (for left-to-right layouts).
</theme_item>
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..686854ffe8 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>
@@ -363,21 +363,22 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedByteArray" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" />
<description>
- Sorts the elements of the array in ascending order.
+ Returns the slice of the [PackedByteArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedByteArray].
+ If [code]end[/code]is negative, it will be relative to the end of the array.
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedByteArray" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
- Returns the slice of the [PackedByteArray] between indices (inclusive) as a new [PackedByteArray]. Any negative index is considered to be from the end of the array.
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_float32_array" qualifiers="const">
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index 4aa8a19630..d875549319 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>
@@ -126,20 +126,20 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedColorArray" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" />
<description>
- Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedColorArray" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index 68fb45a62a..6c77c4bee2 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>
@@ -127,20 +127,20 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedFloat32Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" />
<description>
- Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedFloat32Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index 740591a0c0..a8282c099a 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>
@@ -127,20 +127,20 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedFloat64Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" />
<description>
- Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedFloat64Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index 7a01bb6c7c..da26e93b96 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>
@@ -127,20 +127,20 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the array size.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" />
<description>
- Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedInt32Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index c7b69d4ad5..9ddf43a837 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>
@@ -127,20 +127,20 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the array size.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedInt64Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" />
<description>
- Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedInt64Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
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..439d59dde7 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>
@@ -127,20 +127,20 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedStringArray" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" />
<description>
- Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedStringArray" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index bf9b7e97d4..8c4f052016 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>
@@ -127,20 +127,20 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" />
<description>
- Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedVector2Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index b439f8f217..8229af984d 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>
@@ -126,20 +126,20 @@
<method name="size" qualifiers="const">
<return type="int" />
<description>
- Returns the size of the array.
+ Returns the number of elements in the array.
</description>
</method>
- <method name="sort">
- <return type="void" />
+ <method name="slice" qualifiers="const">
+ <return type="PackedVector3Array" />
+ <argument index="0" name="begin" type="int" />
+ <argument index="1" name="end" type="int" />
<description>
- Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray" qualifiers="const">
- <return type="PackedVector3Array" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <method name="sort">
+ <return type="void" />
<description>
+ Sorts the elements of the array in ascending order.
</description>
</method>
<method name="to_byte_array" qualifiers="const">
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index 31640eb3d8..cefb74191e 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -107,36 +107,36 @@
<description>
Waits for a packet to arrive on the bound address. See [method bind].
[b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this:
- [codeblocks]
- [gdscript]
- socket = PacketPeerUDP.new()
- # Server
- socket.set_dest_address("127.0.0.1", 789)
- socket.put_packet("Time to stop".to_ascii())
+ [codeblocks]
+ [gdscript]
+ socket = PacketPeerUDP.new()
+ # Server
+ socket.set_dest_address("127.0.0.1", 789)
+ socket.put_packet("Time to stop".to_ascii())
- # Client
- while socket.wait() == OK:
- var data = socket.get_packet().get_string_from_ascii()
- if data == "Time to stop":
- return
- [/gdscript]
- [csharp]
- var socket = new PacketPeerUDP();
- // Server
- socket.SetDestAddress("127.0.0.1", 789);
- socket.PutPacket("Time to stop".ToAscii());
+ # Client
+ while socket.wait() == OK:
+ var data = socket.get_packet().get_string_from_ascii()
+ if data == "Time to stop":
+ return
+ [/gdscript]
+ [csharp]
+ var socket = new PacketPeerUDP();
+ // Server
+ socket.SetDestAddress("127.0.0.1", 789);
+ socket.PutPacket("Time to stop".ToAscii());
- // Client
- while (socket.Wait() == OK)
- {
- string data = socket.GetPacket().GetStringFromASCII();
- if (data == "Time to stop")
- {
- return;
- }
- }
- [/csharp]
- [/codeblocks]
+ // Client
+ while (socket.Wait() == OK)
+ {
+ string data = socket.GetPacket().GetStringFromASCII();
+ if (data == "Time to stop")
+ {
+ return;
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
</methods>
diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml
index 95d038e2af..80005cce15 100644
--- a/doc/classes/PanelContainer.xml
+++ b/doc/classes/PanelContainer.xml
@@ -10,7 +10,7 @@
<link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
<members>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="0" />
</members>
<theme_items>
<theme_item name="panel" data_type="style" type="StyleBox">
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
index 5670660d01..592f12d9d7 100644
--- a/doc/classes/ParallaxBackground.xml
+++ b/doc/classes/ParallaxBackground.xml
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<members>
- <member name="layer" type="int" setter="set_layer" getter="get_layer" override="true" default="-100" />
+ <member name="layer" type="int" setter="set_layer" getter="get_layer" overrides="CanvasLayer" default="-100" />
<member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" default="Vector2(0, 0)">
The base position offset for all [ParallaxLayer] children.
</member>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 2cc0d8f2b0..6cf0ea2a93 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -6,7 +6,7 @@
<description>
ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [GPUParticles3D] and [GPUParticles2D] emitter nodes.
Some of this material's properties are applied to each particle when emitted, while others can have a [CurveTexture] applied to vary values over the lifetime of the particle.
- When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between [code]1.0[/code] and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of [code]0.4[/code] would scale the original property between [code]0.4-1.0[/code] of its original value.
+ Particle animation is available only in [GPUParticles2D]. To use it, attach a [CanvasItemMaterial], with [member CanvasItemMaterial.particles_animation] enabled, to the particles node.
</description>
<tutorials>
</tutorials>
@@ -15,14 +15,14 @@
<return type="float" />
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<description>
- Return the maximum value range for the given prameter.
+ Returns the maximum value range for the given parameter.
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<description>
- Return the minimum value range for the given parameter.
+ Returns the minimum value range for the given parameter.
</description>
</method>
<method name="get_param_texture" qualifiers="const">
@@ -83,13 +83,13 @@
Minimum angle.
</member>
<member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
- Each particle's angular velocity will vary along this [CurveTexture].
+ Each particle's angular velocity (rotation speed) will vary along this [CurveTexture] over its lifetime.
</member>
<member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum angular velocity.
+ Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum angular velocity.
+ Minimum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="anim_offset_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's animation offset will vary along this [CurveTexture].
@@ -104,7 +104,8 @@
Each particle's animation speed will vary along this [CurveTexture].
</member>
<member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum particle animation speed.
+ Maximum particle animation speed. Animation speed of [code]1[/code] means that the particles will make full [code]0[/code] to [code]1[/code] offset cycle during lifetime, [code]2[/code] means [code]2[/code] cycles etc.
+ With animation speed greater than [code]1[/code], remember to enable [member CanvasItemMaterial.particles_anim_loop] property if you want the animation to repeat.
</member>
<member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
Minimum particle animation speed.
@@ -127,6 +128,9 @@
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
</member>
+ <member name="color_initial_ramp" type="Texture2D" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
+ Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]).
+ </member>
<member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]).
</member>
@@ -195,7 +199,7 @@
Minimum initial velocity.
</member>
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
- Particle lifetime randomness ratio.
+ Particle lifetime randomness ratio. The lifetime will be multiplied by a value interpolated between [code]1.0[/code] and a random number less than one. For example a random ratio of [code]0.4[/code] would scale the original lifetime between [code]0.4-1.0[/code] of its original value.
</member>
<member name="linear_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's linear acceleration will vary along this [CurveTexture].
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 7775cfb2f9..43e27ea437 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">
@@ -57,6 +57,6 @@
</method>
</methods>
<members>
- <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" />
+ <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" overrides="CollisionObject2D" default="false" />
</members>
</class>
diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml
index 9cf587f2e0..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">
diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index 3fe9cd776c..9921974c6e 100644
--- a/doc/classes/PhysicsDirectBodyState2D.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -7,30 +7,40 @@
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">
+ <method name="add_constant_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" />
+ <argument index="0" name="force" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a constant directional force without affecting rotation.
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
+ This is equivalent to using [method add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="add_force">
+ <method name="add_constant_force">
<return type="void" />
<argument index="0" name="force" type="Vector2" />
<argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
- <method name="add_torque">
+ <method name="add_constant_torque">
<return type="void" />
<argument index="0" name="torque" type="float" />
<description>
- Adds a constant rotational force.
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = 0[/code].
+ </description>
+ </method>
+ <method name="apply_central_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" default="Vector2(0, 0)" />
+ <description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method apply_force] at the body's center of mass.
</description>
</method>
<method name="apply_central_impulse">
@@ -38,6 +48,17 @@
<argument index="0" name="impulse" type="Vector2" />
<description>
Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="apply_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" />
+ <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -45,14 +66,38 @@
<argument index="0" name="impulse" type="Vector2" />
<argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="apply_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="float" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
<argument index="0" name="impulse" type="float" />
<description>
- Applies a rotational impulse to the body.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ </description>
+ </method>
+ <method name="get_constant_force" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </description>
+ </method>
+ <method name="get_constant_torque" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
</description>
</method>
<method name="get_contact_collider" qualifiers="const">
@@ -144,10 +189,26 @@
Calls the built-in force integration code.
</description>
</method>
+ <method name="set_constant_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" />
+ <description>
+ Sets the body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </description>
+ </method>
+ <method name="set_constant_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="float" />
+ <description>
+ Sets the body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
+ </description>
+ </method>
</methods>
<members>
<member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity">
- The body's rotational velocity.
+ The body's rotational velocity in [i]radians[/i] per second.
</member>
<member name="center_of_mass" type="Vector2" setter="" getter="get_center_of_mass">
The body's center of mass position relative to the body's center in the global coordinate system.
@@ -162,7 +223,7 @@
The inverse of the mass of the body.
</member>
<member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity">
- The body's linear velocity.
+ The body's linear velocity in pixels per second.
</member>
<member name="sleeping" type="bool" setter="set_sleep_state" getter="is_sleeping">
If [code]true[/code], this body is currently sleeping (not active).
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index efa9eb9cd6..77c99c55b1 100644
--- a/doc/classes/PhysicsDirectBodyState3D.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -7,39 +7,58 @@
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">
+ <method name="add_constant_central_force">
<return type="void" />
<argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Adds a constant directional force without affecting rotation.
- This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code].
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
+ This is equivalent to using [method add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="add_force">
+ <method name="add_constant_force">
<return type="void" />
<argument index="0" name="force" type="Vector3" />
<argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
- <method name="add_torque">
+ <method name="add_constant_torque">
<return type="void" />
<argument index="0" name="torque" type="Vector3" />
<description>
- Adds a constant rotational force without affecting position.
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = Vector3(0, 0, 0)[/code].
+ </description>
+ </method>
+ <method name="apply_central_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)" />
+ <description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method apply_force] at the body's center of mass.
</description>
</method>
<method name="apply_central_impulse">
<return type="void" />
<argument index="0" name="impulse" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Applies a single directional impulse without affecting rotation.
- This is equivalent to [code]apply_impulse(Vector3(0, 0, 0), impulse)[/code].
+ Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="apply_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" />
+ <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -47,14 +66,38 @@
<argument index="0" name="impulse" type="Vector3" />
<argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="apply_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="Vector3" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
<argument index="0" name="impulse" type="Vector3" />
<description>
- Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector [code]j[/code] passed as parameter.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ </description>
+ </method>
+ <method name="get_constant_force" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </description>
+ </method>
+ <method name="get_constant_torque" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
</description>
</method>
<method name="get_contact_collider" qualifiers="const">
@@ -153,10 +196,26 @@
Calls the built-in force integration code.
</description>
</method>
+ <method name="set_constant_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" />
+ <description>
+ Sets the body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </description>
+ </method>
+ <method name="set_constant_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="Vector3" />
+ <description>
+ Sets the body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
+ </description>
+ </method>
</methods>
<members>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity">
- The body's rotational velocity.
+ The body's rotational velocity in [i]radians[/i] per second.
</member>
<member name="center_of_mass" type="Vector3" setter="" getter="get_center_of_mass">
The body's center of mass position relative to the body's center in the global coordinate system.
@@ -171,7 +230,7 @@
The inverse of the mass of the body.
</member>
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity">
- The body's linear velocity.
+ The body's linear velocity in units per second.
</member>
<member name="principal_inertia_axes" type="Basis" setter="" getter="get_principal_inertia_axes">
</member>
diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index 107d276df2..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">
diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 349ce31ab4..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">
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 b71b48f223..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.
diff --git a/doc/classes/PhysicsRayQueryParameters3D.xml b/doc/classes/PhysicsRayQueryParameters3D.xml
index 3085ff3b35..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.
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 868b58ea9f..624f5e7b17 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -208,28 +208,39 @@
Sets the transform matrix for an area.
</description>
</method>
- <method name="body_add_central_force">
+ <method name="body_add_collision_exception">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector2" />
+ <argument index="1" name="excepted_body" type="RID" />
<description>
+ Adds a body to the list of bodies exempt from collisions.
</description>
</method>
- <method name="body_add_collision_exception">
+ <method name="body_add_constant_central_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <argument index="1" name="force" type="Vector2" />
<description>
- Adds a body to the list of bodies exempt from collisions.
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector2(0, 0))[/code].
+ This is equivalent to using [method body_add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="body_add_force">
+ <method name="body_add_constant_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="force" type="Vector2" />
<argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector2(0, 0))[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="body_add_constant_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="float" />
+ <description>
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]body_set_constant_torque(body, 0)[/code].
</description>
</method>
<method name="body_add_shape">
@@ -242,11 +253,13 @@
Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
- <method name="body_add_torque">
+ <method name="body_apply_central_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="float" />
+ <argument index="1" name="force" type="Vector2" />
<description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method body_apply_force] at the body's center of mass.
</description>
</method>
<method name="body_apply_central_impulse">
@@ -254,6 +267,19 @@
<argument index="0" name="body" type="RID" />
<argument index="1" name="impulse" type="Vector2" />
<description>
+ Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method body_apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="body_apply_force">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="force" type="Vector2" />
+ <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_apply_impulse">
@@ -262,7 +288,17 @@
<argument index="1" name="impulse" type="Vector2" />
<argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="body_apply_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="float" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="body_apply_torque_impulse">
@@ -270,6 +306,8 @@
<argument index="0" name="body" type="RID" />
<argument index="1" name="impulse" type="float" />
<description>
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="body_attach_canvas_instance_id">
@@ -320,6 +358,22 @@
Returns the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_get_constant_force" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Returns the body's total constant positional forces applied during each physics update.
+ See [method body_add_constant_force] and [method body_add_constant_central_force].
+ </description>
+ </method>
+ <method name="body_get_constant_torque" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Returns the body's total constant rotational forces applied during each physics update.
+ See [method body_add_constant_torque].
+ </description>
+ </method>
<method name="body_get_continuous_collision_detection_mode" qualifiers="const">
<return type="int" enum="PhysicsServer2D.CCDMode" />
<argument index="0" name="body" type="RID" />
@@ -455,6 +509,24 @@
Sets the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_set_constant_force">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="force" type="Vector2" />
+ <description>
+ Sets the body's total constant positional forces applied during each physics update.
+ See [method body_add_constant_force] and [method body_add_constant_central_force].
+ </description>
+ </method>
+ <method name="body_set_constant_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="float" />
+ <description>
+ Sets the body's total constant rotational forces applied during each physics update.
+ See [method body_add_constant_torque].
+ </description>
+ </method>
<method name="body_set_continuous_collision_detection_mode">
<return type="void" />
<argument index="0" name="body" type="RID" />
@@ -711,13 +783,6 @@
Activates or deactivates the 2D physics engine.
</description>
</method>
- <method name="set_collision_iterations">
- <return type="void" />
- <argument index="0" name="iterations" type="int" />
- <description>
- Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is [code]8[/code].
- </description>
- </method>
<method name="shape_get_data" qualifiers="const">
<return type="Variant" />
<argument index="0" name="shape" type="RID" />
@@ -796,23 +861,29 @@
Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated.
</constant>
<constant name="SPACE_PARAM_CONTACT_MAX_SEPARATION" value="1" enum="SpaceParameter">
- Constant to set/get the maximum distance a shape can be from another before they are considered separated.
+ Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded.
</constant>
- <constant name="SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION" value="2" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION" value="2" enum="SpaceParameter">
Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision.
</constant>
- <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="3" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONTACT_DEFAULT_BIAS" value="3" enum="SpaceParameter">
+ Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision.
+ </constant>
+ <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="4" enum="SpaceParameter">
Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
</constant>
- <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="4" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="5" enum="SpaceParameter">
Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
</constant>
- <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="5" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="6" enum="SpaceParameter">
Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time.
</constant>
- <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="6" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7" enum="SpaceParameter">
Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
</constant>
+ <constant name="SPACE_PARAM_SOLVER_ITERATIONS" value="8" enum="SpaceParameter">
+ Constant to set/get the number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance.
+ </constant>
<constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType">
This is the constant for creating world boundary shapes. A world boundary shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks.
</constant>
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index dd8003be1d..cb90d84238 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -202,27 +202,39 @@
Sets the transform matrix for an area.
</description>
</method>
- <method name="body_add_central_force">
+ <method name="body_add_collision_exception">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
+ <argument index="1" name="excepted_body" type="RID" />
<description>
+ Adds a body to the list of bodies exempt from collisions.
</description>
</method>
- <method name="body_add_collision_exception">
+ <method name="body_add_constant_central_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <argument index="1" name="force" type="Vector3" />
<description>
- Adds a body to the list of bodies exempt from collisions.
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector3(0, 0, 0))[/code].
+ This is equivalent to using [method body_add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="body_add_force">
+ <method name="body_add_constant_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="force" type="Vector3" />
<argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector3(0, 0, 0))[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="body_add_constant_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="Vector3" />
+ <description>
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]body_set_constant_torque(body, Vector3(0, 0, 0))[/code].
</description>
</method>
<method name="body_add_shape">
@@ -235,11 +247,13 @@
Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
- <method name="body_add_torque">
+ <method name="body_apply_central_force">
<return type="void" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="Vector3" />
+ <argument index="1" name="force" type="Vector3" />
<description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method body_apply_force] at the body's center of mass.
</description>
</method>
<method name="body_apply_central_impulse">
@@ -247,6 +261,19 @@
<argument index="0" name="body" type="RID" />
<argument index="1" name="impulse" type="Vector3" />
<description>
+ Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method body_apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="body_apply_force">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="force" type="Vector3" />
+ <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_apply_impulse">
@@ -255,7 +282,17 @@
<argument index="1" name="impulse" type="Vector3" />
<argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Gives the body a push at a [code]position[/code] in the direction of the [code]impulse[/code].
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="body_apply_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="Vector3" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="body_apply_torque_impulse">
@@ -263,7 +300,8 @@
<argument index="0" name="body" type="RID" />
<argument index="1" name="impulse" type="Vector3" />
<description>
- Gives the body a push to rotate it.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="body_attach_object_instance_id">
@@ -298,7 +336,22 @@
<argument index="0" name="body" type="RID" />
<description>
Returns the physics layer or layers a body can collide with.
--
+ </description>
+ </method>
+ <method name="body_get_constant_force" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Returns the body's total constant positional forces applied during each physics update.
+ See [method body_add_constant_force] and [method body_add_constant_central_force].
+ </description>
+ </method>
+ <method name="body_get_constant_torque" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Returns the body's total constant rotational forces applied during each physics update.
+ See [method body_add_constant_torque].
</description>
</method>
<method name="body_get_direct_state">
@@ -452,6 +505,24 @@
Sets the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_set_constant_force">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="force" type="Vector3" />
+ <description>
+ Sets the body's total constant positional forces applied during each physics update.
+ See [method body_add_constant_force] and [method body_add_constant_central_force].
+ </description>
+ </method>
+ <method name="body_set_constant_torque">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <argument index="1" name="torque" type="Vector3" />
+ <description>
+ Sets the body's total constant rotational forces applied during each physics update.
+ See [method body_add_constant_torque].
+ </description>
+ </method>
<method name="body_set_enable_continuous_collision_detection">
<return type="void" />
<argument index="0" name="body" type="RID" />
@@ -846,14 +917,6 @@
Activates or deactivates the 3D physics engine.
</description>
</method>
- <method name="set_collision_iterations">
- <return type="void" />
- <argument index="0" name="iterations" type="int" />
- <description>
- Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is [code]8[/code].
- [b]Note:[/b] Only has an effect when using the default GodotPhysics engine, not the Bullet physics engine.
- </description>
- </method>
<method name="shape_get_data" qualifiers="const">
<return type="Variant" />
<argument index="0" name="shape" type="RID" />
@@ -1152,16 +1215,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].
@@ -1341,24 +1404,25 @@
Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated.
</constant>
<constant name="SPACE_PARAM_CONTACT_MAX_SEPARATION" value="1" enum="SpaceParameter">
- Constant to set/get the maximum distance a shape can be from another before they are considered separated.
+ Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded.
</constant>
- <constant name="SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION" value="2" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION" value="2" enum="SpaceParameter">
Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision.
</constant>
- <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="3" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_CONTACT_DEFAULT_BIAS" value="3" enum="SpaceParameter">
+ Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision.
+ </constant>
+ <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="4" enum="SpaceParameter">
Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
</constant>
- <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="4" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="5" enum="SpaceParameter">
Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
</constant>
- <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="5" enum="SpaceParameter">
+ <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="6" enum="SpaceParameter">
Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time.
</constant>
- <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO" value="6" enum="SpaceParameter">
- </constant>
- <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7" enum="SpaceParameter">
- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
+ <constant name="SPACE_PARAM_SOLVER_ITERATIONS" value="7" enum="SpaceParameter">
+ Constant to set/get the number of solver iterations for contacts and constraints. The greater the amount of iterations, the more accurate the collisions and constraints will be. However, a greater amount of iterations requires more CPU power, which can decrease performance.
</constant>
<constant name="BODY_AXIS_LINEAR_X" value="1" enum="BodyAxis">
</constant>
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/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml
index 355365cf25..060641caff 100644
--- a/doc/classes/PhysicsTestMotionResult2D.xml
+++ b/doc/classes/PhysicsTestMotionResult2D.xml
@@ -12,55 +12,55 @@
<method name="get_collider" qualifiers="const">
<return type="Object" />
<description>
- Returns the colliding body's attached [Object], if a collision occured.
+ Returns the colliding body's attached [Object], if a collision occurred.
</description>
</method>
<method name="get_collider_id" qualifiers="const">
<return type="int" />
<description>
- Returns the unique instance ID of the colliding body's attached [Object], if a collision occured. See [method Object.get_instance_id].
+ Returns the unique instance ID of the colliding body's attached [Object], if a collision occurred. See [method Object.get_instance_id].
</description>
</method>
<method name="get_collider_rid" qualifiers="const">
<return type="RID" />
<description>
- Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occured.
+ Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occurred.
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<description>
- Returns the colliding body's shape index, if a collision occured. See [CollisionObject2D].
+ Returns the colliding body's shape index, if a collision occurred. See [CollisionObject2D].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the colliding body's velocity, if a collision occured.
+ Returns the colliding body's velocity, if a collision occurred.
</description>
</method>
<method name="get_collision_depth" qualifiers="const">
<return type="float" />
<description>
- Returns the length of overlap along the collision normal, if a collision occured.
+ Returns the length of overlap along the collision normal, if a collision occurred.
</description>
</method>
<method name="get_collision_local_shape" qualifiers="const">
<return type="int" />
<description>
- Returns the moving object's colliding shape, if a collision occured.
+ Returns the moving object's colliding shape, if a collision occurred.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the colliding body's shape's normal at the point of collision, if a collision occured.
+ Returns the colliding body's shape's normal at the point of collision, if a collision occurred.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the point of collision in global coordinates, if a collision occured.
+ Returns the point of collision in global coordinates, if a collision occurred.
</description>
</method>
<method name="get_collision_safe_fraction" qualifiers="const">
@@ -72,7 +72,7 @@
<method name="get_collision_unsafe_fraction" qualifiers="const">
<return type="float" />
<description>
- Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code].
+ Returns the minimum fraction of the motion needed to collide, if a collision occurred, between [code]0[/code] and [code]1[/code].
</description>
</method>
<method name="get_remainder" qualifiers="const">
diff --git a/doc/classes/PhysicsTestMotionResult3D.xml b/doc/classes/PhysicsTestMotionResult3D.xml
index 282c140568..96029937da 100644
--- a/doc/classes/PhysicsTestMotionResult3D.xml
+++ b/doc/classes/PhysicsTestMotionResult3D.xml
@@ -13,35 +13,35 @@
<return type="Object" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occured.
+ Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collider_id" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occured. See [method Object.get_instance_id].
+ Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. See [method Object.get_instance_id].
</description>
</method>
<method name="get_collider_rid" qualifiers="const">
<return type="RID" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occured.
+ Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occured. See [CollisionObject3D].
+ Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See [CollisionObject3D].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occured.
+ Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_count" qualifiers="const">
@@ -54,28 +54,28 @@
<return type="float" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occured.
+ Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_local_shape" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occured.
+ Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occured.
+ Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occured.
+ Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_safe_fraction" qualifiers="const">
@@ -87,7 +87,7 @@
<method name="get_collision_unsafe_fraction" qualifiers="const">
<return type="float" />
<description>
- Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code].
+ Returns the minimum fraction of the motion needed to collide, if a collision occurred, between [code]0[/code] and [code]1[/code].
</description>
</method>
<method name="get_remainder" qualifiers="const">
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/Popup.xml b/doc/classes/Popup.xml
index a47f72b2b6..dc5dd47287 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -9,14 +9,14 @@
<tutorials>
</tutorials>
<members>
- <member name="borderless" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
+ <member name="borderless" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
<member name="close_on_parent_focus" type="bool" setter="set_close_on_parent_focus" getter="get_close_on_parent_focus" default="true">
If [code]true[/code], the [Popup] will close when its parent is focused.
</member>
- <member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" />
- <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
- <member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
- <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" override="true" default="true" />
+ <member name="transient" type="bool" setter="set_transient" getter="is_transient" overrides="Window" default="true" />
+ <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" overrides="Window" default="true" />
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible" overrides="Window" default="false" />
+ <member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" overrides="Window" default="true" />
</members>
<signals>
<signal name="popup_hide">
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 4eb3ef34b4..b45f62394d 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -107,6 +107,7 @@
<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.
+ [b]Note:[/b] The provided [code]id[/code] is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the [code]index[/code] arguments in e.g. [method set_item_checked].
</description>
</method>
<method name="add_multistate_item">
@@ -181,7 +182,7 @@
</method>
<method name="clear_item_opentype_features">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Removes all OpenType features form the item's text.
</description>
@@ -194,49 +195,49 @@
</method>
<method name="get_item_accelerator" qualifiers="const">
<return type="int" enum="Key" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" 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.
+ Returns the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the icon of the item at index [code]idx[/code].
+ Returns the icon of the item at the given [code]index[/code].
</description>
</method>
<method name="get_item_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the id of the item at index [code]idx[/code]. [code]id[/code] can be manually assigned, while index can not.
+ Returns the id of the item at the given [code]index[/code]. [code]id[/code] can be manually assigned, while index can not.
</description>
</method>
<method name="get_item_index" qualifiers="const">
<return type="int" />
<argument index="0" name="id" type="int" />
<description>
- Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine. Index can not be set manually.
+ Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine and can not be set manually.
</description>
</method>
<method name="get_item_language" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns item's text language code.
</description>
</method>
<method name="get_item_metadata" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
</description>
</method>
<method name="get_item_opentype_feature" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="tag" type="String" />
<description>
Returns OpenType feature [code]tag[/code] of the item's text.
@@ -244,160 +245,161 @@
</method>
<method name="get_item_shortcut" qualifiers="const">
<return type="Shortcut" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the [Shortcut] associated with the specified [code]idx[/code] item.
+ Returns the [Shortcut] associated with the item at the given [code]index[/code].
</description>
</method>
<method name="get_item_submenu" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the submenu name of the item at index [code]idx[/code]. See [method add_submenu_item] for more info on how to add a submenu.
+ Returns the submenu name of the item at the given [code]index[/code]. See [method add_submenu_item] for more info on how to add a submenu.
</description>
</method>
<method name="get_item_text" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the text of the item at index [code]idx[/code].
+ Returns the text of the item at the given [code]index[/code].
</description>
</method>
<method name="get_item_text_direction" qualifiers="const">
<return type="int" enum="Control.TextDirection" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns item's text base writing direction.
</description>
</method>
<method name="get_item_tooltip" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns the tooltip associated with the specified index index [code]idx[/code].
+ Returns the tooltip associated with the item at the given [code]index[/code].
</description>
</method>
<method name="is_item_checkable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is checkable in some way, i.e. if it has a checkbox or radio button.
+ Returns [code]true[/code] if the item at the given [code]index[/code] is checkable in some way, i.e. if it has a checkbox or radio button.
[b]Note:[/b] Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="is_item_checked" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is checked.
+ Returns [code]true[/code] if the item at the given [code]index[/code] is checked.
</description>
</method>
<method name="is_item_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. When it is disabled it can't be selected, or its action invoked.
+ Returns [code]true[/code] if the item at the given [code]index[/code] is disabled. When it is disabled it can't be selected, or its action invoked.
See [method set_item_disabled] for more info on how to disable an item.
</description>
</method>
<method name="is_item_radio_checkable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] has radio button-style checkability.
+ Returns [code]true[/code] if the item at the given [code]index[/code] has radio button-style checkability.
[b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
</description>
</method>
<method name="is_item_separator" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns [code]true[/code] if the item is a separator. If it is, it will be displayed as a line. See [method add_separator] for more info on how to add a separator.
</description>
</method>
<method name="is_item_shortcut_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Returns [code]true[/code] if the specified item's shortcut is disabled.
</description>
</method>
<method name="remove_item">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Removes the item at index [code]idx[/code] from the menu.
+ Removes the item at the given [code]index[/code] from the menu.
[b]Note:[/b] The indices of items after the removed item will be shifted by one.
</description>
</method>
<method name="set_item_accelerator">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" 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.
+ Sets the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
<method name="set_item_as_checkable">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
- Sets whether the item at index [code]idx[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text.
+ Sets whether the item at the given [code]index[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text.
[b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="set_item_as_radio_checkable">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
- Sets the type of the item at the specified index [code]idx[/code] to radio button. If [code]false[/code], sets the type of the item to plain text.
+ Sets the type of the item at the given [code]index[/code] to radio button. If [code]false[/code], sets the type of the item to plain text.
</description>
</method>
<method name="set_item_as_separator">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="enable" type="bool" />
<description>
- Mark the item at index [code]idx[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text.
+ Mark the item at the given [code]index[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text.
</description>
</method>
<method name="set_item_checked">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="checked" type="bool" />
<description>
- Sets the checkstate status of the item at index [code]idx[/code].
+ Sets the checkstate status of the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_disabled">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="disabled" type="bool" />
<description>
- Enables/disables the item at index [code]idx[/code]. When it is disabled, it can't be selected and its action can't be invoked.
+ Enables/disables the item at the given [code]index[/code]. When it is disabled, it can't be selected and its action can't be invoked.
</description>
</method>
<method name="set_item_icon">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="icon" type="Texture2D" />
<description>
- Replaces the [Texture2D] icon of the specified [code]idx[/code].
+ Replaces the [Texture2D] icon of the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_id">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="id" type="int" />
<description>
- Sets the [code]id[/code] of the item at index [code]idx[/code].
+ Sets the [code]id[/code] of the item at the given [code]index[/code].
+ The [code]id[/code] is used in [signal id_pressed] and [signal id_focused] signals.
</description>
</method>
<method name="set_item_language">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="language" type="String" />
<description>
Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
@@ -405,7 +407,7 @@
</method>
<method name="set_item_metadata">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="metadata" type="Variant" />
<description>
Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.
@@ -413,7 +415,7 @@
</method>
<method name="set_item_multistate">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="state" type="int" />
<description>
Sets the state of a multistate item. See [method add_multistate_item] for details.
@@ -421,7 +423,7 @@
</method>
<method name="set_item_opentype_feature">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="tag" type="String" />
<argument index="2" name="value" type="int" />
<description>
@@ -430,40 +432,40 @@
</method>
<method name="set_item_shortcut">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="shortcut" type="Shortcut" />
<argument index="2" name="global" type="bool" default="false" />
<description>
- Sets a [Shortcut] for the specified item [code]idx[/code].
+ Sets a [Shortcut] for the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_shortcut_disabled">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="disabled" type="bool" />
<description>
- Disables the [Shortcut] of the specified index [code]idx[/code].
+ Disables the [Shortcut] of the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_submenu">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="submenu" type="String" />
<description>
- Sets the submenu of the item at index [code]idx[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked.
+ Sets the submenu of the item at the given [code]index[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked.
</description>
</method>
<method name="set_item_text">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="text" type="String" />
<description>
- Sets the text of the item at index [code]idx[/code].
+ Sets the text of the item at the given [code]index[/code].
</description>
</method>
<method name="set_item_text_direction">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="direction" type="int" enum="Control.TextDirection" />
<description>
Sets item's text base writing direction.
@@ -471,22 +473,22 @@
</method>
<method name="set_item_tooltip">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<argument index="1" name="tooltip" type="String" />
<description>
- Sets the [String] tooltip of the item at the specified index [code]idx[/code].
+ Sets the [String] tooltip of the item at the given [code]index[/code].
</description>
</method>
<method name="toggle_item_checked">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
- Toggles the check state of the item of the specified index [code]idx[/code].
+ Toggles the check state of the item at the given [code]index[/code].
</description>
</method>
<method name="toggle_item_multistate">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="index" type="int" />
<description>
Cycle to the next state of a multistate item. See [method add_multistate_item] for details.
</description>
@@ -505,7 +507,7 @@
<member name="hide_on_state_item_selection" type="bool" setter="set_hide_on_state_item_selection" getter="is_hide_on_state_item_selection" default="false">
If [code]true[/code], hides the [PopupMenu] when a state item is selected.
</member>
- <member name="items_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
+ <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
The number of items currently in the list.
</member>
<member name="submenu_popup_delay" type="float" setter="set_submenu_popup_delay" getter="get_submenu_popup_delay" default="0.3">
@@ -533,12 +535,6 @@
</signal>
</signals>
<theme_items>
- <theme_item name="checked" data_type="icon" type="Texture2D">
- [Texture2D] icon for the checked checkbox items.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] used for the menu items.
- </theme_item>
<theme_item name="font_accelerator_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.8)">
The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
</theme_item>
@@ -557,12 +553,6 @@
<theme_item name="font_separator_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
[Color] used for labeled separators' text. See [method add_separator].
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the menu items.
- </theme_item>
- <theme_item name="hover" data_type="style" type="StyleBox">
- [StyleBox] displayed when the [PopupMenu] item is hovered.
- </theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The horizontal space between the item's name and the shortcut text/submenu arrow.
</theme_item>
@@ -570,20 +560,20 @@
</theme_item>
<theme_item name="item_start_padding" data_type="constant" type="int" default="2">
</theme_item>
- <theme_item name="labeled_separator_left" data_type="style" type="StyleBox">
- [StyleBox] for the left side of labeled separator. See [method add_separator].
- </theme_item>
- <theme_item name="labeled_separator_right" data_type="style" type="StyleBox">
- [StyleBox] for the right side of labeled separator. See [method add_separator].
- </theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the item text outline.
</theme_item>
- <theme_item name="panel" data_type="style" type="StyleBox">
- Default [StyleBox] of the [PopupMenu] items.
+ <theme_item name="vseparation" data_type="constant" type="int" default="4">
+ The vertical space between each menu item.
</theme_item>
- <theme_item name="panel_disabled" data_type="style" type="StyleBox">
- [StyleBox] used when the [PopupMenu] item is disabled.
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] used for the menu items.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the menu items.
+ </theme_item>
+ <theme_item name="checked" data_type="icon" type="Texture2D">
+ [Texture2D] icon for the checked checkbox items.
</theme_item>
<theme_item name="radio_checked" data_type="icon" type="Texture2D">
[Texture2D] icon for the checked radio button items.
@@ -591,9 +581,6 @@
<theme_item name="radio_unchecked" data_type="icon" type="Texture2D">
[Texture2D] icon for the unchecked radio button items.
</theme_item>
- <theme_item name="separator" data_type="style" type="StyleBox">
- [StyleBox] used for the separators. See [method add_separator].
- </theme_item>
<theme_item name="submenu" data_type="icon" type="Texture2D">
[Texture2D] icon for the submenu arrow (for left-to-right layouts).
</theme_item>
@@ -603,8 +590,23 @@
<theme_item name="unchecked" data_type="icon" type="Texture2D">
[Texture2D] icon for the unchecked checkbox items.
</theme_item>
- <theme_item name="vseparation" data_type="constant" type="int" default="4">
- The vertical space between each menu item.
+ <theme_item name="hover" data_type="style" type="StyleBox">
+ [StyleBox] displayed when the [PopupMenu] item is hovered.
+ </theme_item>
+ <theme_item name="labeled_separator_left" data_type="style" type="StyleBox">
+ [StyleBox] for the left side of labeled separator. See [method add_separator].
+ </theme_item>
+ <theme_item name="labeled_separator_right" data_type="style" type="StyleBox">
+ [StyleBox] for the right side of labeled separator. See [method add_separator].
+ </theme_item>
+ <theme_item name="panel" data_type="style" type="StyleBox">
+ Default [StyleBox] of the [PopupMenu] items.
+ </theme_item>
+ <theme_item name="panel_disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the [PopupMenu] item is disabled.
+ </theme_item>
+ <theme_item name="separator" data_type="style" type="StyleBox">
+ [StyleBox] used for the separators. See [method add_separator].
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 6d63f56f1c..e9b3b887ae 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -34,7 +34,7 @@
</member>
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
- This gives the same result as using [constant BaseMaterial3D.CULL_BACK] in [member BaseMaterial3D.cull_mode].
+ This gives the same result as using [constant BaseMaterial3D.CULL_FRONT] in [member BaseMaterial3D.cull_mode].
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The current [Material] of the primitive mesh.
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 88132967a0..24cc490ce7 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -12,19 +12,10 @@
<member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible" default="true">
If [code]true[/code], the fill percentage is displayed on the bar.
</member>
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="0" />
- <member name="step" type="float" setter="set_step" getter="get_step" override="true" default="0.01" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="0.01" />
</members>
<theme_items>
- <theme_item name="bg" data_type="style" type="StyleBox">
- The style of the background.
- </theme_item>
- <theme_item name="fg" data_type="style" type="StyleBox">
- The style of the progress (i.e. the part that fills the bar).
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- Font used to draw the fill percentage if [member percent_visible] is [code]true[/code].
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
The color of the text.
</theme_item>
@@ -34,11 +25,20 @@
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The color of the text's shadow.
</theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ Font used to draw the fill percentage if [member percent_visible] is [code]true[/code].
+ </theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code].
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
+ <theme_item name="bg" data_type="style" type="StyleBox">
+ The style of the background.
+ </theme_item>
+ <theme_item name="fg" data_type="style" type="StyleBox">
+ The style of the progress (i.e. the part that fills the bar).
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index abdd8138ad..a249786388 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 = ""
@@ -188,6 +188,7 @@
ProjectSettings.SetSetting("application/config/name", "Example");
[/csharp]
[/codeblocks]
+ This can also be used to erase custom project settings. To do this change the setting value to [code]null[/code].
</description>
</method>
</methods>
@@ -196,13 +197,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 +224,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.
@@ -368,6 +373,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>
@@ -425,8 +433,9 @@
</member>
<member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0">
Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging.
- If [member display/window/vsync/vsync_mode] is set to [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate.
+ If [member display/window/vsync/vsync_mode] is set to [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. See also [member physics/common/physics_ticks_per_second].
This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non-real-time rendering of static frames, or test the project under lag conditions.
+ [b]Note:[/b] This property is only read when the project starts. To change the rendering FPS cap at runtime, set [member Engine.target_fps] instead.
</member>
<member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024">
Maximum call stack allowed for debugging GDScript.
@@ -495,7 +504,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">
@@ -1413,6 +1422,26 @@
<member name="physics/2d/sleep_threshold_linear" type="float" setter="" getter="" default="2.0">
Threshold linear velocity under which a 2D physics body will be considered inactive. See [constant PhysicsServer2D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD].
</member>
+ <member name="physics/2d/solver/contact_max_allowed_penetration" type="float" setter="" getter="" default="0.3">
+ Maximum distance a shape can penetrate another shape before it is considered a collision. See [constant PhysicsServer2D.SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION].
+ </member>
+ <member name="physics/2d/solver/contact_max_separation" type="float" setter="" getter="" default="1.5">
+ Maximum distance a shape can be from another before they are considered separated and the contact is discarded. See [constant PhysicsServer2D.SPACE_PARAM_CONTACT_MAX_SEPARATION].
+ </member>
+ <member name="physics/2d/solver/contact_recycle_radius" type="float" setter="" getter="" default="1.0">
+ Maximum distance a pair of bodies has to move before their collision status has to be recalculated. See [constant PhysicsServer2D.SPACE_PARAM_CONTACT_RECYCLE_RADIUS].
+ </member>
+ <member name="physics/2d/solver/default_constraint_bias" type="float" setter="" getter="" default="0.2">
+ Default solver bias for all physics constraints. Defines how much bodies react to enforce constraints. See [constant PhysicsServer2D.SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS].
+ Individual constraints can have a specific bias value (see [member Joint2D.bias]).
+ </member>
+ <member name="physics/2d/solver/default_contact_bias" type="float" setter="" getter="" default="0.8">
+ Default solver bias for all physics contacts. Defines how much bodies react to enforce contact separation. See [constant PhysicsServer2D.SPACE_PARAM_CONTACT_DEFAULT_BIAS].
+ Individual shapes can have a specific bias value (see [member Shape2D.custom_solver_bias]).
+ </member>
+ <member name="physics/2d/solver/solver_iterations" type="int" setter="" getter="" default="16">
+ Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer2D.SPACE_PARAM_SOLVER_ITERATIONS].
+ </member>
<member name="physics/2d/time_before_sleep" type="float" setter="" getter="" default="0.5">
Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See [constant PhysicsServer2D.SPACE_PARAM_BODY_TIME_TO_SLEEP].
</member>
@@ -1460,10 +1489,29 @@
Sets whether 3D physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process.
</member>
<member name="physics/3d/sleep_threshold_angular" type="float" setter="" getter="" default="0.139626">
+ Threshold angular velocity under which a 3D physics body will be considered inactive. See [constant PhysicsServer3D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD].
</member>
<member name="physics/3d/sleep_threshold_linear" type="float" setter="" getter="" default="0.1">
+ Threshold linear velocity under which a 3D physics body will be considered inactive. See [constant PhysicsServer3D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD].
+ </member>
+ <member name="physics/3d/solver/contact_max_allowed_penetration" type="float" setter="" getter="" default="0.01">
+ Maximum distance a shape can penetrate another shape before it is considered a collision. See [constant PhysicsServer3D.SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION].
+ </member>
+ <member name="physics/3d/solver/contact_max_separation" type="float" setter="" getter="" default="0.05">
+ Maximum distance a shape can be from another before they are considered separated and the contact is discarded. See [constant PhysicsServer3D.SPACE_PARAM_CONTACT_MAX_SEPARATION].
+ </member>
+ <member name="physics/3d/solver/contact_recycle_radius" type="float" setter="" getter="" default="0.01">
+ Maximum distance a pair of bodies has to move before their collision status has to be recalculated. See [constant PhysicsServer3D.SPACE_PARAM_CONTACT_RECYCLE_RADIUS].
+ </member>
+ <member name="physics/3d/solver/default_contact_bias" type="float" setter="" getter="" default="0.8">
+ Default solver bias for all physics contacts. Defines how much bodies react to enforce contact separation. See [constant PhysicsServer3D.SPACE_PARAM_CONTACT_DEFAULT_BIAS].
+ Individual shapes can have a specific bias value (see [member Shape3D.custom_solver_bias]).
+ </member>
+ <member name="physics/3d/solver/solver_iterations" type="int" setter="" getter="" default="16">
+ Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer3D.SPACE_PARAM_SOLVER_ITERATIONS].
</member>
<member name="physics/3d/time_before_sleep" type="float" setter="" getter="" default="0.5">
+ Time (in seconds) of inactivity before which a 3D physics body will put to sleep. See [constant PhysicsServer3D.SPACE_PARAM_BODY_TIME_TO_SLEEP].
</member>
<member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true">
Enables [member Viewport.physics_object_picking] on the root viewport.
@@ -1474,8 +1522,9 @@
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead.
</member>
<member name="physics/common/physics_ticks_per_second" type="int" setter="" getter="" default="60">
- The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run.
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. See also [member debug/settings/fps/force_fps].
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_ticks_per_second] instead.
+ [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics/common/physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS.
</member>
<member name="rendering/2d/opengl/batching_send_null" type="int" setter="" getter="" default="0">
</member>
@@ -1499,12 +1548,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.
@@ -1553,11 +1598,9 @@
<member name="rendering/camera/depth_of_field/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false">
If [code]true[/code], jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples.
</member>
- <member name="rendering/driver/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default="&quot;PowerVR,Mali,Adreno,Apple&quot;">
- Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this.
- </member>
<member name="rendering/driver/depth_prepass/enable" type="bool" setter="" getter="" default="true">
- If [code]true[/code], performs a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used.
+ If [code]true[/code], performs a previous depth pass before rendering 3D materials. This increases performance significantly in scenes with high overdraw, when complex materials and lighting are used. However, in scenes with few occluded surfaces, the depth prepass may reduce performance. If your game is viewed from a fixed angle that makes it easy to avoid overdraw (such as top-down or side-scrolling perspective), consider disabling the depth prepass to improve performance. This setting can be changed at run-time to optimize performance depending on the scene currently being viewed.
+ [b]Note:[/b] Only supported when using the Vulkan Clustered backend (not Vulkan Mobile or OpenGL). When using Vulkan Mobile or OpenGL, there is no depth prepass performed.
</member>
<member name="rendering/driver/driver_name" type="String" setter="" getter="" default="&quot;vulkan&quot;">
The video driver to use.
@@ -1573,7 +1616,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.
@@ -1608,6 +1651,24 @@
<member name="rendering/environment/ssao/quality" type="int" setter="" getter="" default="2">
Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssao/adaptive_target] setting.
</member>
+ <member name="rendering/environment/ssil/adaptive_target" type="float" setter="" getter="" default="0.5">
+ Quality target to use when [member rendering/environment/ssil/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. When using the adaptive target, the performance cost scales with the complexity of the scene.
+ </member>
+ <member name="rendering/environment/ssil/blur_passes" type="int" setter="" getter="" default="4">
+ Number of blur passes to use when computing screen-space indirect lighting. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail.
+ </member>
+ <member name="rendering/environment/ssil/fadeout_from" type="float" setter="" getter="" default="50.0">
+ Distance at which the screen-space indirect lighting effect starts to fade out. Use this hide screen-space indirect lighting at great distances.
+ </member>
+ <member name="rendering/environment/ssil/fadeout_to" type="float" setter="" getter="" default="300.0">
+ Distance at which the screen-space indirect lighting is fully faded out. Use this hide screen-space indirect lighting at great distances.
+ </member>
+ <member name="rendering/environment/ssil/half_size" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], screen-space indirect lighting will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details and may result in some objects appearing to glow at their edges.
+ </member>
+ <member name="rendering/environment/ssil/quality" type="int" setter="" getter="" default="2">
+ Sets the quality of the screen-space indirect lighting effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssil/adaptive_target] setting.
+ </member>
<member name="rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale" type="float" setter="" getter="" default="0.01">
Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth.
</member>
@@ -1631,6 +1692,8 @@
<member name="rendering/gles2/compatibility/enable_high_float.Android" type="bool" setter="" getter="" default="false">
</member>
<member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting.
+ [b]Note:[/b] This property is only read when the project starts. To set half-resolution GI at run-time, call [method RenderingServer.gi_set_use_half_resolution] instead.
</member>
<member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4">
</member>
@@ -1677,6 +1740,9 @@
<member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600">
</member>
<member name="rendering/mesh_lod/lod_change/threshold_pixels" type="float" setter="" getter="" default="1.0">
+ The automatic LOD bias to use for meshes rendered within the [ReflectionProbe]. Higher values will use less detailed versions of meshes that have LOD variations generated. If set to [code]0.0[/code], automatic LOD is disabled. Increase [member rendering/mesh_lod/lod_change/threshold_pixels] to improve performance at the cost of geometry detail.
+ [b]Note:[/b] [member rendering/mesh_lod/lod_change/threshold_pixels] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD).
+ [b]Note:[/b] This property is only read when the project starts. To adjust the automatic LOD threshold at runtime, set [member Viewport.mesh_lod_threshold] on the root [Viewport].
</member>
<member name="rendering/occlusion_culling/bvh_build_quality" type="int" setter="" getter="" default="2">
</member>
@@ -1711,6 +1777,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/ProximityGroup3D.xml b/doc/classes/ProximityGroup3D.xml
deleted file mode 100644
index 15735bd6f6..0000000000
--- a/doc/classes/ProximityGroup3D.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProximityGroup3D" inherits="Node3D" version="4.0">
- <brief_description>
- General-purpose proximity detection node.
- </brief_description>
- <description>
- General-purpose proximity detection node.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="broadcast">
- <return type="void" />
- <argument index="0" name="method" type="String" />
- <argument index="1" name="parameters" type="Variant" />
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="dispatch_mode" type="int" setter="set_dispatch_mode" getter="get_dispatch_mode" enum="ProximityGroup3D.DispatchMode" default="0">
- </member>
- <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius" default="Vector3(1, 1, 1)">
- </member>
- <member name="group_name" type="String" setter="set_group_name" getter="get_group_name" default="&quot;&quot;">
- </member>
- </members>
- <signals>
- <signal name="broadcast">
- <argument index="0" name="method" type="String" />
- <argument index="1" name="parameters" type="Array" />
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="MODE_PROXY" value="0" enum="DispatchMode">
- </constant>
- <constant name="MODE_SIGNAL" value="1" enum="DispatchMode">
- </constant>
- </constants>
-</class>
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/RDFramebufferPass.xml b/doc/classes/RDFramebufferPass.xml
index 4469a5d447..33e4248983 100644
--- a/doc/classes/RDFramebufferPass.xml
+++ b/doc/classes/RDFramebufferPass.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
This class contains the list of attachment descriptions for a framebuffer pass. Each points with an index to a previously supplied list of texture attachments.
- Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage.
+ Multipass framebuffers can optimize some configurations in mobile, on desktop they provide little to no advantage.
</description>
<tutorials>
</tutorials>
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 d7540ef206..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">
@@ -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.
diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml
index f15643c93f..8a8d6e73f0 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>
@@ -38,8 +38,7 @@
<method name="force_raycast_update">
<return type="void" />
<description>
- Updates the collision information for the ray.
- Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
+ Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state.
[b]Note:[/b] [member enabled] does not need to be [code]true[/code] for this to work.
</description>
</method>
@@ -112,7 +111,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.
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index ad88551d9d..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">
@@ -194,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 ==">
@@ -211,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 f5ea6a6c87..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">
@@ -184,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 ==">
@@ -195,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..5d207c0db7 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -1,33 +1,39 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ReflectionProbe" inherits="VisualInstance3D" version="4.0">
<brief_description>
- Captures its surroundings to create reflections.
+ Captures its surroundings to create fast, accurate reflections from a given point.
</brief_description>
<description>
Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses.
- 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.
+ The [ReflectionProbe] is used to create high-quality reflections at a low performance cost (when [member update_mode] is [constant UPDATE_ONCE]). [ReflectionProbe]s can be blended together and with the rest of the scene smoothly. [ReflectionProbe]s can also be combined with [VoxelGI], SDFGI ([member Environment.sdfgi_enabled]) and screen-space reflections ([member Environment.ss_reflections_enabled]) to get more accurate reflections in specific areas. [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 as-is.
+ [b]Note:[/b] Unlike [VoxelGI] and SDFGI, [ReflectionProbe]s only source their environment from a [WorldEnvironment] node. If you specify an [Environment] resource within a [Camera3D] node, it will be ignored by the [ReflectionProbe]. This can lead to incorrect lighting within the [ReflectionProbe].
</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)">
+ The custom ambient color to use within the [ReflectionProbe]'s [member extents]. Only effective if [member ambient_mode] is [constant AMBIENT_COLOR].
</member>
<member name="ambient_color_energy" type="float" setter="set_ambient_color_energy" getter="get_ambient_color_energy" default="1.0">
+ The custom ambient color energy to use within the [ReflectionProbe]'s [member extents]. Only effective if [member ambient_mode] is [constant AMBIENT_COLOR].
</member>
<member name="ambient_mode" type="int" setter="set_ambient_mode" getter="get_ambient_mode" enum="ReflectionProbe.AmbientMode" default="1">
+ The ambient color to use within the [ReflectionProbe]'s [member extents]. The ambient color will smoothly blend with other [ReflectionProbe]s and the rest of the scene (outside the [ReflectionProbe]'s [member extents]).
</member>
<member name="box_projection" type="bool" setter="set_enable_box_projection" getter="is_box_projection_enabled" default="false">
If [code]true[/code], enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location.
+ [b]Note:[/b] To better fit rectangle-shaped rooms that are not aligned to the grid, you can rotate the [ReflectionProbe] node.
</member>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
- Sets the cull mask which determines what objects are drawn by this probe. Every [VisualInstance3D] with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost.
+ Sets the cull mask which determines what objects are drawn by this probe. Every [VisualInstance3D] with a layer included in this cull mask will be rendered by the probe. To improve performance, it is best to only include large objects which are likely to take up a lot of space in the reflection.
</member>
<member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled" default="false">
If [code]true[/code], computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [constant UPDATE_ALWAYS] [member update_mode].
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(10, 10, 10)">
The size of the reflection probe. The larger the extents, the more space covered by the probe, which will lower the perceived resolution. It is best to keep the extents only as large as you need them.
+ [b]Note:[/b] To better fit areas that are not aligned to the grid, you can rotate the [ReflectionProbe] node.
</member>
<member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0">
Defines the reflection intensity. Intensity modulates the strength of the reflection.
@@ -35,30 +41,35 @@
<member name="interior" type="bool" setter="set_as_interior" getter="is_set_as_interior" default="false">
If [code]true[/code], reflections will ignore sky contribution.
</member>
- <member name="lod_threshold" type="float" setter="set_lod_threshold" getter="get_lod_threshold" default="1.0">
- </member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
- Sets the max distance away from the probe an object can be before it is culled.
+ The maximum distance away from the [ReflectionProbe] an object can be before it is culled. Decrease this to improve performance, especially when using the [constant UPDATE_ALWAYS] [member update_mode].
+ </member>
+ <member name="mesh_lod_threshold" type="float" setter="set_mesh_lod_threshold" getter="get_mesh_lod_threshold" default="1.0">
+ The automatic LOD bias to use for meshes rendered within the [ReflectionProbe] (this is analog to [member Viewport.mesh_lod_threshold]). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to [code]0.0[/code], automatic LOD is disabled. Increase [member mesh_lod_threshold] to improve performance at the cost of geometry detail, especially when using the [constant UPDATE_ALWAYS] [member update_mode].
+ [b]Note:[/b] [member mesh_lod_threshold] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD).
</member>
<member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3(0, 0, 0)">
- Sets the origin offset to be used when this reflection probe is in box project mode.
+ Sets the origin offset to be used when this [ReflectionProbe] is in [member box_projection] mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the amount of objects that "get in the way" of the reflection.
</member>
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode" default="0">
- Sets how frequently the probe is updated. Can be [constant UPDATE_ONCE] or [constant UPDATE_ALWAYS].
+ Sets how frequently the [ReflectionProbe] is updated. Can be [constant UPDATE_ONCE] or [constant UPDATE_ALWAYS].
</member>
</members>
<constants>
<constant name="UPDATE_ONCE" value="0" enum="UpdateMode">
- Update the probe once on the next frame. The corresponding radiance map will be generated over the following six frames. This is slower to update than [constant UPDATE_ALWAYS] but can result in higher quality reflections.
+ Update the probe once on the next frame (recommended for most objects). The corresponding radiance map will be generated over the following six frames. This takes more time to update than [constant UPDATE_ALWAYS], but it has a lower performance cost and can result in higher-quality reflections. The ReflectionProbe is updated when its transform changes, but not when nearby geometry changes. You can force a [ReflectionProbe] update by moving the [ReflectionProbe] slightly in any direction.
</constant>
<constant name="UPDATE_ALWAYS" value="1" enum="UpdateMode">
- Update the probe every frame. This is needed when you want to capture dynamic objects. However, it results in an increased render time. Use [constant UPDATE_ONCE] whenever possible.
+ Update the probe every frame. This provides better results for fast-moving dynamic objects (such as cars). However, it has a significant performance cost. Due to the cost, it's recommended to only use one ReflectionProbe with [constant UPDATE_ALWAYS] at most per scene. For all other use cases, use [constant UPDATE_ONCE].
</constant>
<constant name="AMBIENT_DISABLED" value="0" enum="AmbientMode">
+ Do not apply any ambient lighting inside the [ReflectionProbe]'s [member extents].
</constant>
<constant name="AMBIENT_ENVIRONMENT" value="1" enum="AmbientMode">
+ Apply automatically-sourced environment lighting inside the [ReflectionProbe]'s [member extents].
</constant>
<constant name="AMBIENT_COLOR" value="2" enum="AmbientMode">
+ Apply custom ambient lighting inside the [ReflectionProbe]'s [member extents]. See [member ambient_color] and [member ambient_color_energy].
</constant>
</constants>
</class>
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 442dcc7d18..31c372ec80 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -560,7 +560,8 @@
<argument index="1" name="with_texture" type="RID" />
<argument index="2" name="layer" type="int" />
<argument index="3" name="mipmap" type="int" />
- <argument index="4" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0" />
+ <argument index="4" name="mipmaps" type="int" default="1" />
+ <argument index="5" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0" />
<description>
</description>
</method>
@@ -654,6 +655,24 @@
</constant>
<constant name="BARRIER_MASK_NO_BARRIER" value="8">
</constant>
+ <constant name="DEVICE_TYPE_OTHER" value="0" enum="DeviceType">
+ Rendering device type does not match any of the other enum values or is unknown.
+ </constant>
+ <constant name="DEVICE_TYPE_INTEGRATED_GPU" value="1" enum="DeviceType">
+ Rendering device is an integrated GPU, which is typically [i](but not always)[/i] slower than dedicated GPUs ([constant DEVICE_TYPE_DISCRETE_GPU]). On Android and iOS, the rendering device type is always considered to be [constant DEVICE_TYPE_INTEGRATED_GPU].
+ </constant>
+ <constant name="DEVICE_TYPE_DISCRETE_GPU" value="2" enum="DeviceType">
+ Rendering device is a dedicated GPU, which is typically [i](but not always)[/i] faster than integrated GPUs ([constant DEVICE_TYPE_INTEGRATED_GPU]).
+ </constant>
+ <constant name="DEVICE_TYPE_VIRTUAL_GPU" value="3" enum="DeviceType">
+ Rendering device is an emulated GPU in a virtual environment. This is typically much slower than the host GPU, which means the expected performance level on a dedicated GPU will be roughly equivalent to [constant DEVICE_TYPE_INTEGRATED_GPU]. Virtual machine GPU passthrough (such as VFIO) will not report the device type as [constant DEVICE_TYPE_VIRTUAL_GPU]. Instead, the host GPU's device type will be reported as if the GPU was not emulated.
+ </constant>
+ <constant name="DEVICE_TYPE_CPU" value="4" enum="DeviceType">
+ Rendering device is provided by software emulation (such as Lavapipe or [url=https://github.com/google/swiftshader]SwiftShader[/url]). This is the slowest kind of rendering device available; it's typically much slower than [constant DEVICE_TYPE_INTEGRATED_GPU].
+ </constant>
+ <constant name="DEVICE_TYPE_MAX" value="5" enum="DeviceType">
+ Represents the size of the [enum DeviceType] enum.
+ </constant>
<constant name="DRIVER_RESOURCE_VULKAN_DEVICE" value="0" enum="DriverResource">
</constant>
<constant name="DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE" value="1" enum="DriverResource">
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index ddb25788c8..009e9d3df4 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">
@@ -1068,7 +1068,7 @@
<argument index="8" name="light_affect" type="float" />
<argument index="9" name="ao_channel_affect" type="float" />
<description>
- Sets the variables to be used with the "screen space ambient occlusion" post-process effect. See [Environment] for more details.
+ Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssao_quality">
@@ -1080,6 +1080,19 @@
<argument index="4" name="fadeout_from" type="float" />
<argument index="5" name="fadeout_to" type="float" />
<description>
+ Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details.
+ </description>
+ </method>
+ <method name="environment_set_ssil_quality">
+ <return type="void" />
+ <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSILQuality" />
+ <argument index="1" name="half_size" type="bool" />
+ <argument index="2" name="adaptive_target" type="float" />
+ <argument index="3" name="blur_passes" type="int" />
+ <argument index="4" name="fadeout_from" type="float" />
+ <argument index="5" name="fadeout_to" type="float" />
+ <description>
+ Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssr">
@@ -1232,6 +1245,13 @@
[b]Note:[/b] When running a headless or server binary, this function returns an empty string.
</description>
</method>
+ <method name="get_video_adapter_type" qualifiers="const">
+ <return type="int" enum="RenderingDevice.DeviceType" />
+ <description>
+ Returns the type of the video adapter. Since dedicated graphics cards from a given generation will [i]usually[/i] be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings.
+ [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [constant RenderingDevice.DEVICE_TYPE_OTHER].
+ </description>
+ </method>
<method name="get_video_adapter_vendor" qualifiers="const">
<return type="String" />
<description>
@@ -1245,6 +1265,13 @@
Returns the id of a white texture. Creates one if none exists.
</description>
</method>
+ <method name="gi_set_use_half_resolution">
+ <return type="void" />
+ <argument index="0" name="half_resolution" type="bool" />
+ <description>
+ If [code]half_resolution[/code] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. See also [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution].
+ </description>
+ </method>
<method name="global_variable_add">
<return type="void" />
<argument index="0" name="name" type="StringName" />
@@ -1396,6 +1423,14 @@
<description>
</description>
</method>
+ <method name="instance_geometry_set_material_overlay">
+ <return type="void" />
+ <argument index="0" name="instance" type="RID" />
+ <argument index="1" name="material" type="RID" />
+ <description>
+ Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_overlay].
+ </description>
+ </method>
<method name="instance_geometry_set_material_override">
<return type="void" />
<argument index="0" name="instance" type="RID" />
@@ -2535,19 +2570,19 @@
Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity].
</description>
</method>
- <method name="reflection_probe_set_lod_threshold">
+ <method name="reflection_probe_set_max_distance">
<return type="void" />
<argument index="0" name="probe" type="RID" />
- <argument index="1" name="pixels" type="float" />
+ <argument index="1" name="distance" type="float" />
<description>
+ Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance].
</description>
</method>
- <method name="reflection_probe_set_max_distance">
+ <method name="reflection_probe_set_mesh_lod_threshold">
<return type="void" />
<argument index="0" name="probe" type="RID" />
- <argument index="1" name="distance" type="float" />
+ <argument index="1" name="pixels" type="float" />
<description>
- Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance].
</description>
</method>
<method name="reflection_probe_set_origin_offset">
@@ -3100,6 +3135,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" />
@@ -3151,12 +3202,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">
@@ -3844,6 +3904,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>
@@ -3968,28 +4036,31 @@
<constant name="VIEWPORT_DEBUG_DRAW_SSAO" value="12" enum="ViewportDebugDraw">
Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment].
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_PSSM_SPLITS" value="13" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_SSIL" value="13" enum="ViewportDebugDraw">
+ Draws the screen space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssil_enabled] set in your [WorldEnvironment].
+ </constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_PSSM_SPLITS" value="14" enum="ViewportDebugDraw">
Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_DECAL_ATLAS" value="14" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_DECAL_ATLAS" value="15" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_SDFGI" value="15" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_SDFGI" value="16" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_SDFGI_PROBES" value="16" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_SDFGI_PROBES" value="17" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="17" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="18" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_DISABLE_LOD" value="18" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_DISABLE_LOD" value="19" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="19" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="20" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="20" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="21" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS" value="21" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS" value="22" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="23" enum="ViewportDebugDraw">
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="23" enum="ViewportDebugDraw">
+ <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="24" enum="ViewportDebugDraw">
</constant>
<constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode">
</constant>
@@ -4080,19 +4151,34 @@
<constant name="ENV_SSR_ROUGNESS_QUALITY_HIGH" value="3" enum="EnvironmentSSRRoughnessQuality">
</constant>
<constant name="ENV_SSAO_QUALITY_VERY_LOW" value="0" enum="EnvironmentSSAOQuality">
- Lowest quality of screen space ambient occlusion.
+ Lowest quality of screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_LOW" value="1" enum="EnvironmentSSAOQuality">
- Low quality screen space ambient occlusion.
+ Low quality screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_MEDIUM" value="2" enum="EnvironmentSSAOQuality">
- Medium quality screen space ambient occlusion.
+ Medium quality screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_HIGH" value="3" enum="EnvironmentSSAOQuality">
- High quality screen space ambient occlusion.
+ High quality screen-space ambient occlusion.
</constant>
<constant name="ENV_SSAO_QUALITY_ULTRA" value="4" enum="EnvironmentSSAOQuality">
- Highest quality screen space ambient occlusion. Uses the adaptive setting which can be dynamically adjusted to smoothly balance performance and visual quality.
+ Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_VERY_LOW" value="0" enum="EnvironmentSSILQuality">
+ Lowest quality of screen-space indirect lighting.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_LOW" value="1" enum="EnvironmentSSILQuality">
+ Low quality screen-space indirect lighting.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_MEDIUM" value="2" enum="EnvironmentSSILQuality">
+ High quality screen-space indirect lighting.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_HIGH" value="3" enum="EnvironmentSSILQuality">
+ High quality screen-space indirect lighting.
+ </constant>
+ <constant name="ENV_SSIL_QUALITY_ULTRA" value="4" enum="EnvironmentSSILQuality">
+ Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
</constant>
<constant name="ENV_SDFGI_CASCADES_4" value="0" enum="EnvironmentSDFGICascades">
</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..c8ed373271 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>
@@ -22,7 +22,7 @@
<argument index="1" name="width" type="int" default="0" />
<argument index="2" name="height" type="int" default="0" />
<argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="4" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image.
If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
@@ -97,7 +97,7 @@
Returns the total number of characters from text tags. Does not include BBCodes.
</description>
</method>
- <method name="get_v_scroll">
+ <method name="get_v_scroll_bar">
<return type="VScrollBar" />
<description>
Returns the vertical scrollbar.
@@ -279,7 +279,7 @@
</method>
<method name="push_paragraph">
<return type="void" />
- <argument index="0" name="align" type="int" enum="RichTextLabel.Align" />
+ <argument index="0" name="alignment" type="int" enum="HorizontalAlignment" />
<argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" />
<argument index="2" name="language" type="String" default="&quot;&quot;" />
<argument index="3" name="st_parser" type="int" enum="Control.StructuredTextParser" default="0" />
@@ -296,7 +296,7 @@
<method name="push_table">
<return type="void" />
<argument index="0" name="columns" type="int" />
- <argument index="1" name="inline_align" type="int" enum="InlineAlign" default="0" />
+ <argument index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" />
<description>
Adds a [code][table=columns,inline_align][/code] tag to the tag stack.
</description>
@@ -399,7 +399,7 @@
The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.
[b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
</member>
- <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
+ <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true">
If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line].
</member>
@@ -429,6 +429,9 @@
The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed.
[b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
</member>
+ <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="RichTextLabel.VisibleCharactersBehavior" default="0">
+ Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum VisibleCharactersBehavior] for more info.
+ </member>
</members>
<signals>
<signal name="meta_clicked">
@@ -451,18 +454,6 @@
</signal>
</signals>
<constants>
- <constant name="ALIGN_LEFT" value="0" enum="Align">
- Makes text left aligned.
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="Align">
- Makes text centered.
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="Align">
- Makes text right aligned.
- </constant>
- <constant name="ALIGN_FILL" value="3" enum="Align">
- Makes text fill width.
- </constant>
<constant name="LIST_NUMBERS" value="0" enum="ListType">
Each list item has a number marker.
</constant>
@@ -527,26 +518,26 @@
</constant>
<constant name="ITEM_CUSTOMFX" value="25" enum="ItemType">
</constant>
+ <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
+ Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
+ </constant>
+ <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
+ Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
+ </constant>
+ <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
+ </constant>
+ <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left.
+ </constant>
+ <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the right.
+ </constant>
</constants>
<theme_items>
- <theme_item name="bold_font" data_type="font" type="Font">
- The font used for bold text.
- </theme_item>
- <theme_item name="bold_font_size" data_type="font_size" type="int">
- The font size used for bold text.
- </theme_item>
- <theme_item name="bold_italics_font" data_type="font" type="Font">
- The font used for bold italics text.
- </theme_item>
- <theme_item name="bold_italics_font_size" data_type="font_size" type="int">
- The font size used for bold italics text.
- </theme_item>
<theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The default text color.
</theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- The background The background used when the [RichTextLabel] is focused.
- </theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The default tint of text outline.
</theme_item>
@@ -556,36 +547,24 @@
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
The color of the font's shadow.
</theme_item>
- <theme_item name="italics_font" data_type="font" type="Font">
- The font used for italics text.
- </theme_item>
- <theme_item name="italics_font_size" data_type="font_size" type="int">
- The font size used for italics text.
- </theme_item>
- <theme_item name="line_separation" data_type="constant" type="int" default="0">
- The vertical space between lines.
- </theme_item>
- <theme_item name="mono_font" data_type="font" type="Font">
- The font used for monospace text.
+ <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.1, 0.1, 1, 0.8)">
+ The color of the selection box.
</theme_item>
- <theme_item name="mono_font_size" data_type="font_size" type="int">
- The font size used for monospace text.
+ <theme_item name="table_border" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ The default cell border color.
</theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- The normal background for the [RichTextLabel].
+ <theme_item name="table_even_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ The default background color for even rows.
</theme_item>
- <theme_item name="normal_font" data_type="font" type="Font">
- The default text font.
+ <theme_item name="table_odd_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ The default background color for odd rows.
</theme_item>
- <theme_item name="normal_font_size" data_type="font_size" type="int">
- The default text font size.
+ <theme_item name="line_separation" data_type="constant" type="int" default="0">
+ The vertical space between lines.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.1, 0.1, 1, 0.8)">
- The color of the selection box.
- </theme_item>
<theme_item name="shadow_offset_x" data_type="constant" type="int" default="1">
The horizontal offset of the font's shadow.
</theme_item>
@@ -595,20 +574,47 @@
<theme_item name="shadow_outline_size" data_type="constant" type="int" default="1">
The size of the shadow outline.
</theme_item>
- <theme_item name="table_border" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
- The default cell border color.
- </theme_item>
- <theme_item name="table_even_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
- The default background color for even rows.
- </theme_item>
<theme_item name="table_hseparation" data_type="constant" type="int" default="3">
The horizontal separation of elements in a table.
</theme_item>
- <theme_item name="table_odd_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
- The default background color for odd rows.
- </theme_item>
<theme_item name="table_vseparation" data_type="constant" type="int" default="3">
The vertical separation of elements in a table.
</theme_item>
+ <theme_item name="bold_font" data_type="font" type="Font">
+ The font used for bold text.
+ </theme_item>
+ <theme_item name="bold_italics_font" data_type="font" type="Font">
+ The font used for bold italics text.
+ </theme_item>
+ <theme_item name="italics_font" data_type="font" type="Font">
+ The font used for italics text.
+ </theme_item>
+ <theme_item name="mono_font" data_type="font" type="Font">
+ The font used for monospace text.
+ </theme_item>
+ <theme_item name="normal_font" data_type="font" type="Font">
+ The default text font.
+ </theme_item>
+ <theme_item name="bold_font_size" data_type="font_size" type="int">
+ The font size used for bold text.
+ </theme_item>
+ <theme_item name="bold_italics_font_size" data_type="font_size" type="int">
+ The font size used for bold italics text.
+ </theme_item>
+ <theme_item name="italics_font_size" data_type="font_size" type="int">
+ The font size used for italics text.
+ </theme_item>
+ <theme_item name="mono_font_size" data_type="font_size" type="int">
+ The font size used for monospace text.
+ </theme_item>
+ <theme_item name="normal_font_size" data_type="font_size" type="int">
+ The default text font size.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ The background used when the [RichTextLabel] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ The normal background for the [RichTextLabel].
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/RigidDynamicBody2D.xml b/doc/classes/RigidDynamicBody2D.xml
index b8680b99b3..b3644711a0 100644
--- a/doc/classes/RigidDynamicBody2D.xml
+++ b/doc/classes/RigidDynamicBody2D.xml
@@ -22,26 +22,36 @@
Allows you to read and safely modify the simulation state for the object. Use this instead of [method Node._physics_process] if you need to directly change the body's [code]position[/code] or other physics properties. By default, it works in addition to the usual physics behavior, but [member custom_integrator] allows you to disable the default behavior and write custom force integration for a body.
</description>
</method>
- <method name="add_central_force">
+ <method name="add_constant_central_force">
<return type="void" />
<argument index="0" name="force" type="Vector2" />
<description>
- Adds a constant directional force without affecting rotation.
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
+ This is equivalent to using [method add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="add_force">
+ <method name="add_constant_force">
<return type="void" />
<argument index="0" name="force" type="Vector2" />
<argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
- <method name="add_torque">
+ <method name="add_constant_torque">
<return type="void" />
<argument index="0" name="torque" type="float" />
<description>
- Adds a constant rotational force.
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = 0[/code].
+ </description>
+ </method>
+ <method name="apply_central_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" />
+ <description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method apply_force] at the body's center of mass.
</description>
</method>
<method name="apply_central_impulse">
@@ -49,6 +59,17 @@
<argument index="0" name="impulse" type="Vector2" default="Vector2(0, 0)" />
<description>
Applies a directional impulse without affecting rotation.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="apply_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector2" />
+ <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -56,14 +77,24 @@
<argument index="0" name="impulse" type="Vector2" />
<argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="apply_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="float" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
<argument index="0" name="torque" type="float" />
<description>
- Applies a rotational impulse to the body.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
@@ -90,13 +121,7 @@
Defines how [member angular_damp] is applied. See [enum DampMode] for possible values.
</member>
<member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity" default="0.0">
- The body's rotational velocity.
- </member>
- <member name="applied_force" type="Vector2" setter="set_applied_force" getter="get_applied_force" default="Vector2(0, 0)">
- The body's total applied force.
- </member>
- <member name="applied_torque" type="float" setter="set_applied_torque" getter="get_applied_torque" default="0.0">
- The body's total applied torque.
+ The body's rotational velocity in [i]radians[/i] per second.
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
@@ -108,6 +133,14 @@
<member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody2D.CenterOfMassMode" default="0">
Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
</member>
+ <member name="constant_force" type="Vector2" setter="set_constant_force" getter="get_constant_force" default="Vector2(0, 0)">
+ The body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </member>
+ <member name="constant_torque" type="float" setter="set_constant_torque" getter="get_constant_torque" default="0.0">
+ The body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
+ </member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the body will emit signals when it collides with another RigidDynamicBody2D. See also [member contacts_reported].
</member>
@@ -146,7 +179,7 @@
Defines how [member linear_damp] is applied. See [enum DampMode] for possible values.
</member>
<member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)">
- The body's linear velocity.
+ The body's linear velocity in pixels per second. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
<member name="lock_rotation" type="bool" setter="set_lock_rotation_enabled" getter="is_lock_rotation_enabled" default="false">
If [code]true[/code], the body cannot rotate. Gravity and forces only apply linear movement.
@@ -159,7 +192,7 @@
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
</member>
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
- If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods.
+ If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method apply_force] methods.
</member>
</members>
<signals>
diff --git a/doc/classes/RigidDynamicBody3D.xml b/doc/classes/RigidDynamicBody3D.xml
index ba9acdf4bf..16fced737f 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>
@@ -22,28 +22,36 @@
Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body.
</description>
</method>
- <method name="add_central_force">
+ <method name="add_constant_central_force">
<return type="void" />
<argument index="0" name="force" type="Vector3" />
<description>
- Adds a constant directional force (i.e. acceleration) without affecting rotation.
- This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code].
+ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
+ This is equivalent to using [method add_constant_force] at the body's center of mass.
</description>
</method>
- <method name="add_force">
+ <method name="add_constant_force">
<return type="void" />
<argument index="0" name="force" type="Vector3" />
<argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Adds a constant directional force (i.e. acceleration).
- The position uses the rotation of the global coordinate system, but is centered at the object's origin.
+ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
- <method name="add_torque">
+ <method name="add_constant_torque">
<return type="void" />
<argument index="0" name="torque" type="Vector3" />
<description>
- Adds a constant rotational force (i.e. a motor) without affecting position.
+ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = Vector3(0, 0, 0)[/code].
+ </description>
+ </method>
+ <method name="apply_central_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" />
+ <description>
+ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
+ This is equivalent to using [method apply_force] at the body's center of mass.
</description>
</method>
<method name="apply_central_impulse">
@@ -51,7 +59,17 @@
<argument index="0" name="impulse" type="Vector3" />
<description>
Applies a directional impulse without affecting rotation.
- This is equivalent to [code]apply_impulse(Vector3(0,0,0), impulse)[/code].
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ This is equivalent to using [method apply_impulse] at the body's center of mass.
+ </description>
+ </method>
+ <method name="apply_force">
+ <return type="void" />
+ <argument index="0" name="force" type="Vector3" />
+ <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <description>
+ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
+ [code]position[/code] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -59,14 +77,24 @@
<argument index="0" name="impulse" type="Vector3" />
<argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
- Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
+ Applies a positioned impulse to the body.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [code]position[/code] is the offset from the body origin in global coordinates.
+ </description>
+ </method>
+ <method name="apply_torque">
+ <return type="void" />
+ <argument index="0" name="torque" type="Vector3" />
+ <description>
+ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
<argument index="0" name="impulse" type="Vector3" />
<description>
- Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the [code]impulse[/code] vector passed.
+ Applies a rotational impulse to the body without affecting the position.
+ An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
@@ -99,7 +127,7 @@
Defines how [member angular_damp] is applied. See [enum DampMode] for possible values.
</member>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)">
- RigidDynamicBody3D's rotational velocity.
+ The RigidDynamicBody3D's rotational velocity in [i]radians[/i] per second.
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
@@ -111,6 +139,14 @@
<member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody3D.CenterOfMassMode" default="0">
Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
</member>
+ <member name="constant_force" type="Vector3" setter="set_constant_force" getter="get_constant_force" default="Vector3(0, 0, 0)">
+ The body's total constant positional forces applied during each physics update.
+ See [method add_constant_force] and [method add_constant_central_force].
+ </member>
+ <member name="constant_torque" type="Vector3" setter="set_constant_torque" getter="get_constant_torque" default="Vector3(0, 0, 0)">
+ The body's total constant rotational forces applied during each physics update.
+ See [method add_constant_torque].
+ </member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the RigidDynamicBody3D will emit signals when it collides with another RigidDynamicBody3D. See also [member contacts_reported].
</member>
@@ -149,7 +185,7 @@
Defines how [member linear_damp] is applied. See [enum DampMode] for possible values.
</member>
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
- The body's linear velocity. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
+ The body's linear velocity in units per second. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
<member name="lock_rotation" type="bool" setter="set_lock_rotation_enabled" getter="is_lock_rotation_enabled" default="false">
If [code]true[/code], the body cannot rotate. Gravity and forces only apply linear movement.
@@ -162,7 +198,7 @@
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
</member>
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
- If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods.
+ If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method apply_force] methods.
</member>
</members>
<signals>
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/SceneState.xml b/doc/classes/SceneState.xml
index 9a22b24825..c3d726f705 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -59,6 +59,13 @@
Returns the path to the node that owns the method connected to the signal at [code]idx[/code], relative to the root node.
</description>
</method>
+ <method name="get_connection_unbinds" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="idx" type="int" />
+ <description>
+ Returns the number of unbound parameters for the signal at [code]idx[/code].
+ </description>
+ </method>
<method name="get_node_count" qualifiers="const">
<return type="int" />
<description>
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/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index b0509a322e..80f0a54e70 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -22,12 +22,13 @@
}
[/csharp]
[/codeblocks]
+ The timer will be automatically freed after its time elapses.
</description>
<tutorials>
</tutorials>
<members>
<member name="time_left" type="float" setter="set_time_left" getter="get_time_left">
- The time remaining.
+ The time remaining (in seconds).
</member>
</members>
<signals>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 7c59e87848..4174e1afeb 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -5,10 +5,11 @@
</brief_description>
<description>
A class stored as a resource. A script extends the functionality of all objects that instance it.
+ This is the base class for all scripts and should not be used directly. Trying to create a new script with this class will result in an error.
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/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml
index 349adb9111..33ca5b4dc9 100644
--- a/doc/classes/ScriptCreateDialog.xml
+++ b/doc/classes/ScriptCreateDialog.xml
@@ -39,8 +39,8 @@
</method>
</methods>
<members>
- <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
- <member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Attach Node Script&quot;" />
+ <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
+ <member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Attach Node Script&quot;" />
</members>
<signals>
<signal name="script_created">
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
index 1f1415bebe..2dcde10616 100644
--- a/doc/classes/ScrollBar.xml
+++ b/doc/classes/ScrollBar.xml
@@ -12,8 +12,8 @@
<member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0">
Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused.
</member>
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="0" />
- <member name="step" type="float" setter="set_step" getter="get_step" override="true" default="0.0" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="0.0" />
</members>
<signals>
<signal name="scrolling">
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 976c32c243..948c052a20 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -16,20 +16,26 @@
<argument index="0" name="control" type="Control" />
<description>
Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus].
+ [b]Note:[/b] This will not work on a node that was just added during the same frame. If you want to scroll to a newly added child, you must wait until the next frame using [signal SceneTree.process_frame]:
+ [codeblock]
+ add_child(child_node)
+ await get_tree().process_frame
+ ensure_control_visible(child_node)
+ [/codeblock]
</description>
</method>
- <method name="get_h_scrollbar">
+ <method name="get_h_scroll_bar">
<return type="HScrollBar" />
<description>
Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer].
- [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the horizontal scrollbar, use [member scroll_horizontal_enabled]. If you want to only hide it instead, use [member scroll_horizontal_visible].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use [member horizontal_scroll_mode].
</description>
</method>
- <method name="get_v_scrollbar">
+ <method name="get_v_scroll_bar">
<return type="VScrollBar" />
<description>
Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer].
- [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the vertical scrollbar, use [member scroll_vertical_enabled]. If you want to only hide it instead, use [member scroll_vertical_visible].
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use [member vertical_scroll_mode].
</description>
</method>
</methods>
@@ -37,26 +43,20 @@
<member name="follow_focus" type="bool" setter="set_follow_focus" getter="is_following_focus" default="false">
If [code]true[/code], the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible.
</member>
- <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
+ <member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" enum="ScrollContainer.ScrollMode" default="1">
+ Controls whether horizontal scrollbar can be used and when it should be visible. See [enum ScrollMode] for options.
+ </member>
+ <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone" default="0">
</member>
<member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
The current horizontal scroll value.
</member>
- <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" default="true">
- If [code]true[/code], enables horizontal scrolling.
- </member>
- <member name="scroll_horizontal_visible" type="bool" setter="set_h_scroll_visible" getter="is_h_scroll_visible" default="true">
- If [code]false[/code], hides the horizontal scrollbar.
- </member>
<member name="scroll_vertical" type="int" setter="set_v_scroll" getter="get_v_scroll" default="0">
The current vertical scroll value.
</member>
- <member name="scroll_vertical_enabled" type="bool" setter="set_enable_v_scroll" getter="is_v_scroll_enabled" default="true">
- If [code]true[/code], enables vertical scrolling.
- </member>
- <member name="scroll_vertical_visible" type="bool" setter="set_v_scroll_visible" getter="is_v_scroll_visible" default="true">
- If [code]false[/code], hides the vertical scrollbar.
+ <member name="vertical_scroll_mode" type="int" setter="set_vertical_scroll_mode" getter="get_vertical_scroll_mode" enum="ScrollContainer.ScrollMode" default="1">
+ Controls whether vertical scrollbar can be used and when it should be visible. See [enum ScrollMode] for options.
</member>
</members>
<signals>
@@ -71,6 +71,20 @@
</description>
</signal>
</signals>
+ <constants>
+ <constant name="SCROLL_MODE_DISABLED" value="0" enum="ScrollMode">
+ Scrolling disabled, scrollbar will be invisible.
+ </constant>
+ <constant name="SCROLL_MODE_AUTO" value="1" enum="ScrollMode">
+ Scrolling enabled, scrollbar will be visible only if necessary, i.e. container's content is bigger than the container.
+ </constant>
+ <constant name="SCROLL_MODE_SHOW_ALWAYS" value="2" enum="ScrollMode">
+ Scrolling enabled, scrollbar will be always visible.
+ </constant>
+ <constant name="SCROLL_MODE_SHOW_NEVER" value="3" enum="ScrollMode">
+ Scrolling enabled, scrollbar will be hidden.
+ </constant>
+ </constants>
<theme_items>
<theme_item name="bg" data_type="style" type="StyleBox">
The background [StyleBox] of the [ScrollContainer].
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 751afb9b65..d81b4bc372 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -7,7 +7,7 @@
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">
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..4c12ee36f6 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">
@@ -65,7 +65,8 @@
</methods>
<members>
<member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0">
- The shape's custom solver bias.
+ The shape's custom solver bias. Defines how much bodies react to enforce contact separation when this shape is involved.
+ When set to [code]0[/code], the default value from [member ProjectSettings.physics/2d/solver/default_contact_bias] is used.
</member>
</members>
</class>
diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml
index 96f8833486..010b993327 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">
@@ -18,6 +18,10 @@
</method>
</methods>
<members>
+ <member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0">
+ The shape's custom solver bias. Defines how much bodies react to enforce contact separation when this shape is involved.
+ When set to [code]0[/code], the default value from [member ProjectSettings.physics/3d/solver/default_contact_bias] is used.
+ </member>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
The collision margin for the shape. Used in Bullet Physics only.
Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp.
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/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index e804e7bf24..aa56f852a7 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -297,7 +297,7 @@
<argument index="3" name="persistent" type="bool" default="false" />
<description>
Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
- [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
+ [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
[b]Note:[/b] The pose transform needs to be a global pose! Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to a global pose.
</description>
</method>
@@ -309,7 +309,7 @@
<argument index="3" name="persistent" type="bool" default="false" />
<description>
Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
- [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
+ [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
[b]Note:[/b] The pose transform needs to be a local pose! Use [method global_pose_to_local_pose] to convert a global pose to a local pose.
</description>
</method>
diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml
index c544473163..90ccd8f42e 100644
--- a/doc/classes/SkeletonModification3D.xml
+++ b/doc/classes/SkeletonModification3D.xml
@@ -60,7 +60,7 @@
When true, the modification's [method _execute] function will be called by the [SkeletonModificationStack3D].
</member>
<member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0">
- The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes.
+ The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes.
</member>
</members>
</class>
diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml
index 55777ab0f4..606dce4961 100644
--- a/doc/classes/SkeletonModification3DCCDIK.xml
+++ b/doc/classes/SkeletonModification3DCCDIK.xml
@@ -4,7 +4,7 @@
A modification that uses CCDIK to manipulate a series of bones to reach a target.
</brief_description>
<description>
- This [SkeletonModification3D] uses an algorithm called Cyclic Coordinate Descent Inverse Kinematics, or CCDIK, to maniuplate a chain of bones in a Skeleton so it reaches a defined target.
+ This [SkeletonModification3D] uses an algorithm called Cyclic Coordinate Descent Inverse Kinematics, or CCDIK, to manipulate a chain of bones in a Skeleton so it reaches a defined target.
CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers.
[b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK.
CCDIK also fully supports angle constraints, allowing for more control over how a solution is met.
diff --git a/doc/classes/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml
index 1c69ad7b3f..7c1a021c44 100644
--- a/doc/classes/SkeletonModification3DFABRIK.xml
+++ b/doc/classes/SkeletonModification3DFABRIK.xml
@@ -24,7 +24,7 @@
<return type="bool" />
<argument index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indiciates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
+ Returns a boolean that indicates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
</description>
</method>
<method name="get_fabrik_joint_bone_index" qualifiers="const">
@@ -66,7 +66,7 @@
<return type="bool" />
<argument index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean indiciating whether the FABRIK joint uses the target's [Basis] for its rotation.
+ Returns a boolean indicating whether the FABRIK joint uses the target's [Basis] for its rotation.
[b]Note:[/b] This option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones.
</description>
</method>
diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml
index 3c724229bd..605b28363b 100644
--- a/doc/classes/SkeletonModification3DJiggle.xml
+++ b/doc/classes/SkeletonModification3DJiggle.xml
@@ -56,7 +56,7 @@
<return type="bool" />
<argument index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification.
+ Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification.
</description>
</method>
<method name="get_jiggle_joint_roll" qualifiers="const">
@@ -77,7 +77,7 @@
<return type="bool" />
<argument index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is using gravity or not.
+ Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is using gravity or not.
</description>
</method>
<method name="get_use_colliders" qualifiers="const">
diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml
index 80f8ba4e5b..2edcda6bfd 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 operate 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/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml
index 4035e39410..032fe6e032 100644
--- a/doc/classes/SkeletonModificationStack3D.xml
+++ b/doc/classes/SkeletonModificationStack3D.xml
@@ -43,7 +43,7 @@
<method name="get_is_setup" qualifiers="const">
<return type="bool" />
<description>
- Returns a boolean that indiciates whether the modification stack is setup and can execute.
+ Returns a boolean that indicates whether the modification stack is setup and can execute.
</description>
</method>
<method name="get_modification" qualifiers="const">
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index 21a45645b8..9ef48afffc 100644
--- a/doc/classes/Slider.xml
+++ b/doc/classes/Slider.xml
@@ -13,11 +13,11 @@
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="scrollable" type="bool" setter="set_scrollable" getter="is_scrollable" default="true">
If [code]true[/code], the value can be changed using the mouse wheel.
</member>
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="0" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" />
<member name="tick_count" type="int" setter="set_ticks" getter="get_ticks" default="0">
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
</member>
@@ -25,4 +25,17 @@
If [code]true[/code], the slider will display ticks for minimum and maximum values.
</member>
</members>
+ <signals>
+ <signal name="drag_ended">
+ <argument index="0" name="value_changed" type="bool" />
+ <description>
+ Emitted when dragging stops. If [code]value_changed[/code] is true, [member Range.value] is different from the value when you started the dragging.
+ </description>
+ </signal>
+ <signal name="drag_started">
+ <description>
+ Emitted when dragging is started.
+ </description>
+ </signal>
+ </signals>
</class>
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/SpinBox.xml b/doc/classes/SpinBox.xml
index 615f5e3586..392d4d6a65 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -12,14 +12,14 @@
add_child(spin_box)
var line_edit = spin_box.get_line_edit()
line_edit.context_menu_enabled = false
- spin_box.align = LineEdit.ALIGN_RIGHT
+ spin_box.horizontal_alignment = LineEdit.HORIZONTAL_ALIGNMENT_RIGHT
[/gdscript]
[csharp]
var spinBox = new SpinBox();
AddChild(spinBox);
var lineEdit = spinBox.GetLineEdit();
lineEdit.ContextMenuEnabled = false;
- spinBox.Align = LineEdit.AlignEnum.Right;
+ spinBox.AlignHorizontal = LineEdit.HorizontalAlignEnum.Right;
[/csharp]
[/codeblocks]
The above code will create a [SpinBox], disable context menu on it and set the text alignment to right.
@@ -44,8 +44,7 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0">
- Sets the text alignment of the [SpinBox].
+ <member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
</member>
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]true[/code], the [SpinBox] will be editable. Otherwise, it will be read only.
diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml
index 8c10ec36a8..b5276d25ea 100644
--- a/doc/classes/SpotLight3D.xml
+++ b/doc/classes/SpotLight3D.xml
@@ -7,11 +7,11 @@
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>
- <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.03" />
+ <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.03" />
<member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0">
The spotlight's angle in degrees.
</member>
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/StreamPeer.xml b/doc/classes/StreamPeer.xml
index 805f056289..69d224ed24 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -70,7 +70,7 @@
<return type="String" />
<argument index="0" name="bytes" type="int" default="-1" />
<description>
- Gets a string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string].
+ Gets an ASCII string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string].
</description>
</method>
<method name="get_u16">
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..d86c577e5e 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">
@@ -124,7 +124,7 @@
<method name="dedent" qualifiers="const">
<return type="String" />
<description>
- Returns a copy of the string with indentation (leading tabs and spaces) removed.
+ Returns a copy of the string with indentation (leading tabs and spaces) removed. See also [method indent] to add indentation.
</description>
</method>
<method name="ends_with" qualifiers="const">
@@ -243,6 +243,15 @@
<description>
</description>
</method>
+ <method name="indent" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="prefix" type="String" />
+ <description>
+ Returns a copy of the string with lines indented with [code]prefix[/code].
+ For example, the string can be indented with two tabs using [code]"\t\t"[/code], or four spaces using [code]" "[/code]. The prefix can be any string so it can also be used to comment out strings with e.g. [code]"# "[/code]. See also [method dedent] to remove indentation.
+ [b]Note:[/b] Empty lines are kept empty.
+ </description>
+ </method>
<method name="insert" qualifiers="const">
<return type="String" />
<argument index="0" name="position" type="int" />
@@ -331,7 +340,7 @@
<return type="String" />
<argument index="0" name="parts" type="PackedStringArray" />
<description>
- Return a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method.
+ Returns a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method.
Example:
[codeblocks]
[gdscript]
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/TabBar.xml b/doc/classes/TabBar.xml
index 612f8fb740..71df40a693 100644
--- a/doc/classes/TabBar.xml
+++ b/doc/classes/TabBar.xml
@@ -49,19 +49,6 @@
Returns [code]true[/code] if select with right mouse button is enabled.
</description>
</method>
- <method name="get_tab_count" qualifiers="const">
- <return type="int" />
- <description>
- Returns the number of tabs.
- </description>
- </method>
- <method name="get_tab_disabled" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="tab_idx" type="int" />
- <description>
- Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled.
- </description>
- </method>
<method name="get_tab_icon" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="tab_idx" type="int" />
@@ -117,6 +104,13 @@
Returns the [TabBar]'s rearrange group ID.
</description>
</method>
+ <method name="is_tab_disabled" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="tab_idx" type="int" />
+ <description>
+ Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled.
+ </description>
+ </method>
<method name="move_tab">
<return type="void" />
<argument index="0" name="from" type="int" />
@@ -209,12 +203,14 @@
<member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled" default="true">
if [code]true[/code], the mouse's scroll wheel can be used to navigate the scroll view.
</member>
- <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabBar.TabAlign" default="1">
- The alignment of all tabs. See [enum TabAlign] for details.
+ <member name="tab_alignment" type="int" setter="set_tab_alignment" getter="get_tab_alignment" enum="TabBar.AlignmentMode" default="1">
</member>
<member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="TabBar.CloseButtonDisplayPolicy" default="0">
Sets when the close button will appear on the tabs. See [enum CloseButtonDisplayPolicy] for details.
</member>
+ <member name="tab_count" type="int" setter="set_tab_count" getter="get_tab_count" default="0">
+ The number of tabs currently in the bar.
+ </member>
</members>
<signals>
<signal name="active_tab_rearranged">
@@ -239,7 +235,7 @@
<argument index="0" name="tab" type="int" />
<description>
Emitted when a tab's close button is pressed.
- [b]Note:[/b] Tabs are not removed automatically once the close button is pressed, this behaviour needs to be programmed manually. For example:
+ [b]Note:[/b] Tabs are not removed automatically once the close button is pressed, this behavior needs to be programmed manually. For example:
[codeblocks]
[gdscript]
$TabBar.tab_close_pressed.connect($TabBar.remove_tab)
@@ -264,17 +260,13 @@
</signal>
</signals>
<constants>
- <constant name="ALIGN_LEFT" value="0" enum="TabAlign">
- Align the tabs to the left.
+ <constant name="ALIGNMENT_LEFT" value="0" enum="AlignmentMode">
</constant>
- <constant name="ALIGN_CENTER" value="1" enum="TabAlign">
- Align the tabs to the center.
+ <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
</constant>
- <constant name="ALIGN_RIGHT" value="2" enum="TabAlign">
- Align the tabs to the right.
+ <constant name="ALIGNMENT_RIGHT" value="2" enum="AlignmentMode">
</constant>
- <constant name="ALIGN_MAX" value="3" enum="TabAlign">
- Represents the size of the [enum TabAlign] enum.
+ <constant name="ALIGNMENT_MAX" value="3" enum="AlignmentMode">
</constant>
<constant name="CLOSE_BUTTON_SHOW_NEVER" value="0" enum="CloseButtonDisplayPolicy">
Never show the close buttons.
@@ -290,24 +282,6 @@
</constant>
</constants>
<theme_items>
- <theme_item name="close" data_type="icon" type="Texture2D">
- The icon for the close button (see [member tab_close_display_policy]).
- </theme_item>
- <theme_item name="close_bg_highlight" data_type="style" type="StyleBox">
- Background of the close button when it's being hovered with the cursor.
- </theme_item>
- <theme_item name="close_bg_pressed" data_type="style" type="StyleBox">
- Background of the close button when it's being pressed.
- </theme_item>
- <theme_item name="decrement" data_type="icon" type="Texture2D">
- Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent.
- </theme_item>
- <theme_item name="decrement_highlight" data_type="icon" type="Texture2D">
- Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- The font used to draw tab names.
- </theme_item>
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
Font color of disabled tabs.
</theme_item>
@@ -317,23 +291,41 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Font color of the currently selected tab.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the tab names.
- </theme_item>
<theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
Font color of the other, unselected tabs.
</theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The horizontal separation between the elements inside tabs.
</theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the tab text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ The font used to draw tab names.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the tab names.
+ </theme_item>
+ <theme_item name="close" data_type="icon" type="Texture2D">
+ The icon for the close button (see [member tab_close_display_policy]).
+ </theme_item>
+ <theme_item name="decrement" data_type="icon" type="Texture2D">
+ Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent.
+ </theme_item>
+ <theme_item name="decrement_highlight" data_type="icon" type="Texture2D">
+ Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
+ </theme_item>
<theme_item name="increment" data_type="icon" type="Texture2D">
Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent.
</theme_item>
<theme_item name="increment_highlight" data_type="icon" type="Texture2D">
Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the tab text outline.
+ <theme_item name="close_bg_highlight" data_type="style" type="StyleBox">
+ Background of the close button when it's being hovered with the cursor.
+ </theme_item>
+ <theme_item name="close_bg_pressed" data_type="style" type="StyleBox">
+ Background of the close button when it's being pressed.
</theme_item>
<theme_item name="tab_disabled" data_type="style" type="StyleBox">
The style of disabled tabs.
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 1f32bba5a1..d6e1e13505 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>
@@ -140,8 +141,7 @@
<member name="drag_to_rearrange_enabled" type="bool" setter="set_drag_to_rearrange_enabled" getter="get_drag_to_rearrange_enabled" default="false">
If [code]true[/code], tabs can be rearranged with mouse drag.
</member>
- <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign" default="1">
- The alignment of all tabs in the tab container. See the [enum TabAlign] constants for details.
+ <member name="tab_alignment" type="int" setter="set_tab_alignment" getter="get_tab_alignment" enum="TabContainer.AlignmentMode" default="1">
</member>
<member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" default="true">
If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden.
@@ -170,26 +170,14 @@
</signal>
</signals>
<constants>
- <constant name="ALIGN_LEFT" value="0" enum="TabAlign">
- Align the tabs to the left.
+ <constant name="ALIGNMENT_LEFT" value="0" enum="AlignmentMode">
</constant>
- <constant name="ALIGN_CENTER" value="1" enum="TabAlign">
- Align the tabs to the center.
+ <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
</constant>
- <constant name="ALIGN_RIGHT" value="2" enum="TabAlign">
- Align the tabs to the right.
+ <constant name="ALIGNMENT_RIGHT" value="2" enum="AlignmentMode">
</constant>
</constants>
<theme_items>
- <theme_item name="decrement" data_type="icon" type="Texture2D">
- Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent.
- </theme_item>
- <theme_item name="decrement_highlight" data_type="icon" type="Texture2D">
- Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- The font used to draw tab names.
- </theme_item>
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)">
Font color of disabled tabs.
</theme_item>
@@ -199,15 +187,30 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Font color of the currently selected tab.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the tab names.
- </theme_item>
<theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
Font color of the other, unselected tabs.
</theme_item>
<theme_item name="icon_separation" data_type="constant" type="int" default="4">
Space between tab's name and its icon.
</theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the tab text outline.
+ </theme_item>
+ <theme_item name="side_margin" data_type="constant" type="int" default="8">
+ The space at the left and right edges of the tab bar.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ The font used to draw tab names.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the tab names.
+ </theme_item>
+ <theme_item name="decrement" data_type="icon" type="Texture2D">
+ Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent.
+ </theme_item>
+ <theme_item name="decrement_highlight" data_type="icon" type="Texture2D">
+ Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
+ </theme_item>
<theme_item name="increment" data_type="icon" type="Texture2D">
Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent.
</theme_item>
@@ -220,15 +223,9 @@
<theme_item name="menu_highlight" data_type="icon" type="Texture2D">
The icon for the menu button (see [method set_popup]) when it's being hovered with the cursor.
</theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the tab text outline.
- </theme_item>
<theme_item name="panel" data_type="style" type="StyleBox">
The style for the background fill.
</theme_item>
- <theme_item name="side_margin" data_type="constant" type="int" default="8">
- The space at the left and right edges of the tab bar.
- </theme_item>
<theme_item name="tab_disabled" data_type="style" type="StyleBox">
The style of disabled tabs.
</theme_item>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index b8e2f7f03c..26ad20e85b 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -201,7 +201,7 @@
<method name="get_last_full_visible_line" qualifiers="const">
<return type="int" />
<description>
- Return the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index.
+ Returns the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index.
</description>
</method>
<method name="get_last_full_visible_line_wrap_index" qualifiers="const">
@@ -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>
@@ -937,7 +971,7 @@
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]false[/code], existing text cannot be modified and new text cannot be added.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false">
If [code]true[/code], all occurrences of the selected text will be highlighted.
</member>
@@ -957,7 +991,7 @@
<member name="minimap_width" type="int" setter="set_minimap_width" getter="get_minimap_width" default="80">
The width, in pixels, of the minimap.
</member>
- <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" />
+ <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="1" />
<member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text.
</member>
@@ -1194,12 +1228,6 @@
<theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)">
Background [Color] of the line containing the caret.
</theme_item>
- <theme_item name="focus" data_type="style" type="StyleBox">
- Sets the [StyleBox] when in focus.
- </theme_item>
- <theme_item name="font" data_type="font" type="Font">
- Sets the default [Font].
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
Sets the font [Color].
</theme_item>
@@ -1212,21 +1240,6 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Sets default font size.
- </theme_item>
- <theme_item name="line_spacing" data_type="constant" type="int" default="4">
- Sets the spacing between the lines.
- </theme_item>
- <theme_item name="normal" data_type="style" type="StyleBox">
- Sets the [StyleBox] of this [TextEdit].
- </theme_item>
- <theme_item name="outline_size" data_type="constant" type="int" default="0">
- The size of the text outline.
- </theme_item>
- <theme_item name="read_only" data_type="style" type="StyleBox">
- Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled.
- </theme_item>
<theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
[Color] of the border around text that matches the search query.
</theme_item>
@@ -1236,14 +1249,35 @@
<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
Sets the highlight [Color] of text selections.
</theme_item>
+ <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
+ Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
+ </theme_item>
+ <theme_item name="line_spacing" data_type="constant" type="int" default="4">
+ Sets the spacing between the lines.
+ </theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ Sets the default [Font].
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Sets default font size.
+ </theme_item>
<theme_item name="space" data_type="icon" type="Texture2D">
Sets a custom [Texture2D] for space text characters.
</theme_item>
<theme_item name="tab" data_type="icon" type="Texture2D">
Sets a custom [Texture2D] for tab text characters.
</theme_item>
- <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)">
- Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled.
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ Sets the [StyleBox] when in focus. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Sets the [StyleBox] of this [TextEdit].
+ </theme_item>
+ <theme_item name="read_only" data_type="style" type="StyleBox">
+ Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index 598d0fb859..1eaccf4604 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -13,7 +13,7 @@
<return type="bool" />
<argument index="0" name="key" type="Variant" />
<argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<argument index="3" name="length" type="int" default="1" />
<description>
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
@@ -122,7 +122,7 @@
<return type="bool" />
<argument index="0" name="key" type="Variant" />
<argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Sets new size and alignment of embedded object.
</description>
@@ -144,8 +144,7 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" enum="HAlign" default="0">
- Text horizontal alignment.
+ <member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
</member>
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index a7122b827e..ff193a0e4b 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -13,7 +13,7 @@
<return type="bool" />
<argument index="0" name="key" type="Variant" />
<argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<argument index="3" name="length" type="int" default="1" />
<description>
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
@@ -113,7 +113,7 @@
<method name="get_dropcap_rid" qualifiers="const">
<return type="RID" />
<description>
- Return drop cap text buffer RID.
+ Returns drop cap text buffer RID.
</description>
</method>
<method name="get_dropcap_size" qualifiers="const">
@@ -240,7 +240,7 @@
<return type="bool" />
<argument index="0" name="key" type="Variant" />
<argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Sets new size and alignment of embedded object.
</description>
@@ -275,7 +275,7 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" enum="HAlign" default="0">
+ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="HorizontalAlignment" default="0">
Paragraph horizontal alignment.
</member>
<member name="custom_punctuation" type="String" setter="set_custom_punctuation" getter="get_custom_punctuation" default="&quot;&quot;">
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index e1c05165de..443716435a 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -244,7 +244,7 @@
<return type="int" />
<argument index="0" name="font_rid" type="RID" />
<description>
- Return the width of the range around the shape between the minimum and maximum representable signed distance.
+ Returns the width of the range around the shape between the minimum and maximum representable signed distance.
</description>
</method>
<method name="font_get_msdf_size" qualifiers="const">
@@ -295,7 +295,7 @@
<return type="Array" />
<argument index="0" name="font_rid" type="RID" />
<description>
- Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
<method name="font_get_spacing" qualifiers="const">
@@ -382,7 +382,7 @@
<argument index="0" name="font_rid" type="RID" />
<argument index="1" name="char" type="int" />
<description>
- Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
+ Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
<method name="font_is_antialiased" qualifiers="const">
@@ -396,7 +396,7 @@
<return type="bool" />
<argument index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
+ Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="font_is_language_supported" qualifiers="const">
@@ -541,7 +541,7 @@
<argument index="0" name="font_rid" type="RID" />
<argument index="1" name="force_autohinter" type="bool" />
<description>
- If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
<method name="font_set_global_oversampling">
@@ -549,7 +549,7 @@
<argument index="0" name="oversampling" type="float" />
<description>
Sets oversampling factor, shared by all font in the TextServer.
- [b]Note:[/b] This value can be automaticaly changed by display server.
+ [b]Note:[/b] This value can be automatically changed by display server.
</description>
</method>
<method name="font_set_glyph_advance">
@@ -886,7 +886,7 @@
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="key" type="Variant" />
<argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<argument index="4" name="length" type="int" default="1" />
<description>
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
@@ -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" />
@@ -1205,7 +1213,7 @@
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="key" type="Variant" />
<argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlign" default="5" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Sets new size and alignment of embedded object.
</description>
@@ -1376,7 +1384,7 @@
<constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag">
</constant>
<constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag">
- Grapheme is supprted by the font, and can be drawn.
+ Grapheme is supported by the font, and can be drawn.
</constant>
<constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag">
Grapheme is part of right-to-left or bottom-to-top run.
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 684a1aa755..fb4ac630ba 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -396,7 +396,7 @@
<return type="bool" />
<argument index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
+ Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="_font_is_language_supported" qualifiers="virtual const">
@@ -542,7 +542,7 @@
<argument index="0" name="font_rid" type="RID" />
<argument index="1" name="fixed_size" type="int" />
<description>
- If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
<method name="_font_set_force_autohinter" qualifiers="virtual">
@@ -557,7 +557,7 @@
<argument index="0" name="oversampling" type="float" />
<description>
Sets oversampling factor, shared by all font in the TextServer.
- [b]Note:[/b] This value can be automaticaly changed by display server.
+ [b]Note:[/b] This value can be automatically changed by display server.
</description>
</method>
<method name="_font_set_glyph_advance" qualifiers="virtual">
@@ -893,7 +893,7 @@
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="key" type="Variant" />
<argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlign" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlignment" />
<argument index="4" name="length" type="int" />
<description>
Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
@@ -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" />
@@ -1214,7 +1222,7 @@
<argument index="0" name="shaped" type="RID" />
<argument index="1" name="key" type="Variant" />
<argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlign" />
+ <argument index="3" name="inline_align" type="int" enum="InlineAlignment" />
<description>
Sets new size and alignment of embedded object.
</description>
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index 2be27617ab..476ab2d1bf 100644
--- a/doc/classes/TextureButton.xml
+++ b/doc/classes/TextureButton.xml
@@ -31,7 +31,7 @@
Texture to display when the node is disabled. See [member BaseButton.disabled].
</member>
<member name="texture_focused" type="Texture2D" setter="set_focused_texture" getter="get_focused_texture">
- Texture to display when the node has mouse or keyboard focus.
+ Texture to display when the node has mouse or keyboard focus. [member texture_focused] is displayed [i]over[/i] the base texture, so a partially transparent texture should be used to ensure the base texture remains visible. A texture that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a fully transparent texture of any size. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
</member>
<member name="texture_hover" type="Texture2D" setter="set_hover_texture" getter="get_hover_texture">
Texture to display when the mouse hovers the node.
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index ee47557b39..25725d2f67 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -27,7 +27,7 @@
<member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" default="0">
The fill direction. See [enum FillMode] for possible values.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" />
<member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch" default="false">
If [code]true[/code], Godot treats the bar's textures like in [NinePatchRect]. Use the [code]stretch_margin_*[/code] properties like [member stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [member fill_mode], this setting will enable stretching.
</member>
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
index 4f18f43ddf..a160eceb35 100644
--- a/doc/classes/TextureRect.xml
+++ b/doc/classes/TextureRect.xml
@@ -19,7 +19,7 @@
<member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false">
If [code]true[/code], texture is flipped vertically.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" />
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" />
<member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode" default="0">
Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode].
</member>
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..e37031f3fd 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>
@@ -69,7 +69,7 @@
<description>
Triggers an update of the TileMap. If [code]layer[/code] is provided, only updates the given layer.
[b]Note:[/b] The TileMap node updates automatically when one of its properties is modified. A manual update is only needed if runtime modifications (implemented in [method _tile_data_runtime_update]) need to be applied.
- [b]Warning:[/b] Updating the TileMap is a performance demanding task. Limit occurences of those updates to the minimum and limit the amount tiles they impact (by segregating tiles updated often to a dedicated layer for example).
+ [b]Warning:[/b] Updating the TileMap is a performance demanding task. Limit occurrences of those updates to the minimum and limit the amount tiles they impact (by segregating tiles updated often to a dedicated layer for example).
</description>
</method>
<method name="get_cell_alternative_tile" qualifiers="const">
@@ -103,7 +103,7 @@
<return type="Vector2i" />
<argument index="0" name="body" type="RID" />
<description>
- Returns the coodinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile.
+ Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile.
</description>
</method>
<method name="get_layer_modulate" qualifiers="const">
@@ -144,7 +144,7 @@
<argument index="0" name="coords" type="Vector2i" />
<argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor" />
<description>
- Returns the neighboring cell to the one at coordinates [code]coords[/code], indentified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take.
+ Returns the neighboring cell to the one at coordinates [code]coords[/code], identified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take.
</description>
</method>
<method name="get_pattern">
@@ -195,7 +195,7 @@
<argument index="1" name="coords_in_pattern" type="Vector2i" />
<argument index="2" name="pattern" type="TileMapPattern" />
<description>
- Returns for the given coodinate [code]coords_in_pattern[/code] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [code]position_in_tilemap[/code] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code]
+ Returns for the given coordinate [code]coords_in_pattern[/code] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [code]position_in_tilemap[/code] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code]
</description>
</method>
<method name="map_to_world" qualifiers="const">
@@ -229,7 +229,7 @@
<argument index="4" name="alternative_tile" type="int" default="-1" />
<description>
Sets the tile indentifiers for the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. Each tile of the [TileSet] is identified using three parts:
- - The source indentifier [code]source_id[/code] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id],
+ - The source identifier [code]source_id[/code] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id],
- The atlas coordinates identifier [code]atlas_coords[/code] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should be 0),
- The alternative tile identifier [code]alternative_tile[/code] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource].
</description>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 45d6f9ca6c..6fc92f6a31 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>
@@ -51,7 +51,7 @@
<argument index="0" name="pattern" type="TileMapPattern" />
<argument index="1" name="index" type="int" default="-1" />
<description>
- Adds a [TileMapPattern] to be stored in the TileSet resouce. If provided, insert it at the given [code]index[/code].
+ Adds a [TileMapPattern] to be stored in the TileSet resource. If provided, insert it at the given [code]index[/code].
</description>
</method>
<method name="add_physics_layer">
@@ -582,7 +582,7 @@
Diamond tile shape (for isometric look).
</constant>
<constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape">
- Rectangular tile shape with one row/colum out of two offset by half a tile.
+ Rectangular tile shape with one row/column out of two offset by half a tile.
</constant>
<constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape">
Hexagonal tile shape.
diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml
index 3451519ff6..f62ba7a337 100644
--- a/doc/classes/TileSetScenesCollectionSource.xml
+++ b/doc/classes/TileSetScenesCollectionSource.xml
@@ -4,8 +4,8 @@
Exposes a set of scenes as tiles for a [TileSet] resource.
</brief_description>
<description>
- When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instanciate an assiciated scene at the cell's position in the TileMap.
- Scenes are instanciated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instanciate/free the scene accordingly.
+ When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instantiate an associated scene at the cell's position in the TileMap.
+ Scenes are instantiated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instantiate/free the scene accordingly.
</description>
<tutorials>
</tutorials>
@@ -87,7 +87,7 @@
<argument index="0" name="id" type="int" />
<argument index="1" name="packed_scene" type="PackedScene" />
<description>
- Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positionning properties are needed to place the scene on the TileMap.
+ Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the TileMap.
</description>
</method>
</methods>
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..e679a8cfeb 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>
@@ -60,13 +60,13 @@
<argument index="0" name="xform" type="Transform3D" />
<argument index="1" name="weight" type="float" />
<description>
- Interpolates the transform to other Transform3D by weight amount (on the range of 0.0 to 1.0).
+ Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
</description>
</method>
<method name="inverse" qualifiers="const">
<return type="Transform3D" />
<description>
- Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).
+ Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling).
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
@@ -88,7 +88,7 @@
<method name="orthonormalized" qualifiers="const">
<return type="Transform3D" />
<description>
- Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors.
+ Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1).
</description>
</method>
<method name="rotated" qualifiers="const">
@@ -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/Tree.xml b/doc/classes/Tree.xml
index ed24905254..10bbdc0301 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -35,12 +35,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="are_column_titles_visible" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if the column titles are being shown.
- </description>
- </method>
<method name="clear">
<return type="void" />
<description>
@@ -313,13 +307,6 @@
Sets OpenType feature [code]tag[/code] for the column title.
</description>
</method>
- <method name="set_column_titles_visible">
- <return type="void" />
- <argument index="0" name="visible" type="bool" />
- <description>
- If [code]true[/code], column titles are visible.
- </description>
- </method>
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
@@ -328,6 +315,9 @@
<member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select" default="false">
If [code]true[/code], a right mouse button click can select items.
</member>
+ <member name="column_titles_visible" type="bool" setter="set_column_titles_visible" getter="are_column_titles_visible" default="false">
+ If [code]true[/code], column titles are visible.
+ </member>
<member name="columns" type="int" setter="set_columns" getter="get_columns" default="1">
The number of columns.
</member>
@@ -335,14 +325,14 @@
The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control._can_drop_data] is recommended.
This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false">
If [code]true[/code], the folding arrow is hidden.
</member>
<member name="hide_root" type="bool" setter="set_hide_root" getter="is_root_hidden" default="false">
If [code]true[/code], the tree's root is hidden.
</member>
- <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
+ <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<member name="scroll_horizontal_enabled" type="bool" setter="set_h_scroll_enabled" getter="is_h_scroll_enabled" default="true">
If [code]true[/code], enables horizontal scrolling.
</member>
@@ -474,66 +464,15 @@
</constant>
</constants>
<theme_items>
- <theme_item name="arrow" data_type="icon" type="Texture2D">
- The arrow icon used when a foldable item is not collapsed.
- </theme_item>
- <theme_item name="arrow_collapsed" data_type="icon" type="Texture2D">
- The arrow icon used when a foldable item is collapsed (for left-to-right layouts).
- </theme_item>
- <theme_item name="arrow_collapsed_mirrored" data_type="icon" type="Texture2D">
- The arrow icon used when a foldable item is collapsed (for right-to-left layouts).
- </theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
- Default [StyleBox] for the [Tree], i.e. used when the control is not being focused.
- </theme_item>
- <theme_item name="bg_focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [Tree] is being focused.
- </theme_item>
- <theme_item name="button_margin" data_type="constant" type="int" default="4">
- The horizontal space between each button in a cell.
- </theme_item>
- <theme_item name="button_pressed" data_type="style" type="StyleBox">
- [StyleBox] used when a button in the tree is pressed.
- </theme_item>
- <theme_item name="checked" data_type="icon" type="Texture2D">
- The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked.
- </theme_item>
<theme_item name="children_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
The [Color] of the relationship lines between the selected [TreeItem] and its children.
</theme_item>
- <theme_item name="children_hl_line_width" data_type="constant" type="int" default="1">
- The width of the relationship lines between the selected [TreeItem] and its children.
- </theme_item>
- <theme_item name="cursor" data_type="style" type="StyleBox">
- [StyleBox] used for the cursor, when the [Tree] is being focused.
- </theme_item>
- <theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
- [StyleBox] used for the cursor, when the [Tree] is not being focused.
- </theme_item>
- <theme_item name="custom_button" data_type="style" type="StyleBox">
- Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell.
- </theme_item>
<theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
</theme_item>
- <theme_item name="custom_button_hover" data_type="style" type="StyleBox">
- [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
- </theme_item>
- <theme_item name="custom_button_pressed" data_type="style" type="StyleBox">
- [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed.
- </theme_item>
- <theme_item name="draw_guides" data_type="constant" type="int" default="1">
- Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item.
- </theme_item>
- <theme_item name="draw_relationship_lines" data_type="constant" type="int" default="0">
- Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy.
- </theme_item>
<theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 0.3, 0.2, 1)">
[Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations.
</theme_item>
- <theme_item name="font" data_type="font" type="Font">
- [Font] of the item's text.
- </theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)">
Default text [Color] of the item.
</theme_item>
@@ -543,36 +482,45 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the item is selected.
</theme_item>
- <theme_item name="font_size" data_type="font_size" type="int">
- Font size of the item's text.
- </theme_item>
<theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)">
[Color] of the guideline.
</theme_item>
+ <theme_item name="parent_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The [Color] of the relationship lines between the selected [TreeItem] and its parents.
+ </theme_item>
+ <theme_item name="relationship_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
+ The default [Color] of the relationship lines.
+ </theme_item>
+ <theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
+ Default text [Color] of the title button.
+ </theme_item>
+ <theme_item name="button_margin" data_type="constant" type="int" default="4">
+ The horizontal space between each button in a cell.
+ </theme_item>
+ <theme_item name="children_hl_line_width" data_type="constant" type="int" default="1">
+ The width of the relationship lines between the selected [TreeItem] and its children.
+ </theme_item>
+ <theme_item name="draw_guides" data_type="constant" type="int" default="1">
+ Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item.
+ </theme_item>
+ <theme_item name="draw_relationship_lines" data_type="constant" type="int" default="0">
+ Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy.
+ </theme_item>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled.
</theme_item>
- <theme_item name="indeterminate" data_type="icon" type="Texture2D">
- The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate.
- </theme_item>
<theme_item name="item_margin" data_type="constant" type="int" default="12">
The horizontal margin at the start of an item. This is used when folding is enabled for the item.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
</theme_item>
- <theme_item name="parent_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
- The [Color] of the relationship lines between the selected [TreeItem] and its parents.
- </theme_item>
<theme_item name="parent_hl_line_margin" data_type="constant" type="int" default="0">
The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected.
</theme_item>
<theme_item name="parent_hl_line_width" data_type="constant" type="int" default="1">
The width of the relationship lines between the selected [TreeItem] and its parents.
</theme_item>
- <theme_item name="relationship_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
- The default [Color] of the relationship lines.
- </theme_item>
<theme_item name="relationship_line_width" data_type="constant" type="int" default="1">
The default width of the relationship lines.
</theme_item>
@@ -582,21 +530,72 @@
<theme_item name="scroll_speed" data_type="constant" type="int" default="12">
The speed of border scrolling.
</theme_item>
+ <theme_item name="vseparation" data_type="constant" type="int" default="4">
+ The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the item's text.
+ </theme_item>
+ <theme_item name="title_button_font" data_type="font" type="Font">
+ [Font] of the title button's text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the item's text.
+ </theme_item>
+ <theme_item name="arrow" data_type="icon" type="Texture2D">
+ The arrow icon used when a foldable item is not collapsed.
+ </theme_item>
+ <theme_item name="arrow_collapsed" data_type="icon" type="Texture2D">
+ The arrow icon used when a foldable item is collapsed (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="arrow_collapsed_mirrored" data_type="icon" type="Texture2D">
+ The arrow icon used when a foldable item is collapsed (for right-to-left layouts).
+ </theme_item>
+ <theme_item name="checked" data_type="icon" type="Texture2D">
+ The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked.
+ </theme_item>
+ <theme_item name="indeterminate" data_type="icon" type="Texture2D">
+ The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate.
+ </theme_item>
<theme_item name="select_arrow" data_type="icon" type="Texture2D">
The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
</theme_item>
+ <theme_item name="unchecked" data_type="icon" type="Texture2D">
+ The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked.
+ </theme_item>
+ <theme_item name="updown" data_type="icon" type="Texture2D">
+ The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
+ </theme_item>
+ <theme_item name="bg" data_type="style" type="StyleBox">
+ Default [StyleBox] for the [Tree], i.e. used when the control is not being focused.
+ </theme_item>
+ <theme_item name="bg_focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the [Tree] is being focused.
+ </theme_item>
+ <theme_item name="button_pressed" data_type="style" type="StyleBox">
+ [StyleBox] used when a button in the tree is pressed.
+ </theme_item>
+ <theme_item name="cursor" data_type="style" type="StyleBox">
+ [StyleBox] used for the cursor, when the [Tree] is being focused.
+ </theme_item>
+ <theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
+ [StyleBox] used for the cursor, when the [Tree] is not being focused.
+ </theme_item>
+ <theme_item name="custom_button" data_type="style" type="StyleBox">
+ Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell.
+ </theme_item>
+ <theme_item name="custom_button_hover" data_type="style" type="StyleBox">
+ [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
+ </theme_item>
+ <theme_item name="custom_button_pressed" data_type="style" type="StyleBox">
+ [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed.
+ </theme_item>
<theme_item name="selected" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [Tree] is not being focused.
</theme_item>
<theme_item name="selected_focus" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [Tree] is being focused.
</theme_item>
- <theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
- Default text [Color] of the title button.
- </theme_item>
- <theme_item name="title_button_font" data_type="font" type="Font">
- [Font] of the title button's text.
- </theme_item>
<theme_item name="title_button_hover" data_type="style" type="StyleBox">
[StyleBox] used when the title button is being hovered.
</theme_item>
@@ -606,14 +605,5 @@
<theme_item name="title_button_pressed" data_type="style" type="StyleBox">
[StyleBox] used when the title button is being pressed.
</theme_item>
- <theme_item name="unchecked" data_type="icon" type="Texture2D">
- The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked.
- </theme_item>
- <theme_item name="updown" data_type="icon" type="Texture2D">
- The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
- </theme_item>
- <theme_item name="vseparation" data_type="constant" type="int" default="4">
- The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border.
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index b997d87ac0..7da98788bb 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -293,8 +293,8 @@
Returns the given column's text.
</description>
</method>
- <method name="get_text_align" qualifiers="const">
- <return type="int" enum="TreeItem.TextAlign" />
+ <method name="get_text_alignment" qualifiers="const">
+ <return type="int" enum="HorizontalAlignment" />
<argument index="0" name="column" type="int" />
<description>
Returns the given column's text alignment.
@@ -623,12 +623,12 @@
Sets the given column's text value.
</description>
</method>
- <method name="set_text_align">
+ <method name="set_text_alignment">
<return type="void" />
<argument index="0" name="column" type="int" />
- <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign" />
+ <argument index="1" name="text_alignment" type="int" enum="HorizontalAlignment" />
<description>
- Sets the given column's text alignment. See [enum TextAlign] for possible values.
+ Sets the given column's text alignment. See [enum HorizontalAlignment] for possible values.
</description>
</method>
<method name="set_text_direction">
@@ -679,14 +679,5 @@
</constant>
<constant name="CELL_MODE_CUSTOM" value="4" enum="TreeCellMode">
</constant>
- <constant name="ALIGN_LEFT" value="0" enum="TextAlign">
- Align text to the left. See [code]set_text_align()[/code].
- </constant>
- <constant name="ALIGN_CENTER" value="1" enum="TextAlign">
- Center text. See [code]set_text_align()[/code].
- </constant>
- <constant name="ALIGN_RIGHT" value="2" enum="TextAlign">
- Align text to the right. See [code]set_text_align()[/code].
- </constant>
</constants>
</class>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 044460f569..0bb64fb845 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -162,7 +162,7 @@
<method name="get_history_count">
<return type="int" />
<description>
- Return how many elements are in the history.
+ Returns how many elements are in the history.
</description>
</method>
<method name="get_version" qualifiers="const">
diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml
index 0cf06576f6..09df3411d8 100644
--- a/doc/classes/VScrollBar.xml
+++ b/doc/classes/VScrollBar.xml
@@ -9,8 +9,8 @@
<tutorials>
</tutorials>
<members>
- <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" override="true" default="0" />
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="1" />
+ <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" default="0" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
</members>
<theme_items>
<theme_item name="decrement" data_type="icon" type="Texture2D">
@@ -22,15 +22,6 @@
<theme_item name="decrement_pressed" data_type="icon" type="Texture2D">
Displayed when the decrement button is being pressed.
</theme_item>
- <theme_item name="grabber" data_type="style" type="StyleBox">
- Used as texture for the grabber, the draggable element representing current scroll.
- </theme_item>
- <theme_item name="grabber_highlight" data_type="style" type="StyleBox">
- Used when the mouse hovers over the grabber.
- </theme_item>
- <theme_item name="grabber_pressed" data_type="style" type="StyleBox">
- Used when the grabber is being dragged.
- </theme_item>
<theme_item name="increment" data_type="icon" type="Texture2D">
Icon used as a button to scroll the [ScrollBar] down. Supports custom step using the [member ScrollBar.custom_step] property.
</theme_item>
@@ -40,6 +31,15 @@
<theme_item name="increment_pressed" data_type="icon" type="Texture2D">
Displayed when the increment button is being pressed.
</theme_item>
+ <theme_item name="grabber" data_type="style" type="StyleBox">
+ Used as texture for the grabber, the draggable element representing current scroll.
+ </theme_item>
+ <theme_item name="grabber_highlight" data_type="style" type="StyleBox">
+ Used when the mouse hovers over the grabber.
+ </theme_item>
+ <theme_item name="grabber_pressed" data_type="style" type="StyleBox">
+ Used when the grabber is being dragged.
+ </theme_item>
<theme_item name="scroll" data_type="style" type="StyleBox">
Used as background of this [ScrollBar].
</theme_item>
diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml
index 286674a9b4..c1fea97ddc 100644
--- a/doc/classes/VSlider.xml
+++ b/doc/classes/VSlider.xml
@@ -10,29 +10,29 @@
<tutorials>
</tutorials>
<members>
- <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" override="true" default="0" />
- <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="1" />
+ <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" default="0" />
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
</members>
<theme_items>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The texture for the grabber (the draggable element).
</theme_item>
- <theme_item name="grabber_area" data_type="style" type="StyleBox">
- The background of the area below the grabber.
- </theme_item>
- <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
- </theme_item>
<theme_item name="grabber_disabled" data_type="icon" type="Texture2D">
The texture for the grabber when it's disabled.
</theme_item>
<theme_item name="grabber_highlight" data_type="icon" type="Texture2D">
The texture for the grabber when it's focused.
</theme_item>
- <theme_item name="slider" data_type="style" type="StyleBox">
- The background for the whole slider. Determines the width of the [code]grabber_area[/code].
- </theme_item>
<theme_item name="tick" data_type="icon" type="Texture2D">
The texture for the ticks, visible when [member Slider.tick_count] is greater than 0.
</theme_item>
+ <theme_item name="grabber_area" data_type="style" type="StyleBox">
+ The background of the area below the grabber.
+ </theme_item>
+ <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
+ </theme_item>
+ <theme_item name="slider" data_type="style" type="StyleBox">
+ The background for the whole slider. Determines the width of the [code]grabber_area[/code].
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml
index 323ce1fe80..6316068e9d 100644
--- a/doc/classes/VSplitContainer.xml
+++ b/doc/classes/VSplitContainer.xml
@@ -12,13 +12,13 @@
<theme_item name="autohide" data_type="constant" type="int" default="1">
Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
</theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
+ <theme_item name="separation" data_type="constant" type="int" default="12">
+ The space between sides of the container.
</theme_item>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The icon used for the grabber drawn in the middle area.
</theme_item>
- <theme_item name="separation" data_type="constant" type="int" default="12">
- The space between sides of the container.
+ <theme_item name="bg" data_type="style" type="StyleBox">
</theme_item>
</theme_items>
</class>
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..6c39efd2f9 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>
@@ -94,7 +95,7 @@
<method name="ceil" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the vector with all components rounded up (towards positive infinity).
+ Returns a new vector with all components rounded up (towards positive infinity).
</description>
</method>
<method name="clamp" qualifiers="const">
@@ -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>
@@ -157,7 +158,7 @@
<method name="floor" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the vector with all components rounded down (towards negative infinity).
+ Returns a new vector with all components rounded down (towards negative infinity).
</description>
</method>
<method name="from_angle" qualifiers="static">
@@ -213,12 +214,24 @@
Returns the vector with a maximum length by limiting its length to [code]length[/code].
</description>
</method>
+ <method name="max_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
+ </description>
+ </method>
+ <method name="min_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y].
+ </description>
+ </method>
<method name="move_toward" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="to" type="Vector2" />
<argument index="1" name="delta" type="float" />
<description>
- Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount.
+ Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value.
</description>
</method>
<method name="normalized" qualifiers="const">
@@ -251,14 +264,14 @@
<return type="Vector2" />
<argument index="0" name="b" type="Vector2" />
<description>
- Returns the vector projected onto the vector [code]b[/code].
+ Returns this vector projected onto the vector [code]b[/code].
</description>
</method>
<method name="reflect" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="n" type="Vector2" />
<description>
- Returns the vector reflected from a plane defined by the given normal.
+ Returns the vector reflected (i.e. mirrored, or symmetric) over a line defined by the given direction vector [code]n[/code].
</description>
</method>
<method name="rotated" qualifiers="const">
@@ -271,13 +284,13 @@
<method name="round" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
+ Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
</description>
</method>
<method name="sign" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
<method name="slerp" qualifiers="const">
@@ -286,7 +299,7 @@
<argument index="1" name="weight" type="float" />
<description>
Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
- [b]Note:[/b] Both vectors must be normalized.
+ This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp].
</description>
</method>
<method name="slide" qualifiers="const">
@@ -314,10 +327,10 @@
</members>
<constants>
<constant name="AXIS_X" value="0">
- Enumerated value for the X axis.
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Y" value="1">
- Enumerated value for the Y axis.
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector2(0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
@@ -351,72 +364,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 +466,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..721c73d603 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>
@@ -53,7 +53,7 @@
<method name="aspect" qualifiers="const">
<return type="float" />
<description>
- Returns the ratio of [member x] to [member y].
+ Returns the aspect ratio of this vector, the ratio of [member x] to [member y].
</description>
</method>
<method name="clamp" qualifiers="const">
@@ -64,10 +64,35 @@
Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
+ <method name="length" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the length (magnitude) of this vector.
+ </description>
+ </method>
+ <method name="length_squared" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the squared length (squared magnitude) of this vector.
+ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
+ </description>
+ </method>
+ <method name="max_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
+ </description>
+ </method>
+ <method name="min_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y].
+ </description>
+ </method>
<method name="sign" qualifiers="const">
<return type="Vector2i" />
<description>
- Returns the vector with each component set to one or negative one, depending on the signs of the components.
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
</methods>
@@ -81,10 +106,10 @@
</members>
<constants>
<constant name="AXIS_X" value="0">
- Enumerated value for the X axis.
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Y" value="1">
- Enumerated value for the Y axis.
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector2i(0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
@@ -115,78 +140,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 +260,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..ead08d86df 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">
@@ -96,36 +96,36 @@
<argument index="2" name="post_b" type="Vector3" />
<argument index="3" name="weight" type="float" />
<description>
- Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Performs a cubic interpolation between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</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].
@@ -184,16 +184,16 @@
Returns the vector with a maximum length by limiting its length to [code]length[/code].
</description>
</method>
- <method name="max_axis" qualifiers="const">
+ <method name="max_axis_index" qualifiers="const">
<return type="int" />
<description>
- Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
- <method name="min_axis" qualifiers="const">
+ <method name="min_axis_index" qualifiers="const">
<return type="int" />
<description>
- Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
</description>
</method>
<method name="move_toward" qualifiers="const">
@@ -201,7 +201,7 @@
<argument index="0" name="to" type="Vector3" />
<argument index="1" name="delta" type="float" />
<description>
- Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount.
+ Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value.
</description>
</method>
<method name="normalized" qualifiers="const">
@@ -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">
@@ -246,7 +246,7 @@
<return type="Vector3" />
<argument index="0" name="b" type="Vector3" />
<description>
- Returns this vector projected onto another vector [code]b[/code].
+ Returns this vector projected onto the vector [code]b[/code].
</description>
</method>
<method name="reflect" qualifiers="const">
@@ -267,13 +267,13 @@
<method name="round" qualifiers="const">
<return type="Vector3" />
<description>
- Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
+ Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
</description>
</method>
<method name="sign" qualifiers="const">
<return type="Vector3" />
<description>
- Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
<method name="signed_angle_to" qualifiers="const">
@@ -290,7 +290,7 @@
<argument index="1" name="weight" type="float" />
<description>
Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
- [b]Note:[/b] Both vectors must be normalized.
+ This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp].
</description>
</method>
<method name="slide" qualifiers="const">
@@ -321,13 +321,13 @@
</members>
<constants>
<constant name="AXIS_X" value="0">
- Enumerated value for the X axis. Returned by [method max_axis] and [method min_axis].
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Y" value="1">
- Enumerated value for the Y axis. Returned by [method max_axis] and [method min_axis].
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Z" value="2">
- Enumerated value for the Z axis. Returned by [method max_axis] and [method min_axis].
+ Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector3(0, 0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
@@ -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..da729e1ec2 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>
@@ -58,16 +58,29 @@
Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
- <method name="max_axis" qualifiers="const">
+ <method name="length" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the length (magnitude) of this vector.
+ </description>
+ </method>
+ <method name="length_squared" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the squared length (squared magnitude) of this vector.
+ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
+ </description>
+ </method>
+ <method name="max_axis_index" qualifiers="const">
<return type="int" />
<description>
- Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
- <method name="min_axis" qualifiers="const">
+ <method name="min_axis_index" qualifiers="const">
<return type="int" />
<description>
- Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
</description>
</method>
<method name="sign" qualifiers="const">
@@ -90,13 +103,13 @@
</members>
<constants>
<constant name="AXIS_X" value="0">
- Enumerated value for the X axis.
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Y" value="1">
- Enumerated value for the Y axis.
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Z" value="2">
- Enumerated value for the Z axis.
+ Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector3i(0, 0, 0)">
Zero vector, a vector with all components set to [code]0[/code].
@@ -133,78 +146,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 +266,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/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml
index 9315f6e6ad..9960eeedc2 100644
--- a/doc/classes/VehicleBody3D.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -20,7 +20,7 @@
[b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.
A negative value will result in the vehicle reversing.
</member>
- <member name="mass" type="float" setter="set_mass" getter="get_mass" override="true" default="40.0" />
+ <member name="mass" type="float" setter="set_mass" getter="get_mass" overrides="RigidDynamicBody3D" default="40.0" />
<member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0">
The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated.
</member>
diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml
index 951f4f8275..17a9e9f7da 100644
--- a/doc/classes/VehicleWheel3D.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -11,6 +11,13 @@
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
</tutorials>
<methods>
+ <method name="get_contact_body" qualifiers="const">
+ <return type="Node3D" />
+ <description>
+ Returns the contacting body node if valid in the tree, as [Node3D]. At the moment, [GridMap] is not supported so the node will be always of type [PhysicsBody3D].
+ Returns [code]null[/code] if the wheel is not in contact with a surface, or the contact body is not a [PhysicsBody3D].
+ </description>
+ </method>
<method name="get_rpm" qualifiers="const">
<return type="float" />
<description>
diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml
index 39fefa8d95..5978e73ac5 100644
--- a/doc/classes/VideoStream.xml
+++ b/doc/classes/VideoStream.xml
@@ -4,7 +4,7 @@
Base resource for video streams.
</brief_description>
<description>
- Base resource type for all video streams. Classes that derive from [VideoStream] can all be used as resource types to play back videos in [VideoPlayer].
+ Base resource type for all video streams. Classes that derive from [VideoStream] can all be used as resource types to play back videos in [VideoStreamPlayer].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoStreamPlayer.xml
index c8590988f5..3aa9a8a295 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoStreamPlayer.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoPlayer" inherits="Control" version="4.0">
+<class name="VideoStreamPlayer" inherits="Control" version="4.0">
<brief_description>
Control for playing video streams.
</brief_description>
<description>
Control node for playing video streams using [VideoStream] resources.
Supported video formats are [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]) and any format exposed via a GDNative plugin using [VideoStreamGDNative].
- [b]Note:[/b] Due to a bug, VideoPlayer does not support localization remapping yet.
+ [b]Note:[/b] Due to a bug, VideoStreamPlayer does not support localization remapping yet.
[b]Warning:[/b] On HTML5, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations.
</description>
<tutorials>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index e79cf0d233..4a11fbb489 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>
@@ -201,10 +215,13 @@
</member>
<member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true">
</member>
- <member name="lod_threshold" type="float" setter="set_lod_threshold" getter="get_lod_threshold" default="1.0">
+ <member name="mesh_lod_threshold" type="float" setter="set_mesh_lod_threshold" getter="get_mesh_lod_threshold" default="1.0">
+ The automatic LOD bias to use for meshes rendered within the [Viewport] (this is analogous to [member ReflectionProbe.mesh_lod_threshold]). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to [code]0.0[/code], automatic LOD is disabled. Increase [member mesh_lod_threshold] to improve performance at the cost of geometry detail.
+ To control this property on the root viewport, set the [member ProjectSettings.rendering/mesh_lod/lod_change/threshold_pixels] project setting.
+ [b]Note:[/b] [member mesh_lod_threshold] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD).
</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 +229,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 +322,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>
@@ -378,29 +409,32 @@
<constant name="DEBUG_DRAW_SSAO" value="12" enum="DebugDraw">
Draws the screen-space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment].
</constant>
- <constant name="DEBUG_DRAW_PSSM_SPLITS" value="13" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_SSIL" value="13" enum="DebugDraw">
+ Draws the screen-space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssil_enabled] set in your [WorldEnvironment].
+ </constant>
+ <constant name="DEBUG_DRAW_PSSM_SPLITS" value="14" enum="DebugDraw">
Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order, they will be colored red, green, blue, and yellow.
</constant>
- <constant name="DEBUG_DRAW_DECAL_ATLAS" value="14" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_DECAL_ATLAS" value="15" enum="DebugDraw">
Draws the decal atlas used by [Decal]s and light projector textures in the upper left quadrant of the [Viewport].
</constant>
- <constant name="DEBUG_DRAW_SDFGI" value="15" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_SDFGI" value="16" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_SDFGI_PROBES" value="16" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_SDFGI_PROBES" value="17" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_GI_BUFFER" value="17" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_GI_BUFFER" value="18" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_DISABLE_LOD" value="18" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_DISABLE_LOD" value="19" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="19" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="20" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="20" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="21" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_CLUSTER_DECALS" value="21" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_CLUSTER_DECALS" value="22" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="23" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_OCCLUDERS" value="23" enum="DebugDraw">
+ <constant name="DEBUG_DRAW_OCCLUDERS" value="24" enum="DebugDraw">
</constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter">
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
index c0cf3b3c7b..de32413fdd 100644
--- a/doc/classes/ViewportTexture.xml
+++ b/doc/classes/ViewportTexture.xml
@@ -14,7 +14,7 @@
<link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link>
</tutorials>
<members>
- <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="true" />
<member name="viewport_path" type="NodePath" setter="set_viewport_path_in_scene" getter="get_viewport_path_in_scene" default="NodePath(&quot;&quot;)">
The path to the [Viewport] node to display. This is relative to the scene root, not to the node which uses the texture.
</member>
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 58f345b8f9..b9ff711f44 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">
@@ -25,7 +25,7 @@
</method>
<method name="_get_code" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="input_vars" type="PackedStringArray" />
+ <argument index="0" name="input_vars" type="String[]" />
<argument index="1" name="output_vars" type="String[]" />
<argument index="2" name="mode" type="int" enum="Shader.Mode" />
<argument index="3" name="type" type="int" enum="VisualShader.Type" />
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/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml
index d2782efa96..316529a347 100644
--- a/doc/classes/VisualShaderNodeIntFunc.xml
+++ b/doc/classes/VisualShaderNodeIntFunc.xml
@@ -23,7 +23,10 @@
<constant name="FUNC_SIGN" value="2" enum="Function">
Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
</constant>
- <constant name="FUNC_MAX" value="3" enum="Function">
+ <constant name="FUNC_BITWISE_NOT" value="3" enum="Function">
+ Returns the result of bitwise [code]NOT[/code] operation on the integer. Translates to [code]~a[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="FUNC_MAX" value="4" enum="Function">
Represents the size of the [enum Function] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml
index e5fcafca81..c685592fd0 100644
--- a/doc/classes/VisualShaderNodeIntOp.xml
+++ b/doc/classes/VisualShaderNodeIntOp.xml
@@ -35,7 +35,22 @@
<constant name="OP_MIN" value="6" enum="Operator">
Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
</constant>
- <constant name="OP_ENUM_SIZE" value="7" enum="Operator">
+ <constant name="OP_BITWISE_AND" value="7" enum="Operator">
+ Returns the result of bitwise [code]AND[/code] operation on the integer. Translates to [code]a &amp; b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_BITWISE_OR" value="8" enum="Operator">
+ Returns the result of bitwise [code]OR[/code] operation for two integers. Translates to [code]a | b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_BITWISE_XOR" value="9" enum="Operator">
+ Returns the result of bitwise [code]XOR[/code] operation for two integers. Translates to [code]a ^ b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_BITWISE_LEFT_SHIFT" value="10" enum="Operator">
+ Returns the result of bitwise left shift operation on the integer. Translates to [code]a &lt;&lt; b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_BITWISE_RIGHT_SHIFT" value="11" enum="Operator">
+ Returns the result of bitwise right shift operation on the integer. Translates to [code]a &gt;&gt; b[/code] in the Godot Shader Language.
+ </constant>
+ <constant name="OP_ENUM_SIZE" value="12" enum="Operator">
Represents the size of the [enum Operator] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml
index 26c72d2714..8da4325564 100644
--- a/doc/classes/VisualShaderNodeTextureUniform.xml
+++ b/doc/classes/VisualShaderNodeTextureUniform.xml
@@ -12,6 +12,12 @@
<member name="color_default" type="int" setter="set_color_default" getter="get_color_default" enum="VisualShaderNodeTextureUniform.ColorDefault" default="0">
Sets the default color if no texture is assigned to the uniform.
</member>
+ <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="VisualShaderNodeTextureUniform.TextureFilter" default="0">
+ Sets the texture filtering mode. See [enum TextureFilter] for options.
+ </member>
+ <member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="VisualShaderNodeTextureUniform.TextureRepeat" default="0">
+ Sets the texture repeating mode. See [enum TextureRepeat] for options.
+ </member>
<member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureUniform.TextureType" default="0">
Defines the type of data provided by the source texture. See [enum TextureType] for options.
</member>
@@ -26,8 +32,8 @@
<constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
</constant>
- <constant name="TYPE_ANISO" value="3" enum="TextureType">
- Adds [code]hint_aniso[/code] as hint to the uniform declaration to use for a flowmap.
+ <constant name="TYPE_ANISOTROPY" value="3" enum="TextureType">
+ Adds [code]hint_anisotropy[/code] as hint to the uniform declaration to use for a flowmap.
</constant>
<constant name="TYPE_MAX" value="4" enum="TextureType">
Represents the size of the [enum TextureType] enum.
@@ -41,5 +47,31 @@
<constant name="COLOR_DEFAULT_MAX" value="2" enum="ColorDefault">
Represents the size of the [enum ColorDefault] enum.
</constant>
+ <constant name="FILTER_DEFAULT" value="0" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_NEAREST" value="1" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_LINEAR" value="2" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_NEAREST_MIPMAP" value="3" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_LINEAR_MIPMAP" value="4" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_NEAREST_MIPMAP_ANISOTROPIC" value="5" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_LINEAR_MIPMAP_ANISOTROPIC" value="6" enum="TextureFilter">
+ </constant>
+ <constant name="FILTER_MAX" value="7" enum="TextureFilter">
+ Represents the size of the [enum TextureFilter] enum.
+ </constant>
+ <constant name="REPEAT_DEFAULT" value="0" enum="TextureRepeat">
+ </constant>
+ <constant name="REPEAT_ENABLED" value="1" enum="TextureRepeat">
+ </constant>
+ <constant name="REPEAT_DISABLED" value="2" enum="TextureRepeat">
+ </constant>
+ <constant name="REPEAT_MAX" value="3" enum="TextureRepeat">
+ Represents the size of the [enum TextureRepeat] enum.
+ </constant>
</constants>
</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..f9688c0bc3 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">
+ <member name="dynamic_range" type="float" setter="set_dynamic_range" getter="get_dynamic_range" default="2.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..75161d3c5b 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" />
@@ -281,6 +287,8 @@
</member>
<member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0">
</member>
+ <member name="content_scale_factor" type="float" setter="set_content_scale_factor" getter="get_content_scale_factor" default="1.0">
+ </member>
<member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0">
</member>
<member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)">
@@ -384,7 +392,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.
@@ -431,34 +439,34 @@
</constant>
</constants>
<theme_items>
- <theme_item name="close" data_type="icon" type="Texture2D">
+ <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
</theme_item>
- <theme_item name="close_h_ofs" data_type="constant" type="int" default="18">
+ <theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ The color of the title outline.
</theme_item>
- <theme_item name="close_pressed" data_type="icon" type="Texture2D">
+ <theme_item name="close_h_ofs" data_type="constant" type="int" default="18">
</theme_item>
<theme_item name="close_v_ofs" data_type="constant" type="int" default="18">
</theme_item>
- <theme_item name="embedded_border" data_type="style" type="StyleBox">
- </theme_item>
<theme_item name="resize_margin" data_type="constant" type="int" default="4">
</theme_item>
<theme_item name="scaleborder_size" data_type="constant" type="int" default="4">
</theme_item>
- <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
+ <theme_item name="title_height" data_type="constant" type="int" default="20">
+ </theme_item>
+ <theme_item name="title_outline_size" data_type="constant" type="int" default="0">
+ The size of the title outline.
</theme_item>
<theme_item name="title_font" data_type="font" type="Font">
</theme_item>
<theme_item name="title_font_size" data_type="font_size" type="int">
The size of the title font.
</theme_item>
- <theme_item name="title_height" data_type="constant" type="int" default="20">
+ <theme_item name="close" data_type="icon" type="Texture2D">
</theme_item>
- <theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- The color of the title outline.
+ <theme_item name="close_pressed" data_type="icon" type="Texture2D">
</theme_item>
- <theme_item name="title_outline_size" data_type="constant" type="int" default="0">
- The size of the title outline.
+ <theme_item name="embedded_border" data_type="style" type="StyleBox">
</theme_item>
</theme_items>
</class>
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" />