diff options
Diffstat (limited to 'doc')
67 files changed, 650 insertions, 754 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index e210fa8808..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]. @@ -2605,8 +2605,8 @@ <constant name="TYPE_BASIS" value="15" enum="Variant.Type"> Variable is of type [Basis]. </constant> - <constant name="TYPE_TRANSFORM" value="16" enum="Variant.Type"> - Variable is of type [Transform]. + <constant name="TYPE_TRANSFORM3D" value="16" enum="Variant.Type"> + Variable is of type [Transform3D]. </constant> <constant name="TYPE_COLOR" value="17" enum="Variant.Type"> Variable is of type [Color]. diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index a28bde9946..af34a948f5 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -242,7 +242,7 @@ <method name="operator *" qualifiers="operator"> <return type="AABB"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> 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 2517941133..af7d8d73e8 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -21,10 +21,10 @@ </description> </method> <method name="get_root_motion_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> - Retrieve the motion of the [member root_motion_track] as a [Transform] 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("")"> 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/Array.xml b/doc/classes/Array.xml index 879b61a880..49775fa28b 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -615,7 +615,7 @@ <argument index="0" name="func" type="Callable"> </argument> <description> - Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. + Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array. [b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. [codeblocks] [gdscript] diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 7c1c4656f8..7826932179 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -113,7 +113,7 @@ <method name="lightmap_unwrap"> <return type="int" enum="Error"> </return> - <argument index="0" name="transform" type="Transform"> + <argument index="0" name="transform" type="Transform3D"> </argument> <argument index="1" name="texel_size" type="float"> </argument> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 55ae58ee3a..14fca04672 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -4,7 +4,7 @@ 3×3 matrix datatype. </brief_description> <description> - 3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a Transform. + 3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a [Transform3D]. Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). Can also be accessed as array of 3D vectors. These vectors are normally orthogonal to each other, but are not necessarily normalized (due to scaling). For more information, read the "Matrices and transforms" documentation article. @@ -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/Camera3D.xml b/doc/classes/Camera3D.xml index 9f1d6d8e31..30f6c2b951 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -27,7 +27,7 @@ </description> </method> <method name="get_camera_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform. 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 < 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 522eec5cbe..eb71407cf2 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -179,12 +179,12 @@ </description> </method> <method name="shape_owner_get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="owner_id" type="int"> </argument> <description> - Returns the shape owner's [Transform]. + Returns the shape owner's [Transform3D]. </description> </method> <method name="shape_owner_remove_shape"> @@ -214,10 +214,10 @@ </return> <argument index="0" name="owner_id" type="int"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] of the given shape owner. + Sets the [Transform3D] of the given shape owner. </description> </method> </methods> 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/DisplayServer.xml b/doc/classes/DisplayServer.xml index 0c9df071a7..6c1cd37beb 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1044,12 +1044,20 @@ <constant name="FEATURE_SWAP_BUFFERS" value="17" enum="Feature"> </constant> <constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode"> + Makes the mouse cursor visible if it is hidden. </constant> <constant name="MOUSE_MODE_HIDDEN" value="1" enum="MouseMode"> + Makes the mouse cursor hidden if it is visible. </constant> <constant name="MOUSE_MODE_CAPTURED" value="2" enum="MouseMode"> + Captures the mouse. The mouse will be hidden and its position locked at the center of the screen. + [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative]. </constant> <constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode"> + Confines the mouse cursor to the game window, and make it visible. + </constant> + <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode"> + Confines the mouse cursor to the game window, and make it hidden. </constant> <constant name="SCREEN_OF_MAIN_WINDOW" value="-1"> </constant> diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml index 693df8f819..8549011b19 100644 --- a/doc/classes/GIProbeData.xml +++ b/doc/classes/GIProbeData.xml @@ -11,7 +11,7 @@ <method name="allocate"> <return type="void"> </return> - <argument index="0" name="to_cell_xform" type="Transform"> + <argument index="0" name="to_cell_xform" type="Transform3D"> </argument> <argument index="1" name="aabb" type="AABB"> </argument> @@ -59,7 +59,7 @@ </description> </method> <method name="get_to_cell_xform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> </description> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index 76f0fdb406..47bdd9d745 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -22,7 +22,7 @@ <method name="emit_particle"> <return type="void"> </return> - <argument index="0" name="xform" type="Transform"> + <argument index="0" name="xform" type="Transform3D"> </argument> <argument index="1" name="velocity" type="Vector3"> </argument> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index d7408cd0ff..ebfd32c5fb 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -449,7 +449,10 @@ [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative]. </constant> <constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode"> - Makes the mouse cursor visible but confines it to the game window. + Confines the mouse cursor to the game window, and make it visible. + </constant> + <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode"> + Confines the mouse cursor to the game window, and make it hidden. </constant> <constant name="CURSOR_ARROW" value="0" enum="CursorShape"> Arrow cursor. Standard, default pointing cursor. 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 < 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 efd3f58f88..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="Transform"> - </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 [Transform], 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/Listener3D.xml b/doc/classes/Listener3D.xml index 998ea757ff..b2fcbe534d 100644 --- a/doc/classes/Listener3D.xml +++ b/doc/classes/Listener3D.xml @@ -18,10 +18,10 @@ </description> </method> <method name="get_listener_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> - Returns the listener's global orthonormalized [Transform]. + Returns the listener's global orthonormalized [Transform3D]. </description> </method> <method name="is_current" qualifiers="const"> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index ad8bd6991d..b33bcc89e3 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -72,7 +72,7 @@ </description> </method> <method name="get_item_navmesh_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="id" type="int"> </argument> @@ -96,7 +96,7 @@ </argument> <description> Returns an item's collision shapes. - The array consists of each [Shape3D] followed by its [Transform]. + The array consists of each [Shape3D] followed by its [Transform3D]. </description> </method> <method name="get_last_unused_item_id" qualifiers="const"> @@ -154,7 +154,7 @@ </return> <argument index="0" name="id" type="int"> </argument> - <argument index="1" name="navmesh" type="Transform"> + <argument index="1" name="navmesh" type="Transform3D"> </argument> <description> Sets the transform to apply to the item's navigation mesh. @@ -180,7 +180,7 @@ </argument> <description> Sets an item's collision shapes. - The array should consist of [Shape3D] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY]. + The array should consist of [Shape3D] objects, each followed by a [Transform3D] that will be applied to it. For shapes that should not have a transform, use [constant Transform3D.IDENTITY]. </description> </method> </methods> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 2adebdb306..02628f4960 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -40,12 +40,12 @@ </description> </method> <method name="get_instance_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="instance" type="int"> </argument> <description> - Returns the [Transform] of a specific instance. + Returns the [Transform3D] of a specific instance. </description> </method> <method name="get_instance_transform_2d" qualifiers="const"> @@ -86,10 +86,10 @@ </return> <argument index="0" name="instance" type="int"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] for a specific instance. + Sets the [Transform3D] for a specific instance. </description> </method> <method name="set_instance_transform_2d"> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index b098a7fc20..ef9efcb99c 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -413,7 +413,7 @@ </return> <argument index="0" name="region" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> Sets the global transformation for the region. 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 5c29c0d48f..a6237708c6 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -4,7 +4,7 @@ Most basic 3D game object, parent of all 3D-related nodes. </brief_description> <description> - Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project. + Most basic 3D game object, with a 3D [Transform3D] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project. Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system. [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad]. </description> @@ -128,7 +128,7 @@ <return type="void"> </return> <description> - Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform]. + Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D]. </description> </method> <method name="rotate"> @@ -202,7 +202,7 @@ <return type="void"> </return> <description> - Reset all transformations for this node (sets its [Transform] to the identity matrix). + Reset all transformations for this node (sets its [Transform3D] to the identity matrix). </description> </method> <method name="set_ignore_transform_notification"> @@ -288,8 +288,11 @@ <member name="gizmo" type="Node3DGizmo" setter="set_gizmo" getter="get_gizmo"> The [Node3DGizmo] for this node. Used for example in [EditorNode3DGizmo] as custom visualization and editing handles in Editor. </member> - <member name="global_transform" type="Transform" setter="set_global_transform" getter="get_global_transform"> - World3D space (global) [Transform] of this node. + <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). @@ -304,11 +307,8 @@ <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false"> If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space. </member> - <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - Local space [Transform] 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 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="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]). diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 85d41d7519..00ded39082 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -106,7 +106,7 @@ <method name="operator *" qualifiers="operator"> <return type="PackedVector3Array"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index 38d9f722b1..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,40 +43,12 @@ <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="Transform" setter="set_body_offset" getter="get_body_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <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> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0"> @@ -99,7 +63,7 @@ <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. </member> - <member name="joint_offset" type="Transform" setter="set_joint_offset" getter="get_joint_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="joint_offset" type="Transform3D" setter="set_joint_offset" getter="get_joint_offset" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> Sets the joint's transform. </member> <member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation"> 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 eea681e696..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> @@ -214,7 +214,7 @@ <member name="total_linear_damp" type="float" setter="" getter="get_total_linear_damp"> The rate at which the body stops moving, if there are not any other forces moving it. </member> - <member name="transform" type="Transform" setter="set_transform" getter="get_transform"> + <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform"> The body's transformation matrix. </member> </members> 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 46de9e5282..2972d5155c 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -16,7 +16,7 @@ </argument> <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <argument index="2" name="transform" type="Transform3D" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </argument> <argument index="3" name="disabled" type="bool" default="false"> </argument> @@ -92,7 +92,7 @@ </description> </method> <method name="area_get_shape_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="area" type="RID"> </argument> @@ -121,7 +121,7 @@ </description> </method> <method name="area_get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="area" type="RID"> </argument> @@ -258,7 +258,7 @@ </argument> <argument index="1" name="shape_idx" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> Sets the transform matrix for an area shape. @@ -291,7 +291,7 @@ </return> <argument index="0" name="area" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> Sets the transform matrix for an area. @@ -337,7 +337,7 @@ </argument> <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <argument index="2" name="transform" type="Transform3D" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </argument> <argument index="3" name="disabled" type="bool" default="false"> </argument> @@ -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> @@ -510,7 +502,7 @@ </description> </method> <method name="body_get_shape_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="body" type="RID"> </argument> @@ -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> @@ -760,7 +742,7 @@ </argument> <argument index="1" name="shape_idx" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> Sets the transform matrix for a body shape. @@ -1017,11 +999,11 @@ </argument> <argument index="1" name="body_A" type="RID"> </argument> - <argument index="2" name="local_ref_A" type="Transform"> + <argument index="2" name="local_ref_A" type="Transform3D"> </argument> <argument index="3" name="body_B" type="RID"> </argument> - <argument index="4" name="local_ref_B" type="Transform"> + <argument index="4" name="local_ref_B" type="Transform3D"> </argument> <description> </description> @@ -1033,11 +1015,11 @@ </argument> <argument index="1" name="body_A" type="RID"> </argument> - <argument index="2" name="local_ref_A" type="Transform"> + <argument index="2" name="local_ref_A" type="Transform3D"> </argument> <argument index="3" name="body_B" type="RID"> </argument> - <argument index="4" name="local_ref_B" type="Transform"> + <argument index="4" name="local_ref_B" type="Transform3D"> </argument> <description> </description> @@ -1049,11 +1031,11 @@ </argument> <argument index="1" name="body_A" type="RID"> </argument> - <argument index="2" name="hinge_A" type="Transform"> + <argument index="2" name="hinge_A" type="Transform3D"> </argument> <argument index="3" name="body_B" type="RID"> </argument> - <argument index="4" name="hinge_B" type="Transform"> + <argument index="4" name="hinge_B" type="Transform3D"> </argument> <description> </description> @@ -1081,11 +1063,11 @@ </argument> <argument index="1" name="body_A" type="RID"> </argument> - <argument index="2" name="local_ref_A" type="Transform"> + <argument index="2" name="local_ref_A" type="Transform3D"> </argument> <argument index="3" name="body_B" type="RID"> </argument> - <argument index="4" name="local_ref_B" type="Transform"> + <argument index="4" name="local_ref_B" type="Transform3D"> </argument> <description> </description> @@ -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/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index 4b43ea66fc..79bc29057f 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -60,7 +60,7 @@ [/csharp] [/codeblocks] </member> - <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> The queried shape's transform matrix. </member> </members> 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/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index a200858a3c..7d7d744c1b 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( "gd", "shader" )"> + <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "gdshader" )"> 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=""res://script_templates""> 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/RemoteTransform3D.xml b/doc/classes/RemoteTransform3D.xml index bd3da2aea9..453177496f 100644 --- a/doc/classes/RemoteTransform3D.xml +++ b/doc/classes/RemoteTransform3D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RemoteTransform3D" inherits="Node3D" version="4.0"> <brief_description> - RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node in the scene. + RemoteTransform3D pushes its own [Transform3D] to another [Node3D] derived Node in the scene. </brief_description> <description> - RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node (called the remote node) in the scene. + RemoteTransform3D pushes its own [Transform3D] to another [Node3D] derived Node (called the remote node) in the scene. It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. </description> <tutorials> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 7a345f726d..02130333f9 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -130,10 +130,10 @@ </return> <argument index="0" name="camera" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> - Sets [Transform] of camera. + Sets [Transform3D] of camera. </description> </method> <method name="camera_set_use_vertical_aspect"> @@ -1335,7 +1335,7 @@ </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> Sets the world space transform of the instance. Equivalent to [member Node3D.transform]. @@ -1894,14 +1894,14 @@ </description> </method> <method name="multimesh_instance_get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="multimesh" type="RID"> </argument> <argument index="1" name="index" type="int"> </argument> <description> - Returns the [Transform] of the specified instance. + Returns the [Transform3D] of the specified instance. </description> </method> <method name="multimesh_instance_get_transform_2d" qualifiers="const"> @@ -1948,10 +1948,10 @@ </argument> <argument index="1" name="index" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. + Sets the [Transform3D] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. </description> </method> <method name="multimesh_instance_set_transform_2d"> @@ -2142,10 +2142,10 @@ </return> <argument index="0" name="particles" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] that will be used by the particles when they first emit. + Sets the [Transform3D] that will be used by the particles when they first emit. </description> </method> <method name="particles_set_emitting"> @@ -2590,14 +2590,14 @@ </description> </method> <method name="skeleton_bone_get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="skeleton" type="RID"> </argument> <argument index="1" name="bone" type="int"> </argument> <description> - Returns the [Transform] set for a specific bone of this skeleton. + Returns the [Transform3D] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_get_transform_2d" qualifiers="const"> @@ -2618,10 +2618,10 @@ </argument> <argument index="1" name="bone" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] for a specific bone of this skeleton. + Sets the [Transform3D] for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform_2d"> @@ -3267,7 +3267,7 @@ Use [Transform2D] to store MultiMesh transform. </constant> <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> - Use [Transform] to store MultiMesh transform. + Use [Transform3D] to store MultiMesh transform. </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. 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/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 44ad460459..d8b35ad272 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -23,9 +23,9 @@ </description> </method> <method name="bone_transform_to_world_transform"> - <return type="Transform"> + <return type="Transform3D"> </return> - <argument index="0" name="bone_transform" type="Transform"> + <argument index="0" name="bone_transform" type="Transform3D"> </argument> <description> Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node. @@ -63,7 +63,7 @@ </description> </method> <method name="get_bone_custom_pose" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bone_idx" type="int"> </argument> @@ -72,7 +72,7 @@ </description> </method> <method name="get_bone_global_pose" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bone_idx" type="int"> </argument> @@ -81,7 +81,7 @@ </description> </method> <method name="get_bone_global_pose_no_override" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bone_idx" type="int"> </argument> @@ -109,7 +109,7 @@ </description> </method> <method name="get_bone_pose" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bone_idx" type="int"> </argument> @@ -124,7 +124,7 @@ </description> </method> <method name="get_bone_rest" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bone_idx" type="int"> </argument> @@ -199,7 +199,7 @@ </return> <argument index="0" name="bone_idx" type="int"> </argument> - <argument index="1" name="custom_pose" type="Transform"> + <argument index="1" name="custom_pose" type="Transform3D"> </argument> <description> Sets the custom pose transform, [code]custom_pose[/code], for the bone at [code]bone_idx[/code]. This pose is an addition to the bone rest pose. @@ -222,7 +222,7 @@ </return> <argument index="0" name="bone_idx" type="int"> </argument> - <argument index="1" name="pose" type="Transform"> + <argument index="1" name="pose" type="Transform3D"> </argument> <argument index="2" name="amount" type="float"> </argument> @@ -261,7 +261,7 @@ </return> <argument index="0" name="bone_idx" type="int"> </argument> - <argument index="1" name="pose" type="Transform"> + <argument index="1" name="pose" type="Transform3D"> </argument> <description> Sets the pose transform for bone [code]bone_idx[/code]. @@ -273,7 +273,7 @@ </return> <argument index="0" name="bone_idx" type="int"> </argument> - <argument index="1" name="rest" type="Transform"> + <argument index="1" name="rest" type="Transform3D"> </argument> <description> Sets the rest transform for bone [code]bone_idx[/code]. @@ -289,9 +289,9 @@ </description> </method> <method name="world_transform_to_bone_transform"> - <return type="Transform"> + <return type="Transform3D"> </return> - <argument index="0" name="world_transform" type="Transform"> + <argument index="0" name="world_transform" type="Transform3D"> </argument> <description> Takes the given world transform, relative to the [Skeleton3D], and converts it to a bone pose/transform. diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml index 5193109447..5949ad54fd 100644 --- a/doc/classes/SkeletonIK3D.xml +++ b/doc/classes/SkeletonIK3D.xml @@ -48,7 +48,7 @@ </member> <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="@"""> </member> - <member name="target" type="Transform" setter="set_target_transform" getter="get_target_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="target" type="Transform3D" setter="set_target_transform" getter="get_target_transform" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> <member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> </member> diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml index e22feb42f0..f409b6c80c 100644 --- a/doc/classes/Skin.xml +++ b/doc/classes/Skin.xml @@ -12,7 +12,7 @@ </return> <argument index="0" name="bone" type="int"> </argument> - <argument index="1" name="pose" type="Transform"> + <argument index="1" name="pose" type="Transform3D"> </argument> <description> </description> @@ -46,7 +46,7 @@ </description> </method> <method name="get_bind_pose" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bind_index" type="int"> </argument> @@ -86,7 +86,7 @@ </return> <argument index="0" name="bind_index" type="int"> </argument> - <argument index="1" name="pose" type="Transform"> + <argument index="1" name="pose" type="Transform3D"> </argument> <description> </description> 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/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 1195e4aa2b..d434f5c2c9 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -76,10 +76,10 @@ </argument> <argument index="1" name="surface" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> - Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform]. + Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform3D]. </description> </method> <method name="begin"> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 6ae7fbcf79..e748ceb281 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -18,7 +18,7 @@ <return type="Transform2D"> </return> <description> - Constructs a default-initialized [Transform] set to [constant IDENTITY]. + Constructs a default-initialized [Transform2D] set to [constant IDENTITY]. </description> </method> <method name="Transform2D" qualifiers="constructor"> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform3D.xml index 9d8721e2de..0d49255523 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Transform" version="4.0"> +<class name="Transform3D" version="4.0"> <brief_description> 3D transformation (3×4 matrix). </brief_description> @@ -16,35 +16,35 @@ <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link> </tutorials> <methods> - <method name="Transform" qualifiers="constructor"> - <return type="Transform"> + <method name="Transform3D" qualifiers="constructor"> + <return type="Transform3D"> </return> <description> - Constructs a default-initialized [Transform] set to [constant IDENTITY]. + Constructs a default-initialized [Transform3D] set to [constant IDENTITY]. </description> </method> - <method name="Transform" qualifiers="constructor"> - <return type="Transform"> + <method name="Transform3D" qualifiers="constructor"> + <return type="Transform3D"> </return> - <argument index="0" name="from" type="Transform"> + <argument index="0" name="from" type="Transform3D"> </argument> <description> - Constructs a [Transform] as a copy of the given [Transform]. + Constructs a [Transform3D] as a copy of the given [Transform3D]. </description> </method> - <method name="Transform" qualifiers="constructor"> - <return type="Transform"> + <method name="Transform3D" qualifiers="constructor"> + <return type="Transform3D"> </return> <argument index="0" name="basis" type="Basis"> </argument> <argument index="1" name="origin" type="Vector3"> </argument> <description> - Constructs a Transform from a [Basis] and [Vector3]. + Constructs a Transform3D from a [Basis] and [Vector3]. </description> </method> - <method name="Transform" qualifiers="constructor"> - <return type="Transform"> + <method name="Transform3D" qualifiers="constructor"> + <return type="Transform3D"> </return> <argument index="0" name="x_axis" type="Vector3"> </argument> @@ -55,29 +55,29 @@ <argument index="3" name="origin" type="Vector3"> </argument> <description> - Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). + Constructs a Transform3D from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). </description> </method> <method name="affine_inverse" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. </description> </method> <method name="interpolate_with" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> - <argument index="0" name="xform" type="Transform"> + <argument index="0" name="xform" type="Transform3D"> </argument> <argument index="1" name="weight" type="float"> </argument> <description> - Interpolates the transform to other Transform by weight amount (on the range of 0.0 to 1.0). + Interpolates the transform to other Transform3D by weight amount (on the range of 0.0 to 1.0). </description> </method> <method name="inverse" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). @@ -86,14 +86,14 @@ <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="xform" type="Transform"> + <argument index="0" name="xform" type="Transform3D"> </argument> <description> 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="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="target" type="Vector3"> </argument> @@ -108,7 +108,7 @@ <method name="operator !=" qualifiers="operator"> <return type="bool"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> @@ -122,9 +122,9 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Transform"> + <return type="Transform3D"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> @@ -148,20 +148,20 @@ <method name="operator ==" qualifiers="operator"> <return type="bool"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> </method> <method name="orthonormalized" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors. </description> </method> <method name="rotated" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="axis" type="Vector3"> </argument> @@ -172,7 +172,7 @@ </description> </method> <method name="scaled" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="scale" type="Vector3"> </argument> @@ -181,7 +181,7 @@ </description> </method> <method name="translated" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="offset" type="Vector3"> </argument> @@ -200,17 +200,17 @@ </member> </members> <constants> - <constant name="IDENTITY" value="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - [Transform] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation. + <constant name="IDENTITY" value="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + [Transform3D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation. </constant> - <constant name="FLIP_X" value="Transform( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - [Transform] with mirroring applied perpendicular to the YZ plane. + <constant name="FLIP_X" value="Transform3D( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + [Transform3D] with mirroring applied perpendicular to the YZ plane. </constant> - <constant name="FLIP_Y" value="Transform( 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0 )"> - [Transform] with mirroring applied perpendicular to the XZ plane. + <constant name="FLIP_Y" value="Transform3D( 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0 )"> + [Transform3D] with mirroring applied perpendicular to the XZ plane. </constant> - <constant name="FLIP_Z" value="Transform( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0 )"> - [Transform] with mirroring applied perpendicular to the XY plane. + <constant name="FLIP_Z" value="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0 )"> + [Transform3D] with mirroring applied perpendicular to the XY plane. </constant> </constants> </class> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 170bd78067..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> @@ -294,7 +294,7 @@ <method name="operator *" qualifiers="operator"> <return type="Vector3"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 01d569d9c8..2a12254b71 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -44,7 +44,7 @@ </return> <description> Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance3D]. - Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform]. See also [method get_aabb]. + Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform3D]. See also [method get_aabb]. </description> </method> <method name="set_base"> diff --git a/doc/classes/VisualShaderNodeDeterminant.xml b/doc/classes/VisualShaderNodeDeterminant.xml index 6b042f6172..06b05addfa 100644 --- a/doc/classes/VisualShaderNodeDeterminant.xml +++ b/doc/classes/VisualShaderNodeDeterminant.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeDeterminant" inherits="VisualShaderNode" version="4.0"> <brief_description> - Calculates the determinant of a [Transform] within the visual shader graph. + Calculates the determinant of a [Transform3D] within the visual shader graph. </brief_description> <description> Translates to [code]determinant(x)[/code] in the shader language. diff --git a/doc/classes/VisualShaderNodeTransformCompose.xml b/doc/classes/VisualShaderNodeTransformCompose.xml index 41762b0099..b82ce9bdd8 100644 --- a/doc/classes/VisualShaderNodeTransformCompose.xml +++ b/doc/classes/VisualShaderNodeTransformCompose.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformCompose" inherits="VisualShaderNode" version="4.0"> <brief_description> - Composes a [Transform] from four [Vector3]s within the visual shader graph. + Composes a [Transform3D] from four [Vector3]s within the visual shader graph. </brief_description> <description> Creates a 4x4 transform matrix using four vectors of type [code]vec3[/code]. Each vector is one row in the matrix and the last column is a [code]vec4(0, 0, 0, 1)[/code]. diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml index b8f054e914..550ed829c9 100644 --- a/doc/classes/VisualShaderNodeTransformConstant.xml +++ b/doc/classes/VisualShaderNodeTransformConstant.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNodeConstant" version="4.0"> <brief_description> - A [Transform] constant for use within the visual shader graph. + A [Transform3D] constant for use within the visual shader graph. </brief_description> <description> - A constant [Transform], which can be used as an input node. + A constant [Transform3D], which can be used as an input node. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="constant" type="Transform" setter="set_constant" getter="get_constant" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - A [Transform] constant which represents the state of this node. + <member name="constant" type="Transform3D" setter="set_constant" getter="get_constant" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + A [Transform3D] constant which represents the state of this node. </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeTransformDecompose.xml b/doc/classes/VisualShaderNodeTransformDecompose.xml index c8d893db00..b815efc67a 100644 --- a/doc/classes/VisualShaderNodeTransformDecompose.xml +++ b/doc/classes/VisualShaderNodeTransformDecompose.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformDecompose" inherits="VisualShaderNode" version="4.0"> <brief_description> - Decomposes a [Transform] into four [Vector3]s within the visual shader graph. + Decomposes a [Transform3D] into four [Vector3]s within the visual shader graph. </brief_description> <description> Takes a 4x4 transform matrix and decomposes it into four [code]vec3[/code] values, one from each row of the matrix. diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml index d0b5c5129d..41a58e1458 100644 --- a/doc/classes/VisualShaderNodeTransformFunc.xml +++ b/doc/classes/VisualShaderNodeTransformFunc.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformFunc" inherits="VisualShaderNode" version="4.0"> <brief_description> - Computes a [Transform] function within the visual shader graph. + Computes a [Transform3D] function within the visual shader graph. </brief_description> <description> - Computes an inverse or transpose function on the provided [Transform]. + Computes an inverse or transpose function on the provided [Transform3D]. </description> <tutorials> </tutorials> @@ -17,10 +17,10 @@ </members> <constants> <constant name="FUNC_INVERSE" value="0" enum="Function"> - Perform the inverse operation on the [Transform] matrix. + Perform the inverse operation on the [Transform3D] matrix. </constant> <constant name="FUNC_TRANSPOSE" value="1" enum="Function"> - Perform the transpose operation on the [Transform] matrix. + Perform the transpose operation on the [Transform3D] matrix. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformMult.xml b/doc/classes/VisualShaderNodeTransformMult.xml index 02b6e0cd1c..f26f60a1f3 100644 --- a/doc/classes/VisualShaderNodeTransformMult.xml +++ b/doc/classes/VisualShaderNodeTransformMult.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformMult" inherits="VisualShaderNode" version="4.0"> <brief_description> - Multiplies [Transform] by [Transform] within the visual shader graph. + Multiplies [Transform3D] by [Transform3D] within the visual shader graph. </brief_description> <description> A multiplication operation on two transforms (4x4 matrices), with support for different multiplication operators. diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml index ff6246618d..1f1cc4b630 100644 --- a/doc/classes/VisualShaderNodeTransformUniform.xml +++ b/doc/classes/VisualShaderNodeTransformUniform.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> - A [Transform] uniform for use within the visual shader graph. + A [Transform3D] uniform for use within the visual shader graph. </brief_description> <description> Translated to [code]uniform mat4[/code] in the shader language. @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="default_value" type="Transform" setter="set_default_value" getter="get_default_value" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="default_value" type="Transform3D" setter="set_default_value" getter="get_default_value" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> A default value to be assigned within the shader. </member> <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml index 3d5f87f727..2c9c115d9c 100644 --- a/doc/classes/VisualShaderNodeTransformVecMult.xml +++ b/doc/classes/VisualShaderNodeTransformVecMult.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformVecMult" inherits="VisualShaderNode" version="4.0"> <brief_description> - Multiplies a [Transform] and a [Vector3] within the visual shader graph. + Multiplies a [Transform3D] and a [Vector3] within the visual shader graph. </brief_description> <description> A multiplication operation on a transform (4x4 matrix) and a vector, with support for different multiplication operators. diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml index 5274d952fd..2cf8e1d6f5 100644 --- a/doc/classes/XRPositionalTracker.xml +++ b/doc/classes/XRPositionalTracker.xml @@ -69,7 +69,7 @@ </description> </method> <method name="get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="adjust_by_reference_frame" type="bool"> </argument> diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml index d0edf91fed..8284fa4a89 100644 --- a/doc/classes/XRServer.xml +++ b/doc/classes/XRServer.xml @@ -63,7 +63,7 @@ </description> </method> <method name="get_hmd_transform"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> Returns the primary interface's transformation. @@ -114,7 +114,7 @@ </description> </method> <method name="get_reference_frame" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces. 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. |