summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml4
-rw-r--r--doc/classes/AcceptDialog.xml2
-rw-r--r--doc/classes/Animation.xml8
-rw-r--r--doc/classes/AnimationTree.xml4
-rw-r--r--doc/classes/BaseMaterial3D.xml2
-rw-r--r--doc/classes/Basis.xml10
-rw-r--r--doc/classes/Bone2D.xml69
-rw-r--r--doc/classes/CharacterBody2D.xml129
-rw-r--r--doc/classes/CharacterBody3D.xml112
-rw-r--r--doc/classes/CollisionObject3D.xml12
-rw-r--r--doc/classes/ConcavePolygonShape3D.xml2
-rw-r--r--doc/classes/Control.xml4
-rw-r--r--doc/classes/EditorDebuggerPlugin.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml2
-rw-r--r--doc/classes/Environment.xml2
-rw-r--r--doc/classes/KinematicBody2D.xml176
-rw-r--r--doc/classes/KinematicBody3D.xml188
-rw-r--r--doc/classes/KinematicCollision2D.xml4
-rw-r--r--doc/classes/KinematicCollision3D.xml4
-rw-r--r--doc/classes/Light3D.xml2
-rw-r--r--doc/classes/LightmapGI.xml (renamed from doc/classes/BakedLightmap.xml)10
-rw-r--r--doc/classes/LightmapGIData.xml (renamed from doc/classes/BakedLightmapData.xml)2
-rw-r--r--doc/classes/MultiplayerAPI.xml8
-rw-r--r--doc/classes/Node.xml95
-rw-r--r--doc/classes/Node2D.xml4
-rw-r--r--doc/classes/Node3D.xml6
-rw-r--r--doc/classes/PhysicalBone2D.xml49
-rw-r--r--doc/classes/PhysicalBone3D.xml36
-rw-r--r--doc/classes/PhysicsBody2D.xml40
-rw-r--r--doc/classes/PhysicsBody3D.xml80
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml2
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml2
-rw-r--r--doc/classes/PhysicsServer2D.xml12
-rw-r--r--doc/classes/PhysicsServer3D.xml30
-rw-r--r--doc/classes/PinJoint2D.xml2
-rw-r--r--doc/classes/PinJoint3D.xml2
-rw-r--r--doc/classes/PrimitiveMesh.xml2
-rw-r--r--doc/classes/ProjectSettings.xml12
-rw-r--r--doc/classes/Quaternion.xml (renamed from doc/classes/Quat.xml)90
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RenderingServer.xml16
-rw-r--r--doc/classes/RigidBody2D.xml30
-rw-r--r--doc/classes/RigidBody3D.xml53
-rw-r--r--doc/classes/SceneTree.xml1
-rw-r--r--doc/classes/Skeleton2D.xml54
-rw-r--r--doc/classes/SkeletonModification2D.xml104
-rw-r--r--doc/classes/SkeletonModification2DCCDIK.xml170
-rw-r--r--doc/classes/SkeletonModification2DFABRIK.xml108
-rw-r--r--doc/classes/SkeletonModification2DJiggle.xml232
-rw-r--r--doc/classes/SkeletonModification2DLookAt.xml107
-rw-r--r--doc/classes/SkeletonModification2DPhysicalBones.xml68
-rw-r--r--doc/classes/SkeletonModification2DStackHolder.xml32
-rw-r--r--doc/classes/SkeletonModification2DTwoBoneIK.xml94
-rw-r--r--doc/classes/SkeletonModificationStack2D.xml108
-rw-r--r--doc/classes/StaticBody2D.xml15
-rw-r--r--doc/classes/StaticBody3D.xml15
-rw-r--r--doc/classes/TextServer.xml2
-rw-r--r--doc/classes/Transform2D.xml35
-rw-r--r--doc/classes/Vector3.xml2
-rw-r--r--doc/classes/Viewport.xml12
-rw-r--r--doc/classes/VisualShaderNode.xml16
-rw-r--r--doc/classes/VisualShaderNodeUVFunc.xml28
-rw-r--r--doc/classes/VoxelGI.xml (renamed from doc/classes/GIProbe.xml)20
-rw-r--r--doc/classes/VoxelGIData.xml (renamed from doc/classes/GIProbeData.xml)2
-rw-r--r--doc/classes/YSort.xml21
-rw-r--r--doc/classes/float.xml6
-rw-r--r--doc/classes/int.xml4
67 files changed, 1823 insertions, 756 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 00bfb3dbb9..ed0cf5bd5d 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -2596,8 +2596,8 @@
<constant name="TYPE_PLANE" value="12" enum="Variant.Type">
Variable is of type [Plane].
</constant>
- <constant name="TYPE_QUAT" value="13" enum="Variant.Type">
- Variable is of type [Quat].
+ <constant name="TYPE_QUATERNION" value="13" enum="Variant.Type">
+ Variable is of type [Quaternion].
</constant>
<constant name="TYPE_AABB" value="14" enum="Variant.Type">
Variable is of type [AABB].
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index f4cf246713..f644606040 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -49,7 +49,7 @@
<method name="register_text_enter">
<return type="void">
</return>
- <argument index="0" name="line_edit" type="Node">
+ <argument index="0" name="line_edit" type="Control">
</argument>
<description>
Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 7ceb21d22e..02203a3725 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -640,7 +640,7 @@
</argument>
<argument index="2" name="location" type="Vector3">
</argument>
- <argument index="3" name="rotation" type="Quat">
+ <argument index="3" name="rotation" type="Quaternion">
</argument>
<argument index="4" name="scale" type="Vector3">
</argument>
@@ -656,7 +656,7 @@
<argument index="1" name="time_sec" type="float">
</argument>
<description>
- Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]).
+ Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quaternion]) and scale ([Vector3]).
</description>
</method>
<method name="value_track_get_key_indices" qualifiers="const">
@@ -727,8 +727,8 @@
<constant name="TYPE_VALUE" value="0" enum="TrackType">
Value tracks set values in node properties, but only those which can be Interpolated.
</constant>
- <constant name="TYPE_TRANSFORM" value="1" enum="TrackType">
- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are interpolated.
+ <constant name="TYPE_TRANSFORM3D" value="1" enum="TrackType">
+ Transform3D tracks are used to change node local transforms or skeleton pose bones of 3D nodes. Transitions are interpolated.
</constant>
<constant name="TYPE_METHOD" value="2" enum="TrackType">
Method tracks call functions with given arguments per key.
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index 07ce30db5d..af7d8d73e8 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -24,7 +24,7 @@
<return type="Transform3D">
</return>
<description>
- Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation.
+ Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM3D], returns an identity transformation.
</description>
</method>
<method name="rename_parameter">
@@ -50,7 +50,7 @@
</member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
- If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place.
+ If the track has type [constant Animation.TYPE_TRANSFORM3D], the transformation will be cancelled visually, and the animation will appear to stay in place.
</member>
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
The root animation node of this [AnimationTree]. See [AnimationNode].
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 0a7b4c5dab..3b4a001f7e 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -199,7 +199,7 @@
The emitted light's color. See [member emission_enabled].
</member>
<member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [GIProbe] is used and this object is used in baked lighting.
+ If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [VoxelGI] is used and this object is used in baked lighting.
</member>
<member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0">
The emitted light's strength. See [member emission_enabled].
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index f01a11e399..14fca04672 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -53,13 +53,13 @@
</argument>
<description>
Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle).
- Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles.
+ Consider using the [Quaternion] constructor instead, which uses a quaternion instead of Euler angles.
</description>
</method>
<method name="Basis" qualifiers="constructor">
<return type="Basis">
</return>
- <argument index="0" name="from" type="Quat">
+ <argument index="0" name="from" type="Quaternion">
</argument>
<description>
Constructs a pure rotation basis matrix from the given quaternion.
@@ -91,7 +91,7 @@
</return>
<description>
Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
- Consider using the [method get_rotation_quat] method instead, which returns a [Quat] quaternion instead of Euler angles.
+ Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles.
</description>
</method>
<method name="get_orthogonal_index" qualifiers="const">
@@ -101,8 +101,8 @@
This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the [GridMap] editor. For further details, refer to the Godot source code.
</description>
</method>
- <method name="get_rotation_quat" qualifiers="const">
- <return type="Quat">
+ <method name="get_rotation_quaternion" qualifiers="const">
+ <return type="Quaternion">
</return>
<description>
Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles.
diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml
index 910d488dfd..93744ddad7 100644
--- a/doc/classes/Bone2D.xml
+++ b/doc/classes/Bone2D.xml
@@ -19,6 +19,28 @@
Stores the node's current transforms in [member rest].
</description>
</method>
+ <method name="get_autocalculate_length_and_angle" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this [code]Bone2D[/code] node is going to autocalculate its length and bone angle using its first [code]Bone2D[/code] child node, if one exists. If there are no [code]Bone2D[/code] children, then it cannot autocalculate these values and will print a warning.
+ </description>
+ </method>
+ <method name="get_bone_angle" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the angle of the bone in the [code]Bone2D[/code] node.
+ [b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node.
+ </description>
+ </method>
+ <method name="get_default_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Deprecated. Please use [code]get_length[/code] instead.
+ </description>
+ </method>
<method name="get_index_in_skeleton" qualifiers="const">
<return type="int">
</return>
@@ -26,6 +48,13 @@
Returns the node's index as part of the entire skeleton. See [Skeleton2D].
</description>
</method>
+ <method name="get_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the length of the bone in the [code]Bone2D[/code] node.
+ </description>
+ </method>
<method name="get_skeleton_rest" qualifiers="const">
<return type="Transform2D">
</return>
@@ -33,11 +62,45 @@
Returns the node's [member rest] [code]Transform2D[/code] if it doesn't have a parent, or its rest pose relative to its parent.
</description>
</method>
+ <method name="set_autocalculate_length_and_angle">
+ <return type="void">
+ </return>
+ <argument index="0" name="auto_calculate" type="bool">
+ </argument>
+ <description>
+ When set to [code]true[/code], the [code]Bone2D[/code] node will attempt to automatically calculate the bone angle and length using the first child [code]Bone2D[/code] node, if one exists. If none exist, the [code]Bone2D[/code] cannot automatically calculate these values and will print a warning.
+ </description>
+ </method>
+ <method name="set_bone_angle">
+ <return type="void">
+ </return>
+ <argument index="0" name="angle" type="float">
+ </argument>
+ <description>
+ Sets the bone angle for the [code]Bone2D[/code] node. This is typically set to the rotation from the [code]Bone2D[/code] node to a child [code]Bone2D[/code] node.
+ [b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node.
+ </description>
+ </method>
+ <method name="set_default_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="default_length" type="float">
+ </argument>
+ <description>
+ Deprecated. Please use [code]set_length[/code] instead.
+ </description>
+ </method>
+ <method name="set_length">
+ <return type="void">
+ </return>
+ <argument index="0" name="length" type="float">
+ </argument>
+ <description>
+ Sets the length of the bone in the [code]Bone2D[/code] node.
+ </description>
+ </method>
</methods>
<members>
- <member name="default_length" type="float" setter="set_default_length" getter="get_default_length" default="16.0">
- Length of the bone's representation drawn in the editor's viewport in pixels.
- </member>
<member name="rest" type="Transform2D" setter="set_rest" getter="get_rest" default="Transform2D( 0, 0, 0, 0, 0, 0 )">
Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest].
</member>
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
new file mode 100644
index 0000000000..c3bb3d28e0
--- /dev/null
+++ b/doc/classes/CharacterBody2D.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CharacterBody2D" inherits="PhysicsBody2D" version="4.0">
+ <brief_description>
+ Character body 2D node.
+ </brief_description>
+ <description>
+ Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses:
+ [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
+ [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path.
+ </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="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>
+ <methods>
+ <method name="get_floor_normal" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ </description>
+ </method>
+ <method name="get_floor_velocity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ </description>
+ </method>
+ <method name="get_slide_collision">
+ <return type="KinematicCollision2D">
+ </return>
+ <argument index="0" name="slide_idx" type="int">
+ </argument>
+ <description>
+ Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
+ [b]Example usage:[/b]
+ [codeblocks]
+ [gdscript]
+ for i in get_slide_count():
+ var collision = get_slide_collision(i)
+ print("Collided with: ", collision.collider.name)
+ [/gdscript]
+ [csharp]
+ for (int i = 0; i &lt; GetSlideCount(); i++)
+ {
+ KinematicCollision2D collision = GetSlideCollision(i);
+ GD.Print("Collided with: ", (collision.Collider as Node).Name);
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="get_slide_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].
+ </description>
+ </method>
+ <method name="is_on_ceiling" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="is_on_floor" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="is_on_wall" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="move_and_slide">
+ <return type="void">
+ </return>
+ <description>
+ Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
+ This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08">
+ Extra margin used for collision recovery when calling [method move_and_slide].
+ If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
+ A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
+ A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies.
+ </member>
+ <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398">
+ Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees.
+ </member>
+ <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true">
+ If [code]true[/code], the body will be able to push [RigidBody2D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D].
+ </member>
+ <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_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="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4">
+ Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
+ </member>
+ <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
+ If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method PhysicsBody2D.move_and_collide] functions.
+ </member>
+ <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2( 0, 0 )">
+ When set to a value different from [code]Vector2(0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide].
+ As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector2(0, 0)[/code].
+ </member>
+ <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false">
+ If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still.
+ </member>
+ <member name="up_direction" type="Vector2" setter="set_up_direction" getter="get_up_direction" default="Vector2( 0, -1 )">
+ Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector2.UP[/code]. If set to [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
new file mode 100644
index 0000000000..986874df3b
--- /dev/null
+++ b/doc/classes/CharacterBody3D.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CharacterBody3D" inherits="PhysicsBody3D" version="4.0">
+ <brief_description>
+ Character body 3D node.
+ </brief_description>
+ <description>
+ Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses:
+ [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
+ [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path.
+ </description>
+ <tutorials>
+ <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/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>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
+ </tutorials>
+ <methods>
+ <method name="get_floor_normal" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ </description>
+ </method>
+ <method name="get_floor_velocity" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ </description>
+ </method>
+ <method name="get_slide_collision">
+ <return type="KinematicCollision3D">
+ </return>
+ <argument index="0" name="slide_idx" type="int">
+ </argument>
+ <description>
+ Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
+ </description>
+ </method>
+ <method name="get_slide_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].
+ </description>
+ </method>
+ <method name="is_on_ceiling" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="is_on_floor" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="is_on_wall" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code].
+ </description>
+ </method>
+ <method name="move_and_slide">
+ <return type="void">
+ </return>
+ <description>
+ Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
+ This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001">
+ Extra margin used for collision recovery when calling [method move_and_slide].
+ If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
+ A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
+ A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies.
+ </member>
+ <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398">
+ Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees.
+ </member>
+ <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true">
+ If [code]true[/code], the body will be able to push [RigidBody3D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D].
+ </member>
+ <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_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="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4">
+ Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
+ </member>
+ <member name="snap" type="Vector3" setter="set_snap" getter="get_snap" default="Vector3( 0, 0, 0 )">
+ When set to a value different from [code]Vector3(0, 0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide].
+ As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector3(0, 0, 0)[/code].
+ </member>
+ <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false">
+ If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still.
+ </member>
+ <member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3( 0, 1, 0 )">
+ Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector3.UP[/code]. If set to [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index eb71407cf2..4ab37f5c7b 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -16,14 +16,14 @@
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
- <argument index="2" name="click_position" type="Vector3">
+ <argument index="2" name="position" type="Vector3">
</argument>
- <argument index="3" name="click_normal" type="Vector3">
+ <argument index="3" name="normal" type="Vector3">
</argument>
<argument index="4" name="shape_idx" type="int">
</argument>
<description>
- Accepts unhandled [InputEvent]s. [code]click_position[/code] is the clicked location in world space and [code]click_normal[/code] is the normal vector extending from the clicked surface of the [Shape3D] at [code]shape_idx[/code]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events.
</description>
</method>
<method name="create_shape_owner">
@@ -243,14 +243,14 @@
</argument>
<argument index="1" name="event" type="InputEvent">
</argument>
- <argument index="2" name="click_position" type="Vector3">
+ <argument index="2" name="position" type="Vector3">
</argument>
- <argument index="3" name="click_normal" type="Vector3">
+ <argument index="3" name="normal" type="Vector3">
</argument>
<argument index="4" name="shape_idx" type="int">
</argument>
<description>
- Emitted when [method _input_event] receives an event. See its description for details.
+ Emitted when the object receives an unhandled [InputEvent]. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point.
</description>
</signal>
<signal name="mouse_entered">
diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml
index a9687abedc..b510905d1f 100644
--- a/doc/classes/ConcavePolygonShape3D.xml
+++ b/doc/classes/ConcavePolygonShape3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Concave polygon shape resource, which can be set into a [PhysicsBody3D] or area. This shape is created by feeding a list of triangles.
- Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [KinematicBody3D] or [RigidBody3D] with a mode other than Static.
+ Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidBody3D] with a mode other than Static.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index a9a230b78f..12344712a0 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1055,7 +1055,7 @@
Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" default="0.0">
- Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
+ Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0">
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.
@@ -1067,7 +1067,7 @@
Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [code]ui_left[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one.
</member>
<member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
+ Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
<member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml
index b97933e582..9484d33252 100644
--- a/doc/classes/EditorDebuggerPlugin.xml
+++ b/doc/classes/EditorDebuggerPlugin.xml
@@ -38,7 +38,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code].
+ Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code].
</description>
</method>
<method name="register_message_capture">
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index aa64ab4043..663eb0ff5c 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -92,7 +92,7 @@
return new Godot.Collections.Array{new Godot.Collections.Dictionary{{"name", "myOption"}, {"defaultValue", false}}};
}
- public override int Import(String sourceFile, String savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles)
+ public override int Import(String sourceFile, String savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles)
{
var file = new File();
if (file.Open(sourceFile, File.ModeFlags.Read) != Error.Ok)
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 6909fac2b7..878535a08d 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -206,7 +206,7 @@
The depth tolerance for screen-space reflections.
</member>
<member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" default="false">
- If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others.
+ If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [VoxelGI]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others.
</member>
<member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15">
The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection).
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
deleted file mode 100644
index fdd4db6115..0000000000
--- a/doc/classes/KinematicBody2D.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody2D" inherits="PhysicsBody2D" version="4.0">
- <brief_description>
- Kinematic body 2D node.
- </brief_description>
- <description>
- Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses:
- [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- [b]Kinematic characters:[/b] KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics.
- </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="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>
- <methods>
- <method name="get_floor_normal" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
- </description>
- </method>
- <method name="get_floor_velocity" qualifiers="const">
- <return type="Vector2">
- </return>
- <description>
- Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
- </description>
- </method>
- <method name="get_slide_collision">
- <return type="KinematicCollision2D">
- </return>
- <argument index="0" name="slide_idx" type="int">
- </argument>
- <description>
- Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
- [b]Example usage:[/b]
- [codeblocks]
- [gdscript]
- for i in get_slide_count():
- var collision = get_slide_collision(i)
- print("Collided with: ", collision.collider.name)
- [/gdscript]
- [csharp]
- for (int i = 0; i &lt; GetSlideCount(); i++)
- {
- KinematicCollision2D collision = GetSlideCollision(i);
- GD.Print("Collided with: ", (collision.Collider as Node).Name);
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
- <method name="get_slide_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap].
- </description>
- </method>
- <method name="is_on_ceiling" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="is_on_floor" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="is_on_wall" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="move_and_collide">
- <return type="KinematicCollision2D">
- </return>
- <argument index="0" name="rel_vec" type="Vector2">
- </argument>
- <argument index="1" name="infinite_inertia" type="bool" default="true">
- </argument>
- <argument index="2" name="exclude_raycast_shapes" type="bool" default="true">
- </argument>
- <argument index="3" name="test_only" type="bool" default="false">
- </argument>
- <description>
- Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
- If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
- </description>
- </method>
- <method name="move_and_slide">
- <return type="Vector2">
- </return>
- <argument index="0" name="linear_velocity" type="Vector2">
- </argument>
- <argument index="1" name="up_direction" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="2" name="stop_on_slope" type="bool" default="false">
- </argument>
- <argument index="3" name="max_slides" type="int" default="4">
- </argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <argument index="5" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
- This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
- [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
- If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
- If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
- [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
- If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody2D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D].
- Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
- </description>
- </method>
- <method name="move_and_slide_with_snap">
- <return type="Vector2">
- </return>
- <argument index="0" name="linear_velocity" type="Vector2">
- </argument>
- <argument index="1" name="snap" type="Vector2">
- </argument>
- <argument index="2" name="up_direction" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="3" name="stop_on_slope" type="bool" default="false">
- </argument>
- <argument index="4" name="max_slides" type="int" default="4">
- </argument>
- <argument index="5" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <argument index="6" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Moves the body while keeping it attached to slopes. Similar to [method move_and_slide].
- As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0)[/code] or by using [method move_and_slide] instead.
- </description>
- </method>
- <method name="test_move">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="Transform2D">
- </argument>
- <argument index="1" name="rel_vec" type="Vector2">
- </argument>
- <argument index="2" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
- </description>
- </method>
- </methods>
- <members>
- <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08">
- Extra margin used for collision recovery in motion functions (see [method move_and_collide], [method move_and_slide], [method move_and_slide_with_snap]).
- If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
- A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
- A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies.
- </member>
- <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
- If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method move_and_collide] functions.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml
deleted file mode 100644
index 1a197be0fb..0000000000
--- a/doc/classes/KinematicBody3D.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="KinematicBody3D" inherits="PhysicsBody3D" version="4.0">
- <brief_description>
- Kinematic body 3D node.
- </brief_description>
- <description>
- Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses:
- [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics.
- </description>
- <tutorials>
- <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/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>
- <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
- </tutorials>
- <methods>
- <method name="get_axis_lock" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <description>
- Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member axis_lock_motion_x], [member axis_lock_motion_y] and [member axis_lock_motion_z].
- </description>
- </method>
- <method name="get_floor_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
- </description>
- </method>
- <method name="get_floor_velocity" qualifiers="const">
- <return type="Vector3">
- </return>
- <description>
- Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code].
- </description>
- </method>
- <method name="get_slide_collision">
- <return type="KinematicCollision3D">
- </return>
- <argument index="0" name="slide_idx" type="int">
- </argument>
- <description>
- Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
- </description>
- </method>
- <method name="get_slide_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap].
- </description>
- </method>
- <method name="is_on_ceiling" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="is_on_floor" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="is_on_wall" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code].
- </description>
- </method>
- <method name="move_and_collide">
- <return type="KinematicCollision3D">
- </return>
- <argument index="0" name="rel_vec" type="Vector3">
- </argument>
- <argument index="1" name="infinite_inertia" type="bool" default="true">
- </argument>
- <argument index="2" name="exclude_raycast_shapes" type="bool" default="true">
- </argument>
- <argument index="3" name="test_only" type="bool" default="false">
- </argument>
- <description>
- Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision.
- If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
- </description>
- </method>
- <method name="move_and_slide">
- <return type="Vector3">
- </return>
- <argument index="0" name="linear_velocity" type="Vector3">
- </argument>
- <argument index="1" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )">
- </argument>
- <argument index="2" name="stop_on_slope" type="bool" default="false">
- </argument>
- <argument index="3" name="max_slides" type="int" default="4">
- </argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <argument index="5" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
- This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
- [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
- [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall.
- If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still.
- If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
- [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
- If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody3D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D].
- Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision].
- </description>
- </method>
- <method name="move_and_slide_with_snap">
- <return type="Vector3">
- </return>
- <argument index="0" name="linear_velocity" type="Vector3">
- </argument>
- <argument index="1" name="snap" type="Vector3">
- </argument>
- <argument index="2" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )">
- </argument>
- <argument index="3" name="stop_on_slope" type="bool" default="false">
- </argument>
- <argument index="4" name="max_slides" type="int" default="4">
- </argument>
- <argument index="5" name="floor_max_angle" type="float" default="0.785398">
- </argument>
- <argument index="6" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Moves the body while keeping it attached to slopes. Similar to [method move_and_slide].
- As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead.
- </description>
- </method>
- <method name="set_axis_lock">
- <return type="void">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <argument index="1" name="lock" type="bool">
- </argument>
- <description>
- Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member axis_lock_motion_x], [member axis_lock_motion_y] and [member axis_lock_motion_z].
- </description>
- </method>
- <method name="test_move">
- <return type="bool">
- </return>
- <argument index="0" name="from" type="Transform3D">
- </argument>
- <argument index="1" name="rel_vec" type="Vector3">
- </argument>
- <argument index="2" name="infinite_inertia" type="bool" default="true">
- </argument>
- <description>
- Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
- </description>
- </method>
- </methods>
- <members>
- <member name="axis_lock_motion_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's X axis movement.
- </member>
- <member name="axis_lock_motion_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's Y axis movement.
- </member>
- <member name="axis_lock_motion_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's Z axis movement.
- </member>
- <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001">
- Extra margin used for collision recovery in motion functions (see [method move_and_collide], [method move_and_slide], [method move_and_slide_with_snap]).
- If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
- A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
- A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index ec6e16e25a..8748f89618 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="KinematicCollision2D" inherits="Reference" version="4.0">
<brief_description>
- Collision data for [KinematicBody2D] collisions.
+ Collision data for [method PhysicsBody2D.move_and_collide] collisions.
</brief_description>
<description>
- Contains collision data for [KinematicBody2D] collisions. When a [KinematicBody2D] is moved using [method KinematicBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned.
+ Contains collision data for [method PhysicsBody2D.move_and_collide] collisions. When a [PhysicsBody2D] is moved using [method PhysicsBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a [KinematicCollision2D] object is returned.
This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.
</description>
<tutorials>
diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml
index f3248a9ca1..8eac15ebf4 100644
--- a/doc/classes/KinematicCollision3D.xml
+++ b/doc/classes/KinematicCollision3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="KinematicCollision3D" inherits="Reference" version="4.0">
<brief_description>
- Collision data for [KinematicBody3D] collisions.
+ Collision data for [method PhysicsBody3D.move_and_collide] collisions.
</brief_description>
<description>
- Contains collision data for [KinematicBody3D] collisions. When a [KinematicBody3D] is moved using [method KinematicBody3D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision3D object is returned.
+ Contains collision data for [method PhysicsBody3D.move_and_collide] collisions. When a [PhysicsBody3D] is moved using [method PhysicsBody3D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a [KinematicCollision3D] object is returned.
This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.
</description>
<tutorials>
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index 6bae612c9f..42b9ed8ab4 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -52,7 +52,7 @@
The light's strength multiplier (this is not a physical unit). For [OmniLight3D] and [SpotLight3D], changing this value will only change the light color's intensity, not the light's radius.
</member>
<member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0">
- Secondary multiplier used with indirect light (light bounces). Used with [GIProbe].
+ Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI].
</member>
<member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false">
If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/LightmapGI.xml
index 6fd08fc4e4..d7722a83b0 100644
--- a/doc/classes/BakedLightmap.xml
+++ b/doc/classes/LightmapGI.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmap" inherits="VisualInstance3D" version="4.0">
+<class name="LightmapGI" inherits="VisualInstance3D" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -21,17 +21,17 @@
</member>
<member name="environment_custom_sky" type="Sky" setter="set_environment_custom_sky" getter="get_environment_custom_sky">
</member>
- <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="BakedLightmap.EnvironmentMode" default="0">
+ <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="LightmapGI.EnvironmentMode" default="0">
</member>
- <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="BakedLightmap.GenerateProbes" default="0">
+ <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="LightmapGI.GenerateProbes" default="0">
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
</member>
- <member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data">
+ <member name="light_data" type="LightmapGIData" setter="set_light_data" getter="get_light_data">
</member>
<member name="max_texture_size" type="int" setter="set_max_texture_size" getter="get_max_texture_size" default="16384">
</member>
- <member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1">
+ <member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="LightmapGI.BakeQuality" default="1">
</member>
<member name="use_denoiser" type="bool" setter="set_use_denoiser" getter="is_using_denoiser" default="true">
</member>
diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/LightmapGIData.xml
index 904555c48e..3a37c6dcb7 100644
--- a/doc/classes/BakedLightmapData.xml
+++ b/doc/classes/LightmapGIData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BakedLightmapData" inherits="Resource" version="4.0">
+<class name="LightmapGIData" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index c168695d61..b2be92dbbd 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -135,16 +135,16 @@
</signals>
<constants>
<constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
- Used with [method Node.rpc_config] or [method Node.rset_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
+ Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
</constant>
<constant name="RPC_MODE_REMOTE" value="1" enum="RPCMode">
- Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets.
+ Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets.
</constant>
<constant name="RPC_MODE_MASTER" value="2" enum="RPCMode">
- Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master].
+ Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master].
</constant>
<constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode">
- Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master].
+ Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master].
</constant>
<constant name="RPC_MODE_REMOTESYNC" value="4" enum="RPCMode">
Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]remotesync[/code] keyword.
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 523f3a0c17..1300351e47 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -649,7 +649,7 @@
<argument index="0" name="method" type="StringName">
</argument>
<description>
- Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. See also [method rset] and [method rset_config] for properties. Returns an empty [Variant].
+ Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns an empty [Variant].
[b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [SceneTree]. You also need to keep track of the connection state, either by the [SceneTree] signals like [code]server_disconnected[/code] or by checking [code]SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED[/code].
</description>
</method>
@@ -658,33 +658,17 @@
</return>
<argument index="0" name="method" type="StringName">
</argument>
- <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode">
+ <argument index="1" name="rpc_mode" type="int" enum="MultiplayerAPI.RPCMode">
</argument>
- <description>
- Changes the RPC mode for the given [code]method[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). See also [method rset] and [method rset_config] for properties.
- </description>
- </method>
- <method name="rpc_id" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="peer_id" type="int">
+ <argument index="2" name="transfer_mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode" default="2">
</argument>
- <argument index="1" name="method" type="StringName">
- </argument>
- <description>
- Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant].
- </description>
- </method>
- <method name="rpc_unreliable" qualifiers="vararg">
- <return type="Variant">
- </return>
- <argument index="0" name="method" type="StringName">
+ <argument index="3" name="channel" type="int" default="0">
</argument>
<description>
- Sends a [method rpc] using an unreliable protocol. Returns an empty [Variant].
+ Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum MultiplayerAPI.RPCMode] and [enum NetworkedMultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs).
</description>
</method>
- <method name="rpc_unreliable_id" qualifiers="vararg">
+ <method name="rpc_id" qualifiers="vararg">
<return type="Variant">
</return>
<argument index="0" name="peer_id" type="int">
@@ -692,66 +676,7 @@
<argument index="1" name="method" type="StringName">
</argument>
<description>
- Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant].
- </description>
- </method>
- <method name="rset">
- <return type="void">
- </return>
- <argument index="0" name="property" type="StringName">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- Remotely changes a property's value on other peers (and locally). Behaviour depends on the RPC configuration for the given property, see [method rset_config]. See also [method rpc] for RPCs for methods, most information applies to this method as well.
- </description>
- </method>
- <method name="rset_config">
- <return type="int">
- </return>
- <argument index="0" name="property" type="StringName">
- </argument>
- <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode">
- </argument>
- <description>
- Changes the RPC mode for the given [code]property[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, properties are not exposed to networking (and RPCs). See also [method rpc] and [method rpc_config] for methods.
- </description>
- </method>
- <method name="rset_id">
- <return type="void">
- </return>
- <argument index="0" name="peer_id" type="int">
- </argument>
- <argument index="1" name="property" type="StringName">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Remotely changes the property's value on a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]).
- </description>
- </method>
- <method name="rset_unreliable">
- <return type="void">
- </return>
- <argument index="0" name="property" type="StringName">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- Remotely changes the property's value on other peers (and locally) using an unreliable protocol.
- </description>
- </method>
- <method name="rset_unreliable_id">
- <return type="void">
- </return>
- <argument index="0" name="peer_id" type="int">
- </argument>
- <argument index="1" name="property" type="StringName">
- </argument>
- <argument index="2" name="value" type="Variant">
- </argument>
- <description>
- Remotely changes property's value on a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]).
+ Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant].
</description>
</method>
<method name="set_display_folded">
@@ -969,6 +894,12 @@
<constant name="NOTIFICATION_POST_ENTER_TREE" value="27">
Notification received when the node is ready, just before [constant NOTIFICATION_READY] is received. Unlike the latter, it's sent every time the node enters tree, instead of only once.
</constant>
+ <constant name="NOTIFICATION_EDITOR_PRE_SAVE" value="9001">
+ Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
+ </constant>
+ <constant name="NOTIFICATION_EDITOR_POST_SAVE" value="9002">
+ Notification received right after the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
+ </constant>
<constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002">
Notification received from the OS when the mouse enters the game window.
Implemented on desktop and web platforms.
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 988fb72267..8ca945418c 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -150,6 +150,10 @@
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
Local [Transform2D].
</member>
+ <member name="y_sort_enabled" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false">
+ If [code]true[/code], child nodes with the lowest Y position are drawn before those with a higher Y position. If [code]false[/code], Y-sorting is disabled. Y-sorting only affects children that inherit from [CanvasItem].
+ You can nest nodes with Y-sorting. Child Y-sorted nodes are sorted in the same space as the parent Y-sort. This feature allows you to organize a scene better or divide it into multiple ones without changing your scene tree.
+ </member>
<member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative" default="true">
If [code]true[/code], the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5.
</member>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 6cc5bf61e9..a6237708c6 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -291,6 +291,9 @@
<member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform">
World3D space (global) [Transform3D] of this node.
</member>
+ <member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3( 0, 0, 0 )">
+ Local position or translation of this node relative to the parent. This is equivalent to [code]transform.origin[/code].
+ </member>
<member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation">
Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
[b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
@@ -307,9 +310,6 @@
<member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
Local space [Transform3D] of this node, with respect to the parent node.
</member>
- <member name="translation" type="Vector3" setter="set_translation" getter="get_translation" default="Vector3( 0, 0, 0 )">
- Local translation of this node.
- </member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
If [code]true[/code], this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
</member>
diff --git a/doc/classes/PhysicalBone2D.xml b/doc/classes/PhysicalBone2D.xml
new file mode 100644
index 0000000000..cea75bad52
--- /dev/null
+++ b/doc/classes/PhysicalBone2D.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicalBone2D" inherits="RigidBody2D" version="4.0">
+ <brief_description>
+ A 2D node that can be used for physically aware bones in 2D.
+ </brief_description>
+ <description>
+ The [code]PhysicalBone2D[/code] node is a [RigidBody2D]-based node that can be used to make [Bone2D] nodes in a [Skeleton2D] react to physics. This node is very similar to the [PhysicalBone3D] node, just for 2D instead of 3D.
+ [b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes.
+ [b]Note:[/b] The PhysicalBone2D node does not automatically create a [Joint2D] node to keep [code]PhysicalBone2D[/code] nodes together. You will need to create these manually. For most cases, you want to use a [PinJoint2D] node. The [code]PhysicalBone2D[/code] node can automatically configure the [Joint2D] node once it's been created as a child node.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_joint" qualifiers="const">
+ <return type="Joint2D">
+ </return>
+ <description>
+ Returns the first [Joint2D] child node, if one exists. This is mainly a helper function to make it easier to get the [Joint2D] that the [code]PhysicalBone2D[/code] is autoconfiguring.
+ </description>
+ </method>
+ <method name="is_simulating_physics" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns a boolean that indicates whether the [code]PhysicalBone2D[/code] node is running and simulating using the Godot 2D physics engine. When [code]true[/code], the PhysicalBone2D node is using physics.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="auto_configure_joint" type="bool" setter="set_auto_configure_joint" getter="get_auto_configure_joint" default="true">
+ If [code]true[/code], the [code]PhysicalBone2D[/code] node will automatically configure the first [Joint2D] child node. The automatic configuration is limited to setting up the node properties and positioning the [Joint2D].
+ </member>
+ <member name="bone2d_index" type="int" setter="set_bone2d_index" getter="get_bone2d_index" default="-1">
+ The index of the [Bone2D] node that this [code]PhysicalBone2D[/code] node is supposed to be simulating.
+ </member>
+ <member name="bone2d_nodepath" type="NodePath" setter="set_bone2d_nodepath" getter="get_bone2d_nodepath" default="NodePath(&quot;&quot;)">
+ The [NodePath] to the [Bone2D] node that this [code]PhysicalBone2D[/code] node is supposed to be simulating.
+ </member>
+ <member name="follow_bone_when_simulating" type="bool" setter="set_follow_bone_when_simulating" getter="get_follow_bone_when_simulating" default="false">
+ If [code]true[/code], the [code]PhysicalBone2D[/code] will keep the transform of the bone it is bound to when simulating physics.
+ </member>
+ <member name="simulate_physics" type="bool" setter="set_simulate_physics" getter="get_simulate_physics" default="false">
+ If [code]true[/code], the [code]PhysicalBone2D[/code] will start simulating using physics. If [code]false[/code], the [code]PhysicalBone2D[/code] will follow the transform of the [Bone2D] node.
+ [b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml
index 656bcfc15c..5d15590a3f 100644
--- a/doc/classes/PhysicalBone3D.xml
+++ b/doc/classes/PhysicalBone3D.xml
@@ -25,14 +25,6 @@
<description>
</description>
</method>
- <method name="get_axis_lock" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <description>
- </description>
- </method>
<method name="get_bone_id" qualifiers="const">
<return type="int">
</return>
@@ -51,39 +43,11 @@
<description>
</description>
</method>
- <method name="set_axis_lock">
- <return type="void">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <argument index="1" name="lock" type="bool">
- </argument>
- <description>
- </description>
- </method>
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0">
Damps the body's rotation if greater than [code]0[/code].
</member>
- <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the X axis.
- </member>
- <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the Y axis.
- </member>
- <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the Z axis.
- </member>
- <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the X axis.
- </member>
- <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the Y axis.
- </member>
- <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the Z axis.
- </member>
<member name="body_offset" type="Transform3D" setter="set_body_offset" getter="get_body_offset" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
Sets the body's transform.
</member>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index e43d3bb762..654b0fb668 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -26,6 +26,25 @@
Returns an array of nodes that were added as collision exceptions for this body.
</description>
</method>
+ <method name="move_and_collide">
+ <return type="KinematicCollision2D">
+ </return>
+ <argument index="0" name="rel_vec" type="Vector2">
+ </argument>
+ <argument index="1" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="2" name="exclude_raycast_shapes" type="bool" default="true">
+ </argument>
+ <argument index="3" name="test_only" type="bool" default="false">
+ </argument>
+ <argument index="4" name="safe_margin" type="float" default="0.08">
+ </argument>
+ <description>
+ Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
+ If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
+ [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
+ </description>
+ </method>
<method name="remove_collision_exception_with">
<return type="void">
</return>
@@ -35,6 +54,27 @@
Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
+ <method name="test_move">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="Transform2D">
+ </argument>
+ <argument index="1" name="rel_vec" type="Vector2">
+ </argument>
+ <argument index="2" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="3" name="exclude_raycast_shapes" type="bool" default="true">
+ </argument>
+ <argument index="4" name="collision" type="KinematicCollision2D" default="null">
+ </argument>
+ <argument index="5" name="safe_margin" type="float" default="0.08">
+ </argument>
+ <description>
+ Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
+ [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision (should there be one).
+ [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
+ </description>
+ </method>
</methods>
<members>
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" />
diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml
index b320d37d23..1ec38000be 100644
--- a/doc/classes/PhysicsBody3D.xml
+++ b/doc/classes/PhysicsBody3D.xml
@@ -19,6 +19,15 @@
Adds a body to the list of bodies that this body can't collide with.
</description>
</method>
+ <method name="get_axis_lock" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the specified linear or rotational [code]axis[/code] is locked.
+ </description>
+ </method>
<method name="get_collision_exceptions">
<return type="PhysicsBody3D[]">
</return>
@@ -26,6 +35,25 @@
Returns an array of nodes that were added as collision exceptions for this body.
</description>
</method>
+ <method name="move_and_collide">
+ <return type="KinematicCollision3D">
+ </return>
+ <argument index="0" name="rel_vec" type="Vector3">
+ </argument>
+ <argument index="1" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="2" name="exclude_raycast_shapes" type="bool" default="true">
+ </argument>
+ <argument index="3" name="test_only" type="bool" default="false">
+ </argument>
+ <argument index="4" name="safe_margin" type="float" default="0.001">
+ </argument>
+ <description>
+ Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision.
+ If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
+ [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
+ </description>
+ </method>
<method name="remove_collision_exception_with">
<return type="void">
</return>
@@ -35,7 +63,59 @@
Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
+ <method name="set_axis_lock">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
+ </argument>
+ <argument index="1" name="lock" type="bool">
+ </argument>
+ <description>
+ Locks or unlocks the specified linear or rotational [code]axis[/code] depending on the value of [code]lock[/code].
+ </description>
+ </method>
+ <method name="test_move">
+ <return type="bool">
+ </return>
+ <argument index="0" name="from" type="Transform3D">
+ </argument>
+ <argument index="1" name="rel_vec" type="Vector3">
+ </argument>
+ <argument index="2" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="3" name="exclude_raycast_shapes" type="bool" default="true">
+ </argument>
+ <argument index="4" name="collision" type="KinematicCollision3D" default="null">
+ </argument>
+ <argument index="5" name="safe_margin" type="float" default="0.001">
+ </argument>
+ <description>
+ Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
+ [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one).
+ [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
+ </description>
+ </method>
</methods>
+ <members>
+ <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's rotation in the X axis.
+ </member>
+ <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's rotation in the Y axis.
+ </member>
+ <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's rotation in the Z axis.
+ </member>
+ <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's linear movement in the X axis.
+ </member>
+ <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's linear movement in the Y axis.
+ </member>
+ <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
+ Lock the body's linear movement in the Z axis.
+ </member>
+ </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index dfc0ab909a..66ff16a3ce 100644
--- a/doc/classes/PhysicsDirectBodyState2D.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -4,7 +4,7 @@
Direct access object to a physics body in the [PhysicsServer2D].
</brief_description>
<description>
- 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 rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces].
+ 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 RigidBody2D._integrate_forces].
</description>
<tutorials>
<link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index 09cc230253..7cb3a56338 100644
--- a/doc/classes/PhysicsDirectBodyState3D.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -4,7 +4,7 @@
Direct access object to a physics body in the [PhysicsServer3D].
</brief_description>
<description>
- 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 rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces].
+ 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 RigidBody3D._integrate_forces].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index cfa4215fd4..4c2abcb087 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -1207,16 +1207,16 @@
This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</constant>
<constant name="BODY_MODE_STATIC" value="0" enum="BodyMode">
- Constant for static bodies.
+ Constant for static bodies. In this mode, a body can be only moved by user code.
</constant>
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
- Constant for kinematic bodies.
+ Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
</constant>
- <constant name="BODY_MODE_RIGID" value="2" enum="BodyMode">
- Constant for rigid bodies.
+ <constant name="BODY_MODE_DYNAMIC" value="2" enum="BodyMode">
+ Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied.
</constant>
- <constant name="BODY_MODE_CHARACTER" value="3" enum="BodyMode">
- Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics.
+ <constant name="BODY_MODE_DYNAMIC_LOCKED" value="3" enum="BodyMode">
+ Constant for locked dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
</constant>
<constant name="BODY_PARAM_BOUNCE" value="0" enum="BodyParameter">
Constant to set/get a body's bounce factor.
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 18194d53a0..2972d5155c 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -443,14 +443,6 @@
Returns the [PhysicsDirectBodyState3D] of the body.
</description>
</method>
- <method name="body_get_kinematic_safe_margin" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
<method name="body_get_max_contacts_reported" qualifiers="const">
<return type="int">
</return>
@@ -661,16 +653,6 @@
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
</description>
</method>
- <method name="body_set_kinematic_safe_margin">
- <return type="void">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="margin" type="float">
- </argument>
- <description>
- </description>
- </method>
<method name="body_set_max_contacts_reported">
<return type="void">
</return>
@@ -1595,16 +1577,16 @@
This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</constant>
<constant name="BODY_MODE_STATIC" value="0" enum="BodyMode">
- Constant for static bodies.
+ Constant for static bodies. In this mode, a body can be only moved by user code.
</constant>
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
- Constant for kinematic bodies.
+ Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
</constant>
- <constant name="BODY_MODE_RIGID" value="2" enum="BodyMode">
- Constant for rigid bodies.
+ <constant name="BODY_MODE_DYNAMIC" value="2" enum="BodyMode">
+ Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied.
</constant>
- <constant name="BODY_MODE_CHARACTER" value="3" enum="BodyMode">
- Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics.
+ <constant name="BODY_MODE_DYNAMIC_LOCKED" value="3" enum="BodyMode">
+ Constant for locked dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
</constant>
<constant name="BODY_PARAM_BOUNCE" value="0" enum="BodyParameter">
Constant to set/get a body's bounce factor.
diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml
index 42155a7f25..ed45149cdf 100644
--- a/doc/classes/PinJoint2D.xml
+++ b/doc/classes/PinJoint2D.xml
@@ -4,7 +4,7 @@
Pin joint for 2D shapes.
</brief_description>
<description>
- Pin joint for 2D rigid bodies. It pins two bodies (rigid or static) together.
+ Pin joint for 2D rigid bodies. It pins two bodies (dynamic or static) together.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PinJoint3D.xml b/doc/classes/PinJoint3D.xml
index 267ea38873..37a85e497f 100644
--- a/doc/classes/PinJoint3D.xml
+++ b/doc/classes/PinJoint3D.xml
@@ -4,7 +4,7 @@
Pin joint for 3D PhysicsBodies.
</brief_description>
<description>
- Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. See also [Generic6DOFJoint3D].
+ Pin joint for 3D rigid bodies. It pins 2 bodies (dynamic or static) together. See also [Generic6DOFJoint3D].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 8b73bcb9c1..3892633654 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -31,7 +31,7 @@
</methods>
<members>
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
- Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
+ Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
</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.
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index a200858a3c..b74a1f848b 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -551,7 +551,7 @@
prime-run %command%
[/codeblock]
</member>
- <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( &quot;gd&quot;, &quot;shader&quot; )">
+ <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( &quot;gd&quot;, &quot;gdshader&quot; )">
Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files.
</member>
<member name="editor/script/templates_search_path" type="String" setter="" getter="" default="&quot;res://script_templates&quot;">
@@ -1421,18 +1421,16 @@
</member>
<member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false">
</member>
- <member name="rendering/global_illumination/gi_probes/anisotropic" type="bool" setter="" getter="" default="false">
- If [code]true[/code], take additional samples when rendering objects affected by a [GIProbe] to reduce artifacts from only sampling in one direction.
- </member>
- <member name="rendering/global_illumination/gi_probes/quality" type="int" setter="" getter="" default="1">
- Sets the number of cone samples taken when rendering objects affected by [GIProbe]s.
- </member>
<member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4">
</member>
<member name="rendering/global_illumination/sdfgi/frames_to_update_lights" type="int" setter="" getter="" default="2">
</member>
<member name="rendering/global_illumination/sdfgi/probe_ray_count" type="int" setter="" getter="" default="1">
</member>
+ <member name="rendering/global_illumination/voxel_gi/anisotropic" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="1">
+ </member>
<member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
</member>
<member name="rendering/lightmapping/bake_performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
diff --git a/doc/classes/Quat.xml b/doc/classes/Quaternion.xml
index 1c0a3e37c0..678fb0d44d 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quaternion.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Quat" version="4.0">
+<class name="Quaternion" version="4.0">
<brief_description>
Quaternion.
</brief_description>
<description>
A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation.
- It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quat only stores rotation.
+ It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quaternion only stores rotation.
Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors.
</description>
<tutorials>
@@ -13,24 +13,24 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<description>
Constructs a default-initialized quaternion with all components set to [code]0[/code].
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
- <argument index="0" name="from" type="Quat">
+ <argument index="0" name="from" type="Quaternion">
</argument>
<description>
- Constructs a [Quat] as a copy of the given [Quat].
+ Constructs a [Quaternion] as a copy of the given [Quaternion].
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="arc_from" type="Vector3">
</argument>
@@ -39,8 +39,8 @@
<description>
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="axis" type="Vector3">
</argument>
@@ -50,8 +50,8 @@
Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="euler" type="Vector3">
</argument>
@@ -59,8 +59,8 @@
Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle).
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="from" type="Basis">
</argument>
@@ -68,8 +68,8 @@
Constructs a quaternion from the given [Basis].
</description>
</method>
- <method name="Quat" qualifiers="constructor">
- <return type="Quat">
+ <method name="Quaternion" qualifiers="constructor">
+ <return type="Quaternion">
</return>
<argument index="0" name="x" type="float">
</argument>
@@ -84,13 +84,13 @@
</description>
</method>
<method name="cubic_slerp" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="b" type="Quat">
+ <argument index="0" name="b" type="Quaternion">
</argument>
- <argument index="1" name="pre_a" type="Quat">
+ <argument index="1" name="pre_a" type="Quaternion">
</argument>
- <argument index="2" name="post_b" type="Quat">
+ <argument index="2" name="post_b" type="Quaternion">
</argument>
<argument index="3" name="weight" type="float">
</argument>
@@ -101,7 +101,7 @@
<method name="dot" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="with" type="Quat">
+ <argument index="0" name="with" type="Quaternion">
</argument>
<description>
Returns the dot product of two quaternions.
@@ -115,7 +115,7 @@
</description>
</method>
<method name="inverse" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<description>
Returns the inverse of the quaternion.
@@ -124,7 +124,7 @@
<method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="to" type="Quat">
+ <argument index="0" name="to" type="Quaternion">
</argument>
<description>
Returns [code]true[/code] if this quaternion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
@@ -152,7 +152,7 @@
</description>
</method>
<method name="normalized" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<description>
Returns a copy of the quaternion, normalized to unit length.
@@ -161,15 +161,15 @@
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
@@ -183,7 +183,7 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<argument index="0" name="right" type="float">
</argument>
@@ -191,7 +191,7 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<argument index="0" name="right" type="int">
</argument>
@@ -199,35 +199,35 @@
</description>
</method>
<method name="operator +" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<description>
</description>
</method>
<method name="operator +" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
</method>
<method name="operator -" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<description>
</description>
</method>
<method name="operator -" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
</method>
<method name="operator /" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<argument index="0" name="right" type="float">
</argument>
@@ -235,7 +235,7 @@
</description>
</method>
<method name="operator /" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
<argument index="0" name="right" type="int">
</argument>
@@ -245,7 +245,7 @@
<method name="operator ==" qualifiers="operator">
<return type="bool">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
@@ -259,9 +259,9 @@
</description>
</method>
<method name="slerp" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="to" type="Quat">
+ <argument index="0" name="to" type="Quaternion">
</argument>
<argument index="1" name="weight" type="float">
</argument>
@@ -271,9 +271,9 @@
</description>
</method>
<method name="slerpni" qualifiers="const">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="to" type="Quat">
+ <argument index="0" name="to" type="Quaternion">
</argument>
<argument index="1" name="weight" type="float">
</argument>
@@ -301,7 +301,7 @@
</member>
</members>
<constants>
- <constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )">
+ <constant name="IDENTITY" value="Quaternion( 0, 0, 0, 1 )">
The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change.
</constant>
</constants>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index cd08778c89..13df17cd22 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -5,7 +5,7 @@
</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 [GIProbe]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 the cost of performance. It can be combined with [VoxelGI]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them.
</description>
<tutorials>
<link title="Reflection probes">https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 02130333f9..ba19176788 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -3477,14 +3477,14 @@
<constant name="VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER" value="5" enum="ViewportDebugDraw">
Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="ViewportDebugDraw">
- Objects are displayed with only the albedo value from [GIProbe]s.
+ <constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO" value="6" enum="ViewportDebugDraw">
+ Objects are displayed with only the albedo value from [VoxelGI]s.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="ViewportDebugDraw">
- Objects are displayed with only the lighting value from [GIProbe]s.
+ <constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING" value="7" enum="ViewportDebugDraw">
+ Objects are displayed with only the lighting value from [VoxelGI]s.
</constant>
- <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="ViewportDebugDraw">
- Objects are displayed with only the emission color from [GIProbe]s.
+ <constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION" value="8" enum="ViewportDebugDraw">
+ Objects are displayed with only the emission color from [VoxelGI]s.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="ViewportDebugDraw">
Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
@@ -3694,8 +3694,8 @@
<constant name="INSTANCE_DECAL" value="8" enum="InstanceType">
The instance is a decal.
</constant>
- <constant name="INSTANCE_GI_PROBE" value="9" enum="InstanceType">
- The instance is a GI probe.
+ <constant name="INSTANCE_VOXEL_GI" value="9" enum="InstanceType">
+ The instance is a VoxelGI.
</constant>
<constant name="INSTANCE_LIGHTMAP" value="10" enum="InstanceType">
The instance is a lightmap.
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index a37ebb2dd5..237317daf1 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties.
- A RigidBody2D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic.
+ A RigidBody2D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic.
[b]Note:[/b] You should not change a RigidBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime.
If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See [member custom_integrator].
@@ -100,21 +100,6 @@
Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
</description>
</method>
- <method name="test_motion">
- <return type="bool">
- </return>
- <argument index="0" name="motion" type="Vector2">
- </argument>
- <argument index="1" name="infinite_inertia" type="bool" default="true">
- </argument>
- <argument index="2" name="margin" type="float" default="0.08">
- </argument>
- <argument index="3" name="result" type="PhysicsTestMotionResult2D" default="null">
- </argument>
- <description>
- Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [PhysicsTestMotionResult2D], which contains additional information about the collision (should there be one).
- </description>
- </method>
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0">
@@ -132,7 +117,6 @@
</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].
- [b]Note:[/b] A RigidBody2D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to [code]true[/code].
</member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported].
@@ -234,17 +218,17 @@
</signal>
</signals>
<constants>
- <constant name="MODE_RIGID" value="0" enum="Mode">
- Rigid mode. The body behaves as a physical object. It collides with other bodies and responds to forces applied to it. This is the default mode.
+ <constant name="MODE_DYNAMIC" value="0" enum="Mode">
+ Dynamic body mode. This is the default mode of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
</constant>
<constant name="MODE_STATIC" value="1" enum="Mode">
- Static mode. The body behaves like a [StaticBody2D] and does not move.
+ Static body mode. The body behaves like a [StaticBody2D], and must be moved by code.
</constant>
- <constant name="MODE_CHARACTER" value="2" enum="Mode">
- Character mode. Similar to [constant MODE_RIGID], but the body can not rotate.
+ <constant name="MODE_DYNAMIC_LOCKED" value="2" enum="Mode">
+ Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate.
</constant>
<constant name="MODE_KINEMATIC" value="3" enum="Mode">
- Kinematic mode. The body behaves like a [KinematicBody2D], and must be moved by code.
+ Kinematic body mode. The body behaves like a [StaticBody2D] with [member StaticBody2D.kinematic_motion] enabled, and must be moved by user code.
</constant>
<constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode">
Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml
index 2ee8e2697c..e3349169ff 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
- A RigidBody3D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic.
+ A RigidBody3D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic.
[b]Note:[/b] Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator].
With Bullet physics (the default), the center of mass is the RigidBody3D center. With GodotPhysics, the center of mass is the average of the [CollisionShape3D] centers.
@@ -86,15 +86,6 @@
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.
</description>
</method>
- <method name="get_axis_lock" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <description>
- Returns [code]true[/code] if the specified linear or rotational axis is locked.
- </description>
- </method>
<method name="get_colliding_bodies" qualifiers="const">
<return type="Array">
</return>
@@ -110,17 +101,6 @@
Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D].
</description>
</method>
- <method name="set_axis_lock">
- <return type="void">
- </return>
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis">
- </argument>
- <argument index="1" name="lock" type="bool">
- </argument>
- <description>
- Locks the specified linear or rotational axis.
- </description>
- </method>
<method name="set_axis_velocity">
<return type="void">
</return>
@@ -139,27 +119,8 @@
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3( 0, 0, 0 )">
RigidBody3D's rotational velocity.
</member>
- <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the X axis.
- </member>
- <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the Y axis.
- </member>
- <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's rotation in the Z axis.
- </member>
- <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the X axis.
- </member>
- <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the Y axis.
- </member>
- <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false">
- Lock the body's movement in the Z axis.
- </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].
- [b]Note:[/b] A RigidBody3D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to [code]true[/code].
</member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. See also [member contacts_reported].
@@ -260,17 +221,17 @@
</signal>
</signals>
<constants>
- <constant name="MODE_RIGID" value="0" enum="Mode">
- Rigid body mode. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
+ <constant name="MODE_DYNAMIC" value="0" enum="Mode">
+ Dynamic body mode. This is the default mode of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
</constant>
<constant name="MODE_STATIC" value="1" enum="Mode">
- Static mode. The body behaves like a [StaticBody3D], and can only move by user code.
+ Static body mode. The body behaves like a [StaticBody3D], and can only move by user code.
</constant>
- <constant name="MODE_CHARACTER" value="2" enum="Mode">
- Character body mode. This behaves like a rigid body, but can not rotate.
+ <constant name="MODE_DYNAMIC_LOCKED" value="2" enum="Mode">
+ Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate.
</constant>
<constant name="MODE_KINEMATIC" value="3" enum="Mode">
- Kinematic body mode. The body behaves like a [KinematicBody3D], and can only move by user code.
+ Kinematic body mode. The body behaves like a [StaticBody3D] with [member StaticBody3D.kinematic_motion] enabled, and can only move by user code.
</constant>
</constants>
</class>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 06800082cb..7a15153fc2 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -207,6 +207,7 @@
Quits the application at the end of the current iteration. Argument [code]exit_code[/code] can optionally be given (defaulting to 0) to customize the exit status code.
By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error.
For portability reasons, the exit code should be set between 0 and 125 (inclusive).
+ [b]Note:[/b] On iOS this method doesn't work. Instead, as recommended by the iOS Human Interface Guidelines, the user is expected to close apps via the Home button.
</description>
</method>
<method name="reload_current_scene">
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 0ddbac9ba4..80db57d7d0 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -10,6 +10,17 @@
<link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link>
</tutorials>
<methods>
+ <method name="execute_modifications">
+ <return type="void">
+ </return>
+ <argument index="0" name="execution_mode" type="float">
+ </argument>
+ <argument index="1" name="execution_mode" type="int">
+ </argument>
+ <description>
+ Executes all the modifications on the [SkeletonModificationStack2D], if the Skeleton3D has one assigned.
+ </description>
+ </method>
<method name="get_bone">
<return type="Bone2D">
</return>
@@ -26,6 +37,22 @@
Returns the number of [Bone2D] nodes in the node hierarchy parented by Skeleton2D.
</description>
</method>
+ <method name="get_bone_local_pose_override">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Returns the local pose override transform for [code]bone_idx[/code].
+ </description>
+ </method>
+ <method name="get_modification_stack" qualifiers="const">
+ <return type="SkeletonModificationStack2D">
+ </return>
+ <description>
+ Returns the [SkeletonModificationStack2D] attached to this skeleton, if one exists.
+ </description>
+ </method>
<method name="get_skeleton" qualifiers="const">
<return type="RID">
</return>
@@ -33,10 +60,37 @@
Returns the [RID] of a Skeleton2D instance.
</description>
</method>
+ <method name="set_bone_local_pose_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <argument index="1" name="override_pose" type="Transform2D">
+ </argument>
+ <argument index="2" name="strength" type="float">
+ </argument>
+ <argument index="3" name="persistent" type="bool">
+ </argument>
+ <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.
+ [b]Note:[/b] The pose transform needs to be a local transform relative to the [Bone2D] node at [code]bone_idx[/code]!
+ </description>
+ </method>
+ <method name="set_modification_stack">
+ <return type="void">
+ </return>
+ <argument index="0" name="modification_stack" type="SkeletonModificationStack2D">
+ </argument>
+ <description>
+ Sets the [SkeletonModificationStack2D] attached to this skeleton.
+ </description>
+ </method>
</methods>
<signals>
<signal name="bone_setup_changed">
<description>
+ Emitted when the [Bone2D] setup attached to this skeletons changes. This is primarily used internally within the skeleton.
</description>
</signal>
</signals>
diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml
new file mode 100644
index 0000000000..8596dac76e
--- /dev/null
+++ b/doc/classes/SkeletonModification2D.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2D" inherits="Resource" version="4.0">
+ <brief_description>
+ A resource that operates on [Bone2D] nodes in a [Skeleton2D].
+ </brief_description>
+ <description>
+ This resource provides an interface that can be expanded so code that operates on [Bone2D] nodes in a [Skeleton2D] can be mixed and matched together to create complex interactions.
+ This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_draw_editor_gizmo" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Used for drawing [b]editor-only[/b] modification gizmos. This function will only be called in the Godot editor and can be overriden to draw custom gizmos.
+ [b]Note:[/b] You will need to use the Skeleton2D from [method SkeletonModificationStack2D.get_skeleton] and it's draw functions, as the [SkeletonModification2D] resource cannot draw on its own.
+ </description>
+ </method>
+ <method name="_execute" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <description>
+ Executes the given modification. This is where the modification performs whatever function it is designed to do.
+ </description>
+ </method>
+ <method name="_setup_modification" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="modification_stack" type="SkeletonModificationStack2D">
+ </argument>
+ <description>
+ Called when the modification is setup. This is where the modification performs initialization.
+ </description>
+ </method>
+ <method name="clamp_angle">
+ <return type="float">
+ </return>
+ <argument index="0" name="angle" type="float">
+ </argument>
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <argument index="3" name="invert" type="bool">
+ </argument>
+ <description>
+ Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds.
+ </description>
+ </method>
+ <method name="get_editor_draw_gizmo" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.
+ </description>
+ </method>
+ <method name="get_is_setup" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether this modification has been successfully setup or not.
+ </description>
+ </method>
+ <method name="get_modification_stack">
+ <return type="SkeletonModificationStack2D">
+ </return>
+ <description>
+ Returns the [SkeletonModificationStack2D] that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on.
+ </description>
+ </method>
+ <method name="set_editor_draw_gizmo">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_gizmo" type="bool">
+ </argument>
+ <description>
+ Sets whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.
+ </description>
+ </method>
+ <method name="set_is_setup">
+ <return type="void">
+ </return>
+ <argument index="0" name="is_setup" type="bool">
+ </argument>
+ <description>
+ Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack2D] the modification is bound to should handle setting the modification up.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="true">
+ If [code]true[/code], the modification's [method _execute] function will be called by the [SkeletonModificationStack2D].
+ </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.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml
new file mode 100644
index 0000000000..014d366a42
--- /dev/null
+++ b/doc/classes/SkeletonModification2DCCDIK.xml
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DCCDIK" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that uses CCDIK to manipulate a series of bones to reach a target in 2D.
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] uses an algorithm called [b]C[/b]yclic [b]C[/b]oordinate [b]D[/b]escent [b]I[/b]nverse [b]K[/b]inematics, or CCDIK, to maniuplate a chain of bones in a [Skeleton2D] 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_ccdik_joint_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_bone_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the index of the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_constraint_angle_invert" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_angle_invert] for details.
+ </description>
+ </method>
+ <method name="get_ccdik_joint_constraint_angle_max" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the maximum angle constraint for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_constraint_angle_min" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the minimum angle constraint for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_ccdik_joint_enable_constraint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled.
+ </description>
+ </method>
+ <method name="get_ccdik_joint_rotate_from_joint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. The default is to rotate from the tip.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone2d_nodepath" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_ccdik_joint_bone_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the CCDIK joint based on data provided by the linked skeleton.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_constraint_angle_invert">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="invert" type="bool">
+ </argument>
+ <description>
+ Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint.
+ An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_constraint_angle_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="angle_max" type="float">
+ </argument>
+ <description>
+ Sets the maximum angle constraint for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_ccdik_joint_constraint_angle_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="angle_min" type="float">
+ </argument>
+ <description>
+ Sets the minimum angle constraint for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_ccdik_joint_enable_constraint">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="enable_constraint" type="bool">
+ </argument>
+ <description>
+ Determines whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled. When [code]true[/code], constraints will be enabled and taken into account when solving.
+ </description>
+ </method>
+ <method name="set_ccdik_joint_rotate_from_joint">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="rotate_from_joint" type="bool">
+ </argument>
+ <description>
+ Sets whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="ccdik_data_chain_length" type="int" setter="set_ccdik_data_chain_length" getter="get_ccdik_data_chain_length" default="0">
+ The amount of CCDIK joints in the CCDIK modification.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the CCDIK modification. This node is what the CCDIK chain will attempt to rotate the bone chain to.
+ </member>
+ <member name="tip_nodepath" type="NodePath" setter="set_tip_node" getter="get_tip_node" default="NodePath(&quot;&quot;)">
+ The end position of the CCDIK chain. Typically, this should be a child of a [Bone2D] node attached to the final [Bone2D] in the CCDIK chain.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml
new file mode 100644
index 0000000000..62ab34b06f
--- /dev/null
+++ b/doc/classes/SkeletonModification2DFABRIK.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DFABRIK" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that uses FABRIK to manipulate a series of [Bone2D] nodes to reach a target.
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] uses an algorithm called [b]F[/b]orward [b]A[/b]nd [b]B[/b]ackward [b]R[/b]eaching [b]I[/b]nverse [b]K[/b]inematics, or FABRIK, to rotate a bone chain so that it reaches a target.
+ FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other.
+ Because of how FABRIK works, it often gives more natural results than those seen in [SkeletonModification2DCCDIK]. FABRIK also supports angle constraints, which are fully taken into account when solving.
+ [b]Note:[/b] The FABRIK modifier has [code]fabrik_joints[/code], which are the data objects that hold the data for each joint in the FABRIK chain. This is different from [Bone2D] nodes! FABRIK joints hold the data needed for each [Bone2D] in the bone chain used by FABRIK.
+ To help control how the FABRIK joints move, a magnet vector can be passed, which can nudge the bones in a certain direction prior to solving, giving a level of control over the final result.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_fabrik_joint_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_bone_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the index of the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_magnet_position" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the magnet position vector for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_fabrik_joint_use_target_rotation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns whether the joint is using the target's rotation rather than allowing FABRIK to rotate the joint. This option only applies to the tip/final joint in the chain.
+ </description>
+ </method>
+ <method name="set_fabrik_joint_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone2d_nodepath" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_fabrik_joint_bone_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the FABRIK joint based on data provided by the linked skeleton.
+ </description>
+ </method>
+ <method name="set_fabrik_joint_magnet_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="magnet_position" type="Vector2">
+ </argument>
+ <description>
+ Sets the magnet position vector for the joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_fabrik_joint_use_target_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="use_target_rotation" type="bool">
+ </argument>
+ <description>
+ Sets whether the joint at [code]joint_idx[/code] will use the target node's rotation rather than letting FABRIK rotate the node.
+ [b]Note:[/b] This option only works for the tip/final joint in the chain. For all other nodes, this option will be ignored.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="fabrik_data_chain_length" type="int" setter="set_fabrik_data_chain_length" getter="get_fabrik_data_chain_length" default="0">
+ The amount of FABRIK joints in the FABRIK modification.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml
new file mode 100644
index 0000000000..7f8cf2d4d9
--- /dev/null
+++ b/doc/classes/SkeletonModification2DJiggle.xml
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DJiggle" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that jiggles [Bone2D] nodes as they move towards a target.
+ </brief_description>
+ <description>
+ This modification moves a series of bones, typically called a bone chain, towards a target. What makes this modification special is that it calculates the velocity and acceleration for each bone in the bone chain, and runs a very light physics-like calculation using the inputted values. This allows the bones to overshoot the target and "jiggle" around. It can be configured to act more like a spring, or sway around like cloth might.
+ This modification is useful for adding additional motion to things like hair, the edges of clothing, and more. It has several settings to that allow control over how the joint moves when the target moves.
+ [b]Note:[/b] The Jiggle modifier has [code]jiggle_joints[/code], which are the data objects that hold the data for each joint in the Jiggle chain. This is different from than [Bone2D] nodes! Jiggle joints hold the data needed for each [Bone2D] in the bone chain used by the Jiggle modification.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_collision_mask" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the collision mask used by the Jiggle modifier when collisions are enabled.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_bone_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the index of the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_damping" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the amount of damping of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_gravity" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns a [Vector2] representing the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_mass" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the amount of mass of the jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <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.
+ </description>
+ </method>
+ <method name="get_jiggle_joint_stiffness" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the stiffness of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="get_jiggle_joint_use_gravity" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is using gravity or not.
+ </description>
+ </method>
+ <method name="get_use_colliders" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the jiggle modifier is taking physics colliders into account when solving.
+ </description>
+ </method>
+ <method name="set_collision_mask">
+ <return type="void">
+ </return>
+ <argument index="0" name="collision_mask" type="int">
+ </argument>
+ <description>
+ Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account.
+ </description>
+ </method>
+ <method name="set_jiggle_joint_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone2d_node" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_bone_index">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the bone index, [code]bone_index[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the Jiggle joint based on data provided by the linked skeleton.
+ </description>
+ </method>
+ <method name="set_jiggle_joint_damping">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="damping" type="float">
+ </argument>
+ <description>
+ Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_gravity">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="gravity" type="Vector2">
+ </argument>
+ <description>
+ Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_mass">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="mass" type="float">
+ </argument>
+ <description>
+ Sets the of mass of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="override" type="bool">
+ </argument>
+ <description>
+ Sets whether the Jiggle joint at [code]joint_idx[/code] should override the default Jiggle joint settings. Setting this to [code]true[/code] will make the joint use its own settings rather than the default ones attached to the modification.
+ </description>
+ </method>
+ <method name="set_jiggle_joint_stiffness">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="stiffness" type="float">
+ </argument>
+ <description>
+ Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_jiggle_joint_use_gravity">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="use_gravity" type="bool">
+ </argument>
+ <description>
+ Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity.
+ </description>
+ </method>
+ <method name="set_use_colliders">
+ <return type="void">
+ </return>
+ <argument index="0" name="use_colliders" type="bool">
+ </argument>
+ <description>
+ If [code]true[/code], the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.75">
+ The default amount of dampening applied to the Jiggle joints, if they are not overriden. Higher values lead to more of the calculated velocity being applied.
+ </member>
+ <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 6 )">
+ The default amount of gravity applied to the Jiggle joints, if they are not overriden.
+ </member>
+ <member name="jiggle_data_chain_length" type="int" setter="set_jiggle_data_chain_length" getter="get_jiggle_data_chain_length" default="0">
+ The amount of Jiggle joints in the Jiggle modification.
+ </member>
+ <member name="mass" type="float" setter="set_mass" getter="get_mass" default="0.75">
+ The default amount of mass assigned to the Jiggle joints, if they are not overriden. Higher values lead to faster movements and more overshooting.
+ </member>
+ <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" default="3.0">
+ The default amount of stiffness assigned to the Jiggle joints, if they are not overriden. Higher values act more like springs, quickly moving into the correct position.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to.
+ </member>
+ <member name="use_gravity" type="bool" setter="set_use_gravity" getter="get_use_gravity" default="false">
+ Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DLookAt.xml b/doc/classes/SkeletonModification2DLookAt.xml
new file mode 100644
index 0000000000..b0fa0e5a01
--- /dev/null
+++ b/doc/classes/SkeletonModification2DLookAt.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DLookAt" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that rotates a [Bone2D] node to look at a target.
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] rotates a bone to look a target. This is extremely helpful for moving character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_additional_rotation" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the amount of additional rotation that is applied after the LookAt modification executes.
+ </description>
+ </method>
+ <method name="get_constraint_angle_invert" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns whether the constraints to this modification are inverted or not.
+ </description>
+ </method>
+ <method name="get_constraint_angle_max" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the constraint's maximum allowed angle.
+ </description>
+ </method>
+ <method name="get_constraint_angle_min" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the constraint's minimum allowed angle.
+ </description>
+ </method>
+ <method name="get_enable_constraint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the LookAt modification is using constraints.
+ </description>
+ </method>
+ <method name="set_additional_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="rotation" type="float">
+ </argument>
+ <description>
+ Sets the amount of additional rotation that is to be applied after executing the modification. This allows for offsetting the results by the inputted rotation amount.
+ </description>
+ </method>
+ <method name="set_constraint_angle_invert">
+ <return type="void">
+ </return>
+ <argument index="0" name="invert" type="bool">
+ </argument>
+ <description>
+ When [code]true[/code], the modification will use an inverted joint constraint.
+ An inverted joint constraint only constraints the [Bone2D] to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.
+ </description>
+ </method>
+ <method name="set_constraint_angle_max">
+ <return type="void">
+ </return>
+ <argument index="0" name="angle_max" type="float">
+ </argument>
+ <description>
+ Sets the constraint's maximum allowed angle.
+ </description>
+ </method>
+ <method name="set_constraint_angle_min">
+ <return type="void">
+ </return>
+ <argument index="0" name="angle_min" type="float">
+ </argument>
+ <description>
+ Sets the constraint's minimum allowed angle.
+ </description>
+ </method>
+ <method name="set_enable_constraint">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable_constraint" type="bool">
+ </argument>
+ <description>
+ Sets whether this modification will use constraints or not. When [code]true[/code], constraints will be applied when solving the LookAt modification.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bone2d_node" type="NodePath" setter="set_bone2d_node" getter="get_bone2d_node" default="NodePath(&quot;&quot;)">
+ The [Bone2D] node that the modification will operate on.
+ </member>
+ <member name="bone_index" type="int" setter="set_bone_index" getter="get_bone_index" default="-1">
+ The index of the [Bone2D] node that the modification will oeprate on.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the LookAt modification. This node is what the modification will rotate the [Bone2D] to.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml
new file mode 100644
index 0000000000..d8aaf09a8e
--- /dev/null
+++ b/doc/classes/SkeletonModification2DPhysicalBones.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DPhysicalBones" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that applies the transforms of [PhysicalBone2D] nodes to [Bone2D] nodes.
+ </brief_description>
+ <description>
+ This modification takes the transforms of [PhysicalBone2D] nodes and applies them to [Bone2D] nodes. This allows the [Bone2D] nodes to react to physics thanks to the linked [PhysicalBone2D] nodes.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="fetch_physical_bones">
+ <return type="void">
+ </return>
+ <description>
+ Empties the list of [PhysicalBone2D] nodes and populates it will all [PhysicalBone2D] nodes that are children of the [Skeleton2D].
+ </description>
+ </method>
+ <method name="get_physical_bone_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <description>
+ Returns the [PhysicalBone2D] node at [code]joint_idx[/code].
+ </description>
+ </method>
+ <method name="set_physical_bone_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint_idx" type="int">
+ </argument>
+ <argument index="1" name="physicalbone2d_node" type="NodePath">
+ </argument>
+ <description>
+ Sets the [PhysicalBone2D] node at [code]joint_idx[/code].
+ [b]Note:[/b] This is just the index used for this modification, not the bone index used in the [Skeleton2D].
+ </description>
+ </method>
+ <method name="start_simulation">
+ <return type="void">
+ </return>
+ <argument index="0" name="bones" type="StringName[]" default="[ ]">
+ </argument>
+ <description>
+ Tell the [PhysicalBone2D] nodes to start simulating and interacting with the physics world.
+ Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to start simulating.
+ </description>
+ </method>
+ <method name="stop_simulation">
+ <return type="void">
+ </return>
+ <argument index="0" name="bones" type="StringName[]" default="[ ]">
+ </argument>
+ <description>
+ Tell the [PhysicalBone2D] nodes to stop simulating and interacting with the physics world.
+ Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to stop simulating.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="physical_bone_chain_length" type="int" setter="set_physical_bone_chain_length" getter="get_physical_bone_chain_length" default="0">
+ The amount of [PhysicalBone2D] nodes linked in this modification.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DStackHolder.xml b/doc/classes/SkeletonModification2DStackHolder.xml
new file mode 100644
index 0000000000..313cf81482
--- /dev/null
+++ b/doc/classes/SkeletonModification2DStackHolder.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DStackHolder" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that holds and executes a [SkeletonModificationStack2D].
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] holds a reference to a [SkeletonModificationStack2D], allowing you to use multiple modification stacks on a single [Skeleton2D].
+ [b]Note:[/b] The modifications in the held [SkeletonModificationStack2D] will only be executed if their execution mode matches the execution mode of the SkeletonModification2DStackHolder.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_held_modification_stack" qualifiers="const">
+ <return type="SkeletonModificationStack2D">
+ </return>
+ <description>
+ Returns the [SkeletonModificationStack2D] that this modification is holding.
+ </description>
+ </method>
+ <method name="set_held_modification_stack">
+ <return type="void">
+ </return>
+ <argument index="0" name="held_modification_stack" type="SkeletonModificationStack2D">
+ </argument>
+ <description>
+ Sets the [SkeletonModificationStack2D] that this modification is holding. This modification stack will then be executed when this modification is executed.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModification2DTwoBoneIK.xml b/doc/classes/SkeletonModification2DTwoBoneIK.xml
new file mode 100644
index 0000000000..554515556b
--- /dev/null
+++ b/doc/classes/SkeletonModification2DTwoBoneIK.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModification2DTwoBoneIK" inherits="SkeletonModification2D" version="4.0">
+ <brief_description>
+ A modification that rotates two bones using the law of cosigns to reach the target.
+ </brief_description>
+ <description>
+ This [SkeletonModification2D] 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.
+ 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 [SkeletonModification2DFABRIK], but gives similar, natural looking results.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_joint_one_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ Returns the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_one_bone_idx" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_two_bone2d_node" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <description>
+ Returns the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="get_joint_two_bone_idx" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_one_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone2d_node" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_one_bone_idx">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_two_bone2d_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone2d_node" type="NodePath">
+ </argument>
+ <description>
+ Sets the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ <method name="set_joint_two_bone_idx">
+ <return type="void">
+ </return>
+ <argument index="0" name="bone_idx" type="int">
+ </argument>
+ <description>
+ Sets the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="flip_bend_direction" type="bool" setter="set_flip_bend_direction" getter="get_flip_bend_direction" default="false">
+ If [code]true[/code], the bones in the modification will blend outward as opposed to inwards when contracting. If [code]false[/code], the bones will bend inwards when contracting.
+ </member>
+ <member name="target_maximum_distance" type="float" setter="set_target_maximum_distance" getter="get_target_maximum_distance" default="0.0">
+ The maximum distance the target can be at. If the target is farther than this distance, the modification will solve as if it's at this maximum distance. When set to [code]0[/code], the modification will solve without distance constraints.
+ </member>
+ <member name="target_minimum_distance" type="float" setter="set_target_minimum_distance" getter="get_target_minimum_distance" default="0.0">
+ The minimum distance the target can be at. If the target is closer than this distance, the modification will solve as if it's at this minimum distance. When set to [code]0[/code], the modification will solve without distance constraints.
+ </member>
+ <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will use when bending the [Bone2D] nodes.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml
new file mode 100644
index 0000000000..35b899fe08
--- /dev/null
+++ b/doc/classes/SkeletonModificationStack2D.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonModificationStack2D" inherits="Resource" version="4.0">
+ <brief_description>
+ A resource that holds a stack of [SkeletonModification2D]s.
+ </brief_description>
+ <description>
+ This resource is used by the Skeleton and holds a stack of [SkeletonModification2D]s.
+ This controls the order of the modifications and how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine [i]before[/i] the arms on a humanoid skeleton.
+ This resource also controls how strongly all of the modifications are applied to the [Skeleton2D].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_modification">
+ <return type="void">
+ </return>
+ <argument index="0" name="modification" type="SkeletonModification2D">
+ </argument>
+ <description>
+ Adds the passed-in [SkeletonModification2D] to the stack.
+ </description>
+ </method>
+ <method name="delete_modification">
+ <return type="void">
+ </return>
+ <argument index="0" name="mod_idx" type="int">
+ </argument>
+ <description>
+ Deletes the [SkeletonModification2D] at the index position [code]mod_idx[/code], if it exists.
+ </description>
+ </method>
+ <method name="enable_all_modifications">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Enables all [SkeletonModification2D]s in the stack.
+ </description>
+ </method>
+ <method name="execute">
+ <return type="void">
+ </return>
+ <argument index="0" name="delta" type="float">
+ </argument>
+ <argument index="1" name="execution_mode" type="int">
+ </argument>
+ <description>
+ Executes all of the [SkeletonModification2D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count].
+ [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results.
+ </description>
+ </method>
+ <method name="get_is_setup" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns a boolean that indiciates whether the modification stack is setup and can execute.
+ </description>
+ </method>
+ <method name="get_modification" qualifiers="const">
+ <return type="SkeletonModification2D">
+ </return>
+ <argument index="0" name="mod_idx" type="int">
+ </argument>
+ <description>
+ Returns the [SkeletonModification2D] at the passed-in index, [code]mod_idx[/code].
+ </description>
+ </method>
+ <method name="get_skeleton" qualifiers="const">
+ <return type="Skeleton2D">
+ </return>
+ <description>
+ Returns the [Skeleton2D] node that the SkeletonModificationStack2D is bound to.
+ </description>
+ </method>
+ <method name="set_modification">
+ <return type="void">
+ </return>
+ <argument index="0" name="mod_idx" type="int">
+ </argument>
+ <argument index="1" name="modification" type="SkeletonModification2D">
+ </argument>
+ <description>
+ Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code].
+ </description>
+ </method>
+ <method name="setup">
+ <return type="void">
+ </return>
+ <description>
+ Sets up the modification stack so it can execute. This function should be called by [Skeleton2D] and shouldn't be manually called unless you know what you are doing.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="false">
+ If [code]true[/code], the modification's in the stack will be called. This is handled automatically through the [Skeleton2D] node.
+ </member>
+ <member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0">
+ The number of modifications in the stack.
+ </member>
+ <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0">
+ The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the [Skeleton2D] [Bone2D] poses.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index 2a5c1ea6f4..298339d5fc 100644
--- a/doc/classes/StaticBody2D.xml
+++ b/doc/classes/StaticBody2D.xml
@@ -4,8 +4,11 @@
Static body for 2D physics.
</brief_description>
<description>
- Static body for 2D physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms.
- Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt).
+ Static body for 2D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], they don't consume any CPU resources as long as they don't move.
+ They however have extra functionalities to move and affect other bodies:
+ [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path.
+ [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path.
</description>
<tutorials>
</tutorials>
@@ -13,10 +16,14 @@
</methods>
<members>
<member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0">
- The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating.
+ The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating.
</member>
<member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2( 0, 0 )">
- The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving.
+ The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving.
+ </member>
+ <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false">
+ If [code]true[/code], the body will act the same as a [RigidBody2D] in [constant RigidBody2D.MODE_KINEMATIC] mode.
+ When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml
index 63a15cbe1d..5ffbb71522 100644
--- a/doc/classes/StaticBody3D.xml
+++ b/doc/classes/StaticBody3D.xml
@@ -4,8 +4,11 @@
Static body for 3D physics.
</brief_description>
<description>
- Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move.
- Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ Static body for 3D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move.
+ They however have extra functionalities to move and affect other bodies:
+ [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path.
+ [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
@@ -16,10 +19,14 @@
</methods>
<members>
<member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3( 0, 0, 0 )">
- The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation.
+ The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating.
</member>
<member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3( 0, 0, 0 )">
- The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement.
+ The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving.
+ </member>
+ <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false">
+ If [code]true[/code], the body will act the same as a [RigidBody3D] in [constant RigidBody3D.MODE_KINEMATIC] mode.
+ When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index fe63e434c9..9a96d8699c 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -976,7 +976,7 @@
</argument>
<description>
Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
- Note: If set to [code]false[/code], nothing is displayed in place of invalid characters.
+ Note: If set to [code]false[/code], nothing is displayed in place of invalid characters.
</description>
</method>
<method name="shaped_text_get_range" qualifiers="const">
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index e748ceb281..0dbf95376a 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -129,6 +129,16 @@
Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
+ <method name="looking_at" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="target" type="Vector2" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ </argument>
+ <description>
+ Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the [code]target[/code] position.
+ Operations take place in global space.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -138,33 +148,33 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Vector2">
+ <return type="PackedVector2Array">
</return>
- <argument index="0" name="right" type="Vector2">
+ <argument index="0" name="right" type="PackedVector2Array">
</argument>
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Rect2">
+ <return type="Transform2D">
</return>
- <argument index="0" name="right" type="Rect2">
+ <argument index="0" name="right" type="Transform2D">
</argument>
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Transform2D">
+ <return type="Rect2">
</return>
- <argument index="0" name="right" type="Transform2D">
+ <argument index="0" name="right" type="Rect2">
</argument>
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="PackedVector2Array">
+ <return type="Vector2">
</return>
- <argument index="0" name="right" type="PackedVector2Array">
+ <argument index="0" name="right" type="Vector2">
</argument>
<description>
</description>
@@ -210,6 +220,15 @@
Scales the transform by the given scale factor, using matrix multiplication.
</description>
</method>
+ <method name="set_rotation">
+ <return type="void">
+ </return>
+ <argument index="0" name="rotation" type="float">
+ </argument>
+ <description>
+ Sets the transform's rotation (in radians).
+ </description>
+ </method>
<method name="translated" qualifiers="const">
<return type="Transform2D">
</return>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index fdddddee28..b6effd441b 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -286,7 +286,7 @@
<method name="operator *" qualifiers="operator">
<return type="Vector3">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
</description>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 1c33274cb0..7f05b14765 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -382,14 +382,14 @@
</constant>
<constant name="DEBUG_DRAW_NORMAL_BUFFER" value="5" enum="DebugDraw">
</constant>
- <constant name="DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="DebugDraw">
- Objects are displayed with only the albedo value from [GIProbe]s.
+ <constant name="DEBUG_DRAW_VOXEL_GI_ALBEDO" value="6" enum="DebugDraw">
+ Objects are displayed with only the albedo value from [VoxelGI]s.
</constant>
- <constant name="DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="DebugDraw">
- Objects are displayed with only the lighting value from [GIProbe]s.
+ <constant name="DEBUG_DRAW_VOXEL_GI_LIGHTING" value="7" enum="DebugDraw">
+ Objects are displayed with only the lighting value from [VoxelGI]s.
</constant>
- <constant name="DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="DebugDraw">
- Objects are displayed with only the emission color from [GIProbe]s.
+ <constant name="DEBUG_DRAW_VOXEL_GI_EMISSION" value="8" enum="DebugDraw">
+ Objects are displayed with only the emission color from [VoxelGI]s.
</constant>
<constant name="DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="DebugDraw">
Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml
index 6327ab534f..9a74f2322e 100644
--- a/doc/classes/VisualShaderNode.xml
+++ b/doc/classes/VisualShaderNode.xml
@@ -9,6 +9,13 @@
<link title="VisualShaders">https://docs.godotengine.org/en/latest/tutorials/shading/visual_shaders.html</link>
</tutorials>
<methods>
+ <method name="clear_default_input_values">
+ <return type="void">
+ </return>
+ <description>
+ Clears the default input ports value.
+ </description>
+ </method>
<method name="get_default_input_values" qualifiers="const">
<return type="Array">
</return>
@@ -25,6 +32,15 @@
Returns the default value of the input [code]port[/code].
</description>
</method>
+ <method name="remove_input_port_default_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="port" type="int">
+ </argument>
+ <description>
+ Removes the default value of the input [code]port[/code].
+ </description>
+ </method>
<method name="set_default_input_values">
<return type="void">
</return>
diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml
new file mode 100644
index 0000000000..042644feb0
--- /dev/null
+++ b/doc/classes/VisualShaderNodeUVFunc.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeUVFunc" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Contains functions to modify texture coordinates ([code]uv[/code]) to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeUVFunc.Function" default="0">
+ A function to be applied to the texture coordinates. See [enum Function] for options.
+ </member>
+ </members>
+ <constants>
+ <constant name="FUNC_PANNING" value="0" enum="Function">
+ Translates [code]uv[/code] by using [code]scale[/code] and [code]offset[/code] values using the following formula: [code]uv = uv + offset * scale[/code]. [code]uv[/code] port is connected to [code]UV[/code] built-in by default.
+ </constant>
+ <constant name="FUNC_SCALING" value="1" enum="Function">
+ Scales [code]uv[/uv] by using [code]scale[/code] and [code]pivot[/code] values using the following formula: [code]uv = (uv - pivot) * scale + pivot[/code]. [code]uv[/code] port is connected to [code]UV[/code] built-in by default.
+ </constant>
+ <constant name="FUNC_MAX" value="2" enum="Function">
+ Represents the size of the [enum Function] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/VoxelGI.xml
index 4f56d1ad3e..fa5035349e 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/VoxelGI.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbe" inherits="VisualInstance3D" version="4.0">
+<class name="VoxelGI" inherits="VisualInstance3D" version="4.0">
<brief_description>
Real-time global illumination (GI) probe.
</brief_description>
<description>
- [GIProbe]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. [GIProbe]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 [GIProbe]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/gi_probes/quality].
+ [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.
</description>
<tutorials>
- <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
+ <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/voxel_gi.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
@@ -21,7 +21,7 @@
<argument index="1" name="create_visual_debug" type="bool" default="false">
</argument>
<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 [GIProbe]'s data and debug any issues that may be occurring.
+ 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.
</description>
</method>
<method name="debug_bake">
@@ -33,14 +33,14 @@
</method>
</methods>
<members>
- <member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data">
- The [GIProbeData] resource that holds the data for this [GIProbe].
+ <member name="data" type="VoxelGIData" setter="set_probe_data" getter="get_probe_data">
+ The [VoxelGIData] resource that holds the data for this [VoxelGI].
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )">
- The size of the area covered by the [GIProbe]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting.
+ The size of the area covered by the [VoxelGI]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting.
</member>
- <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv" default="1">
- Number of times to subdivide the grid that the [GIProbe] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.
+ <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="VoxelGI.Subdiv" default="1">
+ Number of times to subdivide the grid that the [VoxelGI] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.
</member>
</members>
<constants>
diff --git a/doc/classes/GIProbeData.xml b/doc/classes/VoxelGIData.xml
index 8549011b19..88a0411e2b 100644
--- a/doc/classes/GIProbeData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GIProbeData" inherits="Resource" version="4.0">
+<class name="VoxelGIData" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml
deleted file mode 100644
index 4ef6a4b4ec..0000000000
--- a/doc/classes/YSort.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="YSort" inherits="Node2D" version="4.0">
- <brief_description>
- Sort all child nodes based on their Y positions.
- </brief_description>
- <description>
- Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position.
- Nesting of YSort nodes is possible. Children YSort nodes will be sorted in the same space as the parent YSort, allowing to better organize a scene or divide it in multiple ones, yet keep the unique sorting.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled" default="true">
- If [code]true[/code], child nodes are sorted, otherwise sorting is disabled.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 11f6d91b05..f75c130039 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -113,12 +113,12 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
- Multiplies each component of the [Quat] by the given [float].
+ Multiplies each component of the [Quaternion] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 119cdf8eeb..b0ad963998 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -183,9 +183,9 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quat">
+ <return type="Quaternion">
</return>
- <argument index="0" name="right" type="Quat">
+ <argument index="0" name="right" type="Quaternion">
</argument>
<description>
Multiplies each component of the quaternion by the given integer.