summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Camera3D.xml8
-rw-r--r--doc/classes/ClippedCamera3D.xml93
-rw-r--r--doc/classes/Control.xml23
-rw-r--r--doc/classes/ImporterMesh.xml (renamed from doc/classes/EditorSceneImporterMesh.xml)10
-rw-r--r--doc/classes/ImporterMeshInstance3D.xml (renamed from doc/classes/EditorSceneImporterMeshNode3D.xml)4
-rw-r--r--doc/classes/KinematicCollision2D.xml103
-rw-r--r--doc/classes/KinematicCollision3D.xml75
-rw-r--r--doc/classes/Material.xml5
-rw-r--r--doc/classes/PhysicsServer2D.xml12
-rw-r--r--doc/classes/PhysicsServer3D.xml13
-rw-r--r--doc/classes/PhysicsTestMotionParameters2D.xml29
-rw-r--r--doc/classes/PhysicsTestMotionParameters3D.xml32
-rw-r--r--doc/classes/PhysicsTestMotionResult2D.xml108
-rw-r--r--doc/classes/PhysicsTestMotionResult3D.xml75
-rw-r--r--doc/classes/Theme.xml28
-rw-r--r--doc/classes/TileMap.xml2
-rw-r--r--doc/classes/Window.xml15
17 files changed, 374 insertions, 261 deletions
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index cd17a31e23..06e2f83f05 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -26,7 +26,7 @@
<method name="get_camera_transform" qualifiers="const">
<return type="Transform3D" />
<description>
- Returns the transform of the camera plus the vertical ([member v_offset]) and horizontal ([member h_offset]) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as [ClippedCamera3D] and [XRCamera3D].
+ Returns the transform of the camera plus the vertical ([member v_offset]) and horizontal ([member h_offset]) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as [XRCamera3D].
</description>
</method>
<method name="get_cull_mask_value" qualifiers="const">
@@ -42,6 +42,12 @@
Returns the camera's frustum planes in world space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset].
</description>
</method>
+ <method name="get_pyramid_shape_rid">
+ <return type="RID" />
+ <description>
+ Returns the RID of a pyramid shape encompassing the camera's view frustum, ignoring the camera's near plane. The tip of the pyramid represents the position of the camera.
+ </description>
+ </method>
<method name="is_position_behind" qualifiers="const">
<return type="bool" />
<argument index="0" name="world_point" type="Vector3" />
diff --git a/doc/classes/ClippedCamera3D.xml b/doc/classes/ClippedCamera3D.xml
deleted file mode 100644
index 1a0d3499cd..0000000000
--- a/doc/classes/ClippedCamera3D.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ClippedCamera3D" inherits="Camera3D" version="4.0">
- <brief_description>
- A [Camera3D] that includes collision.
- </brief_description>
- <description>
- This node extends [Camera3D] to add collisions with [Area3D] and/or [PhysicsBody3D] nodes. The camera cannot move through colliding objects.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="add_exception">
- <return type="void" />
- <argument index="0" name="node" type="Object" />
- <description>
- Adds a collision exception so the camera does not collide with the specified node.
- </description>
- </method>
- <method name="add_exception_rid">
- <return type="void" />
- <argument index="0" name="rid" type="RID" />
- <description>
- Adds a collision exception so the camera does not collide with the specified [RID].
- </description>
- </method>
- <method name="clear_exceptions">
- <return type="void" />
- <description>
- Removes all collision exceptions.
- </description>
- </method>
- <method name="get_clip_offset" qualifiers="const">
- <return type="float" />
- <description>
- Returns the distance the camera has been offset due to a collision.
- </description>
- </method>
- <method name="get_collision_mask_value" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="layer_number" type="int" />
- <description>
- Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
- </description>
- </method>
- <method name="remove_exception">
- <return type="void" />
- <argument index="0" name="node" type="Object" />
- <description>
- Removes a collision exception with the specified node.
- </description>
- </method>
- <method name="remove_exception_rid">
- <return type="void" />
- <argument index="0" name="rid" type="RID" />
- <description>
- Removes a collision exception with the specified [RID].
- </description>
- </method>
- <method name="set_collision_mask_value">
- <return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
- <description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
- </description>
- </method>
- </methods>
- <members>
- <member name="clip_to_areas" type="bool" setter="set_clip_to_areas" getter="is_clip_to_areas_enabled" default="false">
- If [code]true[/code], the camera stops on contact with [Area3D]s.
- </member>
- <member name="clip_to_bodies" type="bool" setter="set_clip_to_bodies" getter="is_clip_to_bodies_enabled" default="true">
- If [code]true[/code], the camera stops on contact with [PhysicsBody3D]s.
- </member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
- </member>
- <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
- The camera's collision margin. The camera can't get closer than this distance to a colliding object.
- </member>
- <member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="ClippedCamera3D.ClipProcessCallback" default="0">
- The camera's process callback. See [enum ClipProcessCallback].
- </member>
- </members>
- <constants>
- <constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ClipProcessCallback">
- The camera updates with the [code]_physics_process[/code] callback.
- </constant>
- <constant name="CLIP_PROCESS_IDLE" value="1" enum="ClipProcessCallback">
- The camera updates with the [code]_process[/code] callback.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index b00bf1c250..6ec754d3f9 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -458,6 +458,27 @@
See [method get_theme_color] for details.
</description>
</method>
+ <method name="get_theme_default_base_scale" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the default base scale value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_base_scale] value.
+ See [method get_theme_color] for details.
+ </description>
+ </method>
+ <method name="get_theme_default_font" qualifiers="const">
+ <return type="Font" />
+ <description>
+ Returns the default font from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font] value.
+ See [method get_theme_color] for details.
+ </description>
+ </method>
+ <method name="get_theme_default_font_size" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the default font size value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font_size] value.
+ See [method get_theme_color] for details.
+ </description>
+ </method>
<method name="get_theme_font" qualifiers="const">
<return type="Font" />
<argument index="0" name="name" type="StringName" />
@@ -1023,7 +1044,7 @@
<member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value.
[b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.
- [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property.
+ [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]yield(get_tree(), "process_frame")[/code] then set its [member rect_scale] property.
</member>
<member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)">
The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically.
diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/ImporterMesh.xml
index 5d57a76d5f..ab344f908c 100644
--- a/doc/classes/EditorSceneImporterMesh.xml
+++ b/doc/classes/ImporterMesh.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporterMesh" inherits="Resource" version="4.0">
+<class name="ImporterMesh" inherits="Resource" version="4.0">
<brief_description>
A [Resource] that contains vertex array-based geometry during the import process.
</brief_description>
<description>
- EditorSceneImporterMesh is a type of [Resource] analogous to [ArrayMesh]. It contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
+ ImporterMesh is a type of [Resource] analogous to [ArrayMesh]. It contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
- Unlike its runtime counterpart, [EditorSceneImporterMesh] contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling [method clear], followed by [method add_surface] for each surface.
+ Unlike its runtime counterpart, [ImporterMesh] contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling [method clear], followed by [method add_surface] for each surface.
</description>
<tutorials>
</tutorials>
@@ -37,7 +37,7 @@
<method name="clear">
<return type="void" />
<description>
- Removes all surfaces and blend shapes from this [EditorSceneImporterMesh].
+ Removes all surfaces and blend shapes from this [ImporterMesh].
</description>
</method>
<method name="get_blend_shape_count" qualifiers="const">
@@ -69,7 +69,7 @@
<return type="ArrayMesh" />
<argument index="0" name="base_mesh" type="ArrayMesh" default="null" />
<description>
- Returns the mesh data represented by this [EditorSceneImporterMesh] as a usable [ArrayMesh].
+ Returns the mesh data represented by this [ImporterMesh] as a usable [ArrayMesh].
This method caches the returned mesh, and subsequent calls will return the cached data until [method clear] is called.
If not yet cached and [code]base_mesh[/code] is provided, [code]base_mesh[/code] will be used and mutated.
</description>
diff --git a/doc/classes/EditorSceneImporterMeshNode3D.xml b/doc/classes/ImporterMeshInstance3D.xml
index 848448110e..6d572f543b 100644
--- a/doc/classes/EditorSceneImporterMeshNode3D.xml
+++ b/doc/classes/ImporterMeshInstance3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporterMeshNode3D" inherits="Node3D" version="4.0">
+<class name="ImporterMeshInstance3D" inherits="Node3D" version="4.0">
<brief_description>
</brief_description>
<description>
@@ -7,7 +7,7 @@
<tutorials>
</tutorials>
<members>
- <member name="mesh" type="EditorSceneImporterMesh" setter="set_mesh" getter="get_mesh">
+ <member name="mesh" type="ImporterMesh" setter="set_mesh" getter="get_mesh">
</member>
<member name="skeleton_path" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" default="NodePath(&quot;&quot;)">
</member>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index 29fc4700fd..23b01a0fc9 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -14,43 +14,74 @@
<return type="float" />
<argument index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" />
<description>
- The collision angle according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive.
+ Returns the collision angle according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive.
+ </description>
+ </method>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object" />
+ <description>
+ Returns the colliding body's attached [Object].
+ </description>
+ </method>
+ <method name="get_collider_id" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the unique instance ID of the colliding body's attached [Object]. See [method Object.get_instance_id].
+ </description>
+ </method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the colliding body's [RID] used by the [PhysicsServer2D].
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="Object" />
+ <description>
+ Returns the colliding body's shape.
+ </description>
+ </method>
+ <method name="get_collider_shape_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the colliding body's shape index. See [CollisionObject2D].
+ </description>
+ </method>
+ <method name="get_collider_velocity" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the colliding body's velocity.
+ </description>
+ </method>
+ <method name="get_local_shape" qualifiers="const">
+ <return type="Object" />
+ <description>
+ Returns the moving object's colliding shape.
+ </description>
+ </method>
+ <method name="get_normal" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the colliding body's shape's normal at the point of collision.
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the point of collision in global coordinates.
+ </description>
+ </method>
+ <method name="get_remainder" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the moving object's remaining movement vector.
+ </description>
+ </method>
+ <method name="get_travel" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the moving object's travel before collision.
</description>
</method>
</methods>
- <members>
- <member name="collider" type="Object" setter="" getter="get_collider">
- The colliding body.
- </member>
- <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0">
- The colliding body's unique instance ID. See [method Object.get_instance_id].
- </member>
- <member name="collider_rid" type="RID" setter="" getter="get_collider_rid">
- The colliding body's [RID] used by the [PhysicsServer2D].
- </member>
- <member name="collider_shape" type="Object" setter="" getter="get_collider_shape">
- The colliding body's shape.
- </member>
- <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0">
- The colliding shape's index. See [CollisionObject2D].
- </member>
- <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2(0, 0)">
- The colliding object's velocity.
- </member>
- <member name="local_shape" type="Object" setter="" getter="get_local_shape">
- The moving object's colliding shape.
- </member>
- <member name="normal" type="Vector2" setter="" getter="get_normal" default="Vector2(0, 0)">
- The colliding body's shape's normal at the point of collision.
- </member>
- <member name="position" type="Vector2" setter="" getter="get_position" default="Vector2(0, 0)">
- The point of collision, in global coordinates.
- </member>
- <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2(0, 0)">
- The moving object's remaining movement vector.
- </member>
- <member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2(0, 0)">
- The distance the moving object traveled before collision.
- </member>
- </members>
</class>
diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml
index 3db6fe019b..372113b281 100644
--- a/doc/classes/KinematicCollision3D.xml
+++ b/doc/classes/KinematicCollision3D.xml
@@ -15,108 +15,89 @@
<argument index="0" name="collision_index" type="int" default="0" />
<argument index="1" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
<description>
- The collision angle according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive.
+ Returns the collision angle according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive.
</description>
</method>
<method name="get_collider" qualifiers="const">
<return type="Object" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the collider by index (the latest by default).
+ Returns the colliding body's attached [Object] given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_collider_id" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the collider ID by index (the latest by default).
+ Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default). See [method Object.get_instance_id].
</description>
</method>
<method name="get_collider_rid" qualifiers="const">
<return type="RID" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the collider RID by index (the latest by default).
+ Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="Object" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the collider shape by index (the latest by default).
+ Returns the colliding body's shape given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_collider_shape_index" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the collider shape index by index (the latest by default).
+ Returns the colliding body's shape index given a collision index (the deepest collision by default). See [CollisionObject3D].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the collider velocity by index (the latest by default).
+ Returns the colliding body's velocity given a collision index (the deepest collision by default).
+ </description>
+ </method>
+ <method name="get_collision_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the number of detected collisions.
</description>
</method>
<method name="get_local_shape" qualifiers="const">
<return type="Object" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the collider velocity by index (the latest by default).
+ Returns the moving object's colliding shape given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_normal" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the collider normal by index (the latest by default).
+ Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_position" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
- Returns the collider collision point by index (the latest by default).
+ Returns the point of collision in global coordinates given a collision index (the deepest collision by default).
+ </description>
+ </method>
+ <method name="get_remainder" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the moving object's remaining movement vector.
+ </description>
+ </method>
+ <method name="get_travel" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the moving object's travel before collision.
</description>
</method>
</methods>
- <members>
- <member name="collider" type="Object" setter="" getter="get_best_collider">
- The colliding body.
- </member>
- <member name="collider_id" type="int" setter="" getter="get_best_collider_id" default="0">
- The colliding body's unique instance ID. See [method Object.get_instance_id].
- </member>
- <member name="collider_rid" type="RID" setter="" getter="get_best_collider_rid">
- The colliding body's [RID] used by the [PhysicsServer3D].
- </member>
- <member name="collider_shape" type="Object" setter="" getter="get_best_collider_shape">
- The colliding body's shape.
- </member>
- <member name="collider_shape_index" type="int" setter="" getter="get_best_collider_shape_index" default="0">
- The colliding shape's index. See [CollisionObject3D].
- </member>
- <member name="collider_velocity" type="Vector3" setter="" getter="get_best_collider_velocity" default="Vector3(0, 0, 0)">
- The colliding object's velocity.
- </member>
- <member name="collision_count" type="int" setter="" getter="get_collision_count" default="0">
- </member>
- <member name="local_shape" type="Object" setter="" getter="get_best_local_shape">
- The moving object's colliding shape.
- </member>
- <member name="normal" type="Vector3" setter="" getter="get_best_normal" default="Vector3(0, 0, 0)">
- The colliding body's shape's normal at the point of collision.
- </member>
- <member name="position" type="Vector3" setter="" getter="get_best_position" default="Vector3(0, 0, 0)">
- The point of collision, in global coordinates.
- </member>
- <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3(0, 0, 0)">
- The moving object's remaining movement vector.
- </member>
- <member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3(0, 0, 0)">
- The distance the moving object traveled before collision.
- </member>
- </members>
</class>
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
index a3e98228c6..f77b69b1f9 100644
--- a/doc/classes/Material.xml
+++ b/doc/classes/Material.xml
@@ -20,11 +20,12 @@
<members>
<member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass">
Sets the [Material] to be used for the next pass. This renders the object again using a different material.
- [b]Note:[/b] only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
+ [b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.
- [b]Note:[/b] this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
+ [b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial".
+ [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
</member>
</members>
<constants>
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index b5b6a7ea58..d55feff829 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -584,14 +584,10 @@
<method name="body_test_motion">
<return type="bool" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="from" type="Transform2D" />
- <argument index="2" name="motion" type="Vector2" />
- <argument index="3" name="margin" type="float" default="0.08" />
- <argument index="4" name="result" type="PhysicsTestMotionResult2D" default="null" />
- <argument index="5" name="collide_separation_ray" type="bool" default="false" />
- <argument index="6" name="exclude" type="Array" default="[]" />
- <description>
- Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in.
+ <argument index="1" name="parameters" type="PhysicsTestMotionParameters2D" />
+ <argument index="2" name="result" type="PhysicsTestMotionResult2D" default="null" />
+ <description>
+ Returns [code]true[/code] if a collision would result from moving along a motion vector from a given point in space. [PhysicsTestMotionParameters2D] is passed to set motion parameters. [PhysicsTestMotionResult2D] can be passed to return additional information.
</description>
</method>
<method name="capsule_shape_create">
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 1d1ca54dbb..0e32d1defa 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -577,15 +577,10 @@
<method name="body_test_motion">
<return type="bool" />
<argument index="0" name="body" type="RID" />
- <argument index="1" name="from" type="Transform3D" />
- <argument index="2" name="motion" type="Vector3" />
- <argument index="3" name="margin" type="float" default="0.001" />
- <argument index="4" name="result" type="PhysicsTestMotionResult3D" default="null" />
- <argument index="5" name="collide_separation_ray" type="bool" default="false" />
- <argument index="6" name="exclude" type="Array" default="[]" />
- <argument index="7" name="max_collisions" type="int" default="1" />
- <description>
- Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult3D] can be passed to return additional information in.
+ <argument index="1" name="parameters" type="PhysicsTestMotionParameters3D" />
+ <argument index="2" name="result" type="PhysicsTestMotionResult3D" default="null" />
+ <description>
+ Returns [code]true[/code] if a collision would result from moving along a motion vector from a given point in space. [PhysicsTestMotionParameters3D] is passed to set motion parameters. [PhysicsTestMotionResult3D] can be passed to return additional information.
</description>
</method>
<method name="box_shape_create">
diff --git a/doc/classes/PhysicsTestMotionParameters2D.xml b/doc/classes/PhysicsTestMotionParameters2D.xml
new file mode 100644
index 0000000000..7cea848039
--- /dev/null
+++ b/doc/classes/PhysicsTestMotionParameters2D.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsTestMotionParameters2D" inherits="RefCounted" version="4.0">
+ <brief_description>
+ Parameters to be sent to a 2D body motion test.
+ </brief_description>
+ <description>
+ This class contains parameters used in [method PhysicsServer2D.body_test_motion].
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="collide_separation_ray" type="bool" setter="set_collide_separation_ray_enabled" getter="is_collide_separation_ray_enabled" default="false">
+ If set to [code]true[/code], shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are used to detect collisions and can stop the motion. Can be useful when snapping to the ground.
+ If set to [code]false[/code], shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes.
+ </member>
+ <member name="exclude_bodies" type="Array" setter="set_exclude_bodies" getter="get_exclude_bodies" default="[]">
+ Optional array of body [RID] to exclude from collision.
+ </member>
+ <member name="from" type="Transform2D" setter="set_from" getter="get_from" default="Transform2D(1, 0, 0, 1, 0, 0)">
+ Transform in global space where the motion should start. Usually set to [member Node2D.global_transform] for the current body's transform.
+ </member>
+ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.08">
+ Increases the size of the shapes involved in the collision detection.
+ </member>
+ <member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2(0, 0)">
+ Motion vector to define the length and direction of the motion to test.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PhysicsTestMotionParameters3D.xml b/doc/classes/PhysicsTestMotionParameters3D.xml
new file mode 100644
index 0000000000..07abbb1cb1
--- /dev/null
+++ b/doc/classes/PhysicsTestMotionParameters3D.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsTestMotionParameters3D" inherits="RefCounted" version="4.0">
+ <brief_description>
+ Parameters to be sent to a 3D body motion test.
+ </brief_description>
+ <description>
+ This class contains parameters used in [method PhysicsServer3D.body_test_motion].
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="collide_separation_ray" type="bool" setter="set_collide_separation_ray_enabled" getter="is_collide_separation_ray_enabled" default="false">
+ If set to [code]true[/code], shapes of type [constant PhysicsServer3D.SHAPE_SEPARATION_RAY] are used to detect collisions and can stop the motion. Can be useful when snapping to the ground.
+ If set to [code]false[/code], shapes of type [constant PhysicsServer3D.SHAPE_SEPARATION_RAY] are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes.
+ </member>
+ <member name="exclude_bodies" type="Array" setter="set_exclude_bodies" getter="get_exclude_bodies" default="[]">
+ Optional array of body [RID] to exclude from collision.
+ </member>
+ <member name="from" type="Transform3D" setter="set_from" getter="get_from" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
+ Transform in global space where the motion should start. Usually set to [member Node3D.global_transform] for the current body's transform.
+ </member>
+ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.001">
+ Increases the size of the shapes involved in the collision detection.
+ </member>
+ <member name="max_collisions" type="int" setter="set_max_collisions" getter="get_max_collisions" default="1">
+ Maximum number of returned collisions, between [code]1[/code] and [code]32[/code]. Always returns the deepest detected collisions.
+ </member>
+ <member name="motion" type="Vector3" setter="set_motion" getter="get_motion" default="Vector3(0, 0, 0)">
+ Motion vector to define the length and direction of the motion to test.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml
index 8d594af673..355365cf25 100644
--- a/doc/classes/PhysicsTestMotionResult2D.xml
+++ b/doc/classes/PhysicsTestMotionResult2D.xml
@@ -1,35 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsTestMotionResult2D" inherits="RefCounted" version="4.0">
<brief_description>
+ Result from a 2D body motion test.
</brief_description>
<description>
+ This class contains the motion and collision result from [method PhysicsServer2D.body_test_motion].
</description>
<tutorials>
</tutorials>
- <members>
- <member name="collider" type="Object" setter="" getter="get_collider">
- </member>
- <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0">
- </member>
- <member name="collider_rid" type="RID" setter="" getter="get_collider_rid">
- </member>
- <member name="collider_shape" type="int" setter="" getter="get_collider_shape" default="0">
- </member>
- <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2(0, 0)">
- </member>
- <member name="collision_depth" type="float" setter="" getter="get_collision_depth" default="0.0">
- </member>
- <member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal" default="Vector2(0, 0)">
- </member>
- <member name="collision_point" type="Vector2" setter="" getter="get_collision_point" default="Vector2(0, 0)">
- </member>
- <member name="collision_safe_fraction" type="float" setter="" getter="get_collision_safe_fraction" default="0.0">
- </member>
- <member name="collision_unsafe_fraction" type="float" setter="" getter="get_collision_unsafe_fraction" default="0.0">
- </member>
- <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2(0, 0)">
- </member>
- <member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2(0, 0)">
- </member>
- </members>
+ <methods>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object" />
+ <description>
+ Returns the colliding body's attached [Object], if a collision occured.
+ </description>
+ </method>
+ <method name="get_collider_id" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the unique instance ID of the colliding body's attached [Object], if a collision occured. See [method Object.get_instance_id].
+ </description>
+ </method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occured.
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the colliding body's shape index, if a collision occured. See [CollisionObject2D].
+ </description>
+ </method>
+ <method name="get_collider_velocity" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the colliding body's velocity, if a collision occured.
+ </description>
+ </method>
+ <method name="get_collision_depth" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the length of overlap along the collision normal, if a collision occured.
+ </description>
+ </method>
+ <method name="get_collision_local_shape" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the moving object's colliding shape, if a collision occured.
+ </description>
+ </method>
+ <method name="get_collision_normal" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the colliding body's shape's normal at the point of collision, if a collision occured.
+ </description>
+ </method>
+ <method name="get_collision_point" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the point of collision in global coordinates, if a collision occured.
+ </description>
+ </method>
+ <method name="get_collision_safe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the maximum fraction of the motion that can occur without a collision, between [code]0[/code] and [code]1[/code].
+ </description>
+ </method>
+ <method name="get_collision_unsafe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code].
+ </description>
+ </method>
+ <method name="get_remainder" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the moving object's remaining movement vector.
+ </description>
+ </method>
+ <method name="get_travel" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the moving object's travel before collision.
+ </description>
+ </method>
+ </methods>
</class>
diff --git a/doc/classes/PhysicsTestMotionResult3D.xml b/doc/classes/PhysicsTestMotionResult3D.xml
index 8aa087e99a..282c140568 100644
--- a/doc/classes/PhysicsTestMotionResult3D.xml
+++ b/doc/classes/PhysicsTestMotionResult3D.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsTestMotionResult3D" inherits="RefCounted" version="4.0">
<brief_description>
+ Result from a 3D body motion test.
</brief_description>
<description>
+ This class contains the motion and collision result from [method PhysicsServer3D.body_test_motion].
</description>
<tutorials>
</tutorials>
@@ -11,77 +13,94 @@
<return type="Object" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
+ Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occured.
</description>
</method>
<method name="get_collider_id" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
+ Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occured. See [method Object.get_instance_id].
</description>
</method>
<method name="get_collider_rid" qualifiers="const">
<return type="RID" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
+ Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occured.
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
+ Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occured. See [CollisionObject3D].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
+ Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occured.
+ </description>
+ </method>
+ <method name="get_collision_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the number of detected collisions.
</description>
</method>
<method name="get_collision_depth" qualifiers="const">
<return type="float" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
+ Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occured.
+ </description>
+ </method>
+ <method name="get_collision_local_shape" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occured.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
+ Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occured.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="collision_index" type="int" default="0" />
<description>
+ Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occured.
+ </description>
+ </method>
+ <method name="get_collision_safe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the maximum fraction of the motion that can occur without a collision, between [code]0[/code] and [code]1[/code].
+ </description>
+ </method>
+ <method name="get_collision_unsafe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code].
+ </description>
+ </method>
+ <method name="get_remainder" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the moving object's remaining movement vector.
+ </description>
+ </method>
+ <method name="get_travel" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the moving object's travel before collision.
</description>
</method>
</methods>
- <members>
- <member name="collider" type="Object" setter="" getter="get_best_collider">
- </member>
- <member name="collider_id" type="int" setter="" getter="get_best_collider_id" default="0">
- </member>
- <member name="collider_rid" type="RID" setter="" getter="get_best_collider_rid">
- </member>
- <member name="collider_shape" type="int" setter="" getter="get_best_collider_shape" default="0">
- </member>
- <member name="collider_velocity" type="Vector3" setter="" getter="get_best_collider_velocity" default="Vector3(0, 0, 0)">
- </member>
- <member name="collision_count" type="int" setter="" getter="get_collision_count" default="0">
- </member>
- <member name="collision_depth" type="float" setter="" getter="get_best_collision_depth" default="0.0">
- </member>
- <member name="collision_normal" type="Vector3" setter="" getter="get_best_collision_normal" default="Vector3(0, 0, 0)">
- </member>
- <member name="collision_point" type="Vector3" setter="" getter="get_best_collision_point" default="Vector3(0, 0, 0)">
- </member>
- <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3(0, 0, 0)">
- </member>
- <member name="safe_fraction" type="float" setter="" getter="get_safe_fraction" default="0.0">
- </member>
- <member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3(0, 0, 0)">
- </member>
- <member name="unsafe_fraction" type="float" setter="" getter="get_unsafe_fraction" default="0.0">
- </member>
- </members>
</class>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index edf5874432..2f5648dda9 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -273,6 +273,24 @@
Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
</description>
</method>
+ <method name="has_default_base_scale" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this theme has a valid [member default_base_scale] value.
+ </description>
+ </method>
+ <method name="has_default_font" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this theme has a valid [member default_font] value.
+ </description>
+ </method>
+ <method name="has_default_font_size" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this theme has a valid [member default_font_size] value.
+ </description>
+ </method>
<method name="has_font" qualifiers="const">
<return type="bool" />
<argument index="0" name="name" type="StringName" />
@@ -484,11 +502,17 @@
</method>
</methods>
<members>
+ <member name="default_base_scale" type="float" setter="set_default_base_scale" getter="get_default_base_scale" default="0.0">
+ The default base scale factor of this [Theme] resource. Used by some controls to scale their visual properties based on a global scale factor. If this value is set to [code]0.0[/code], the global scale factor is used.
+ Use [method has_default_base_scale] to check if this value is valid.
+ </member>
<member name="default_font" type="Font" setter="set_default_font" getter="get_default_font">
- The theme's default font.
+ The default font of this [Theme] resource. Used as a fallback value for font items defined in this theme, but having invalid values. If this value is also invalid, the global default value is used.
+ Use [method has_default_font] to check if this value is valid.
</member>
<member name="default_font_size" type="int" setter="set_default_font_size" getter="get_default_font_size" default="-1">
- The theme's default font size. Set to [code]-1[/code] to ignore and use global default.
+ The default font size of this [Theme] resource. Used as a fallback value for font size items defined in this theme, but having invalid values. If this value is set to [code]-1[/code], the global default value is used.
+ Use [method has_default_font_size] to check if this value is valid.
</member>
</members>
<constants>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index e5fe823be6..532c9a7128 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -73,7 +73,7 @@
<return type="Vector2i" />
<argument index="0" name="body" type="RID" />
<description>
- Returns the coodinates of the tile for given physics body RID. Such RID can be retrieved from [member KinematicCollision2D.collider_rid], when colliding with a tile.
+ Returns the coodinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile.
</description>
</method>
<method name="get_layer_name" qualifiers="const">
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 15d844aacb..0653c8b453 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -59,6 +59,21 @@
<description>
</description>
</method>
+ <method name="get_theme_default_base_scale" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_theme_default_font" qualifiers="const">
+ <return type="Font" />
+ <description>
+ </description>
+ </method>
+ <method name="get_theme_default_font_size" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_theme_font" qualifiers="const">
<return type="Font" />
<argument index="0" name="name" type="StringName" />