summaryrefslogtreecommitdiff
path: root/doc/base
diff options
context:
space:
mode:
Diffstat (limited to 'doc/base')
-rw-r--r--doc/base/classes.xml379
1 files changed, 291 insertions, 88 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 3a426e7a1d..16a8b16a6f 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -9047,8 +9047,10 @@
</class>
<class name="BitMap" inherits="Resource" category="Core">
<brief_description>
+ Boolean matrix.
</brief_description>
<description>
+ A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates.
</description>
<methods>
<method name="create">
@@ -9057,6 +9059,7 @@
<argument index="0" name="size" type="Vector2">
</argument>
<description>
+ Creates a bitmap with the specified size, filled with false.
</description>
</method>
<method name="create_from_image_alpha">
@@ -9065,6 +9068,7 @@
<argument index="0" name="image" type="Image">
</argument>
<description>
+ Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is 0, and true in other case.
</description>
</method>
<method name="get_bit" qualifiers="const">
@@ -9073,18 +9077,21 @@
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
+ Returns bitmap's value at the specified position.
</description>
</method>
<method name="get_size" qualifiers="const">
<return type="Vector2">
</return>
<description>
+ Returns bitmap's dimensions.
</description>
</method>
<method name="get_true_bit_count" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the amount of bitmap elements that are set to true.
</description>
</method>
<method name="set_bit">
@@ -9095,6 +9102,7 @@
<argument index="1" name="bit" type="bool">
</argument>
<description>
+ Sets the bitmap's element at the specified position, to the specified value.
</description>
</method>
<method name="set_bit_rect">
@@ -9105,6 +9113,7 @@
<argument index="1" name="bit" type="bool">
</argument>
<description>
+ Sets a rectangular portion of the bitmap to the specified value.
</description>
</method>
</methods>
@@ -9392,35 +9401,30 @@
<return type="Texture">
</return>
<description>
- Return the button icon.
</description>
</method>
<method name="get_clip_text" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the state of the [i]clip_text[/i] property (see [method set_clip_text])
</description>
</method>
<method name="get_text" qualifiers="const">
<return type="String">
</return>
<description>
- Return the button text.
</description>
</method>
<method name="get_text_align" qualifiers="const">
<return type="int" enum="Button.TextAlign">
</return>
<description>
- Return the text alignment policy.
</description>
</method>
<method name="is_flat" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the state of the [i]flat[/i] property (see [method set_flat]).
</description>
</method>
<method name="set_button_icon">
@@ -9429,7 +9433,6 @@
<argument index="0" name="texture" type="Texture">
</argument>
<description>
- Set the icon that will be displayed next to the text inside the button area.
</description>
</method>
<method name="set_clip_text">
@@ -9438,7 +9441,6 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the [i]clip_text[/i] property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text.
</description>
</method>
<method name="set_flat">
@@ -9447,7 +9449,6 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the [i]flat[/i] property of a Button. Flat buttons don't display decoration unless hovered or pressed.
</description>
</method>
<method name="set_text">
@@ -9456,7 +9457,6 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Set the button text, which will be displayed inside the button area.
</description>
</method>
<method name="set_text_align">
@@ -9465,20 +9465,24 @@
<argument index="0" name="align" type="int" enum="Button.TextAlign">
</argument>
<description>
- Set the text alignment policy, using one of the ALIGN_* constants.
</description>
</method>
</methods>
<members>
<member name="align" type="int" setter="set_text_align" getter="get_text_align" brief="" enum="Button.TextAlign">
+ Text alignment policy for the button's text, use one of the ALIGN_* constants.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" brief="">
+ When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default.
</member>
- <member name="flat" type="bool" setter="set_flat" getter="is_flat" brief="">
+ <member name="flat" type="bool" setter="set_flat" getter="is_flat" brief="button decoration mode">
+ Flat buttons don't display decoration.
</member>
<member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon" brief="">
+ Button's icon, if text is present the icon will be placed before the text.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" brief="">
+ The button's text that will be displayed inside the button's area.
</member>
</members>
<constants>
@@ -9486,7 +9490,7 @@
Align the text to the left.
</constant>
<constant name="ALIGN_CENTER" value="1">
- Center the text.
+ Align the text to the center.
</constant>
<constant name="ALIGN_RIGHT" value="2">
Align the text to the right.
@@ -11055,8 +11059,10 @@
</class>
<class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core">
<brief_description>
+ Class representing a capsule-shaped [PrimitiveMesh].
</brief_description>
<description>
+ Class representing a capsule-shaped [PrimitiveMesh].
</description>
<methods>
<method name="get_mid_height" qualifiers="const">
@@ -11118,12 +11124,16 @@
</methods>
<members>
<member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height" brief="">
+ Height of the capsule mesh from the center point. Defaults to 1.0.
</member>
<member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" brief="">
+ Number of radial segments on the capsule mesh. Defaults to 64.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" brief="">
+ Radius of the capsule mesh. Defaults to 1.0.
</member>
<member name="rings" type="int" setter="set_rings" getter="get_rings" brief="">
+ Number of rings along the height of the capsule. Defaults to 8.
</member>
</members>
<constants>
@@ -12177,8 +12187,10 @@
</class>
<class name="CollisionShape" inherits="Spatial" category="Core">
<brief_description>
+ Node that represents collision shape data in 3D space.
</brief_description>
<description>
+ Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
</description>
<methods>
<method name="get_shape" qualifiers="const">
@@ -12197,6 +12209,7 @@
<return type="void">
</return>
<description>
+ Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry.
</description>
</method>
<method name="resource_changed">
@@ -12205,6 +12218,7 @@
<argument index="0" name="resource" type="Resource">
</argument>
<description>
+ If this method exists within a script it will be called whenever the shape resource has been modified.
</description>
</method>
<method name="set_disabled">
@@ -12226,8 +12240,10 @@
</methods>
<members>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
+ A disabled collision shape has no effect in the world.
</member>
<member name="shape" type="Shape" setter="set_shape" getter="get_shape" brief="">
+ The actual shape owned by this collision shape.
</member>
</members>
<constants>
@@ -12235,17 +12251,16 @@
</class>
<class name="CollisionShape2D" inherits="Node2D" category="Core">
<brief_description>
- Editor-only class for easy editing of shapes.
+ Node that represents collision shape data in 2D space.
</brief_description>
<description>
- Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code.
+ Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
</description>
<methods>
<method name="get_shape" qualifiers="const">
<return type="Shape2D">
</return>
<description>
- Return this shape's [Shape2D].
</description>
</method>
<method name="is_disabled" qualifiers="const">
@@ -12282,16 +12297,18 @@
<argument index="0" name="shape" type="Shape2D">
</argument>
<description>
- Set this shape's [Shape2D]. This will not appear as a node, but can be directly edited as a property.
</description>
</method>
</methods>
<members>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
+ A disabled collision shape has no effect in the world.
</member>
<member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" brief="">
+ Sets whether this collision shape should only detect collision on one side (top or bottom).
</member>
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape" brief="">
+ The actual shape owned by this collision shape.
</member>
</members>
<constants>
@@ -12956,23 +12973,23 @@
</class>
<class name="Control" inherits="CanvasItem" category="Core">
<brief_description>
- Control is the base node for all the GUI components.
+ Base node for all User Interface components.
</brief_description>
<description>
- Control is the base class Node for all the GUI components. Every GUI component inherits from it, directly or indirectly. In this way, sections of the scene tree made of contiguous control nodes, become user interfaces.
- Controls are relative to the parent position and size by using anchors and margins. This ensures that they can adapt easily in most situation to changing dialog and screen sizes. When more flexibility is desired, [Container] derived nodes can be used.
+ The base class Node for all User Interface components. Every UI node inherits from it. Any scene or portion of a scene tree composed of Control nodes is a User Interface.
+ Controls use anchors and margins to place themselves relative to their parent. They adapt automatically when their parent or the screen size changes. To build flexible UIs, use built-in [Container] nodes or create your own.
Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range.
- Input device events are first sent to the root controls via the [method Node._input], which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling [method MainLoop._input_event]. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even [method Node._unhandled_input]), the control can accept it by calling [method accept_event].
- Only one control can hold the keyboard focus (receiving keyboard events), for that the control must define the focus mode with [method set_focus_mode]. Focus is lost when another control gains it, or the current focus owner is hidden.
- It is sometimes desired for a control to ignore mouse/pointer events. This is often the case when placing other controls on top of a button, in such cases. Calling [method set_ignore_mouse] enables this function.
- Finally, controls are skinned according to a [Theme]. Setting a [Theme] on a control will propagate all the skinning down the tree. Optionally, skinning can be overridden per each control by calling the add_*_override functions, or from the editor.
+ Godot sends Input events to the root node first, via [method Node._input]. The method distributes it through the node tree and delivers the input events to the node under the mouse cursor or on focus with the keyboard. To do so, it calls [method MainLoop._input_event]. No need to enable [method Node.set_process_input] on Controls to receive input events. Call [method accept_event] to ensure no other node receives the event, not even [method Node._unhandled_input].
+ Only the one Control node in focus receives keyboard events. To do so, the Control must get the focus mode with [method set_focus_mode]. It loses focus when another Control gets it, or if the current Control in focus is hidden.
+ You'll sometimes want Controls to ignore mouse or touch events. For example, if you place an icon on top of a button. Call [method set_ignore_mouse] for that.
+ [Theme] resources change the Control's appearance. If you change the [Theme] on a parent Control node, it will propagate to all of its children. You can override parts of the theme on each Control with the add_*_override methods, like [method add_font_override]. You can also override the theme from the editor.
</description>
<methods>
<method name="_get_minimum_size" qualifiers="virtual">
<return type="Vector2">
</return>
<description>
- Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
+ Returns the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
</description>
</method>
<method name="_gui_input" qualifiers="virtual">
@@ -12987,7 +13004,7 @@
<return type="void">
</return>
<description>
- Handles the event, no other control will receive it and it will not be sent to nodes waiting on [method Node._unhandled_input] or [method Node._unhandled_key_input].
+ Marks the input event as handled. No other Control will receive it, and the input event will not propagate. Not even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input].
</description>
</method>
<method name="add_color_override">
@@ -13842,12 +13859,12 @@
<signals>
<signal name="focus_entered">
<description>
- Emitted when keyboard focus is gained.
+ Emitted when the node gains keyboard focus.
</description>
</signal>
<signal name="focus_exited">
<description>
- Emitted when the keyboard focus is lost.
+ Emitted when the node loses keyboard focus.
</description>
</signal>
<signal name="gui_input">
@@ -13858,7 +13875,7 @@
</signal>
<signal name="minimum_size_changed">
<description>
- Emitted when the minimum size of the control changed.
+ Emitted when the node's minimum size changes.
</description>
</signal>
<signal name="modal_closed">
@@ -13867,22 +13884,22 @@
</signal>
<signal name="mouse_entered">
<description>
- Emitted when the mouse enters the control area.
+ Emitted when the mouse enters the control's area.
</description>
</signal>
<signal name="mouse_exited">
<description>
- Emitted when the mouse left the control area.
+ Emitted when the mouse leaves the control's area.
</description>
</signal>
<signal name="resized">
<description>
- Emitted when the control changed size.
+ Emitted when the control changes size.
</description>
</signal>
<signal name="size_flags_changed">
<description>
- Emitted when the size flags changed.
+ Emitted when the size flags change.
</description>
</signal>
</signals>
@@ -14193,8 +14210,10 @@
</class>
<class name="CubeMesh" inherits="PrimitiveMesh" category="Core">
<brief_description>
+ Generate an axis-aligned cuboid [PrimitiveMesh].
</brief_description>
<description>
+ Generate an axis-aligned cuboid [PrimitiveMesh].
</description>
<methods>
<method name="get_size" qualifiers="const">
@@ -14256,12 +14275,16 @@
</methods>
<members>
<member name="size" type="Vector3" setter="set_size" getter="get_size" brief="">
+ Size of the cuboid mesh. Defaults to (2, 2, 2).
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief="">
+ Number of extra edge loops inserted along the z-axis. Defaults to 0.
</member>
<member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height" brief="">
+ Number of extra edge loops inserted along the y-axis. Defaults to 0.
</member>
<member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" brief="">
+ Number of extra edge loops inserted along the x-axis. Defaults to 0.
</member>
</members>
<constants>
@@ -14951,8 +14974,10 @@
</class>
<class name="CylinderMesh" inherits="PrimitiveMesh" category="Core">
<brief_description>
+ Class representing a cylindrical [PrimitiveMesh].
</brief_description>
<description>
+ Class representing a cylindrical [PrimitiveMesh].
</description>
<methods>
<method name="get_bottom_radius" qualifiers="const">
@@ -15028,14 +15053,19 @@
</methods>
<members>
<member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" brief="">
+ Bottom radius of the cylinder. Defaults to 1.0.
</member>
<member name="height" type="float" setter="set_height" getter="get_height" brief="">
+ Full height of the cylinder. Defaults to 2.0.
</member>
<member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" brief="">
+ Number of radial segments on the cylinder. Defaults to 64.
</member>
<member name="rings" type="int" setter="set_rings" getter="get_rings" brief="">
+ Number of edge rings along the height of the cylinder. Defaults to 4.
</member>
<member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius" brief="">
+ Top radius of the cylinder. Defaults to 1.0.
</member>
</members>
<constants>
@@ -19271,20 +19301,31 @@
</class>
<class name="GDScript" inherits="Script" category="Core">
<brief_description>
+ A script implemented in the GDScript programming language.
</brief_description>
<description>
+ A script implemented in the GDScript programming language. The script exends the functionality of all objects that instance it.
+ [method new] creates a new instance of the script. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<methods>
<method name="get_as_byte_code" qualifiers="const">
<return type="PoolByteArray">
</return>
<description>
+ Returns byte code for the script source code.
</description>
</method>
<method name="new" qualifiers="vararg">
<return type="Object">
</return>
<description>
+ Returns a new instance of the script.
+ For example:
+ [codeblock]
+ var MyClass = load("myclass.gd")
+ var instance = MyClass.new()
+ assert(instance.get_script() == MyClass)
+ [/codeblock]
</description>
</method>
</methods>
@@ -20483,8 +20524,10 @@
</class>
<class name="GradientTexture" inherits="Texture" category="Core">
<brief_description>
+ Gradient filled texture.
</brief_description>
<description>
+ Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [method set_width]).
</description>
<methods>
<method name="get_gradient" qualifiers="const">
@@ -20512,8 +20555,10 @@
</methods>
<members>
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient" brief="">
+ The [Gradient] that will be used to fill the texture.
</member>
<member name="width" type="int" setter="set_width" getter="get_width" brief="">
+ The number of color samples that will be obtained from the [Gradient].
</member>
</members>
<constants>
@@ -23271,6 +23316,7 @@
</class>
<class name="InputEvent" inherits="Resource" category="Core">
<brief_description>
+ Generic input event
</brief_description>
<description>
</description>
@@ -23281,24 +23327,28 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
+ Returns true if this input event matches the event passed.
</description>
</method>
<method name="as_text" qualifiers="const">
<return type="String">
</return>
<description>
+ Returns a [String] representation of the event.
</description>
</method>
<method name="get_device" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the id of the device that generated the event.
</description>
</method>
<method name="get_id" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the id of the event.
</description>
</method>
<method name="is_action" qualifiers="const">
@@ -23307,7 +23357,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Return if this input event matches a pre-defined action, no matter the type.
+ Returns true if this input event matches a pre-defined action, no matter the type.
</description>
</method>
<method name="is_action_pressed" qualifiers="const">
@@ -23316,7 +23366,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Return whether the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
+ Returns true if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
</description>
</method>
<method name="is_action_released" qualifiers="const">
@@ -23325,7 +23375,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Return whether the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
+ Returns true if the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
</description>
</method>
<method name="is_action_type" qualifiers="const">
@@ -23338,14 +23388,14 @@
<return type="bool">
</return>
<description>
- Return if this input event is an echo event (only for events of type KEY, it will return false for other types).
+ Returns true if this input event is an echo event (only for events of type KEY, it will return false for other types).
</description>
</method>
<method name="is_pressed" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
+ Returns true if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE.
</description>
</method>
<method name="set_device">
@@ -26282,10 +26332,10 @@
</class>
<class name="LightOccluder2D" inherits="Node2D" category="Core">
<brief_description>
- Occludes light cast by a Light2D, thus casting shadows.
+ Occludes light cast by a Light2D, casting shadows.
</brief_description>
<description>
- Occludes light cast by a Light2D, thus casting shadows. The LightOccluder2D must be provided with a shape (see OccluderPolygon2D) that allows the shadow to be computed. This shape affects the resulting shadow, while the shape of the representating asset shadowed does not actually affect shadows.
+ Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed.
</description>
<methods>
<method name="get_occluder_light_mask" qualifiers="const">
@@ -26323,8 +26373,10 @@
</methods>
<members>
<member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" brief="">
+ The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
</member>
<member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon" brief="">
+ The [OccluderPolygon2D] used to compute the shadow.
</member>
</members>
<constants>
@@ -26332,8 +26384,10 @@
</class>
<class name="Line2D" inherits="Node2D" category="Core">
<brief_description>
+ A 2D line.
</brief_description>
<description>
+ A line through several points in 2D space.
</description>
<methods>
<method name="add_point">
@@ -26342,6 +26396,7 @@
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
+ Add a point at the x/y position in the supplied [Vector2]
</description>
</method>
<method name="get_begin_cap_mode" qualifiers="const">
@@ -26430,6 +26485,7 @@
<argument index="0" name="i" type="int">
</argument>
<description>
+ Remove the point at index 'i' from the line.
</description>
</method>
<method name="set_begin_cap_mode">
@@ -29689,7 +29745,7 @@
<return type="void">
</return>
<description>
- Destroy this Node and its children when they are not in use.
+ Queues a node for deletion at the end of the current frame. When deleted, all of its children nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [method Object.free]. Use [method Object.is_queued_for_deletion] to know whether a node will be deleted at the end of the frame.
</description>
</method>
<method name="raise">
@@ -38041,8 +38097,10 @@
</class>
<class name="PlaneMesh" inherits="PrimitiveMesh" category="Core">
<brief_description>
+ Class representing a planar [PrimitiveMesh].
</brief_description>
<description>
+ Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness.
</description>
<methods>
<method name="get_size" qualifiers="const">
@@ -38090,10 +38148,13 @@
</methods>
<members>
<member name="size" type="Vector2" setter="set_size" getter="get_size" brief="">
+ Size of the generated plane. Defaults to (2.0, 2.0).
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief="">
+ Number of subdivision along the z-axis. Defaults to 0.
</member>
<member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" brief="">
+ Number of subdivision along the x-axis. Defaults to 0.
</member>
</members>
<constants>
@@ -39751,8 +39812,10 @@
</class>
<class name="PrimitiveMesh" inherits="Mesh" category="Core">
<brief_description>
+ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
</brief_description>
<description>
+ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
</description>
<methods>
<method name="get_material" qualifiers="const">
@@ -39772,6 +39835,7 @@
</methods>
<members>
<member name="material" type="Material" setter="set_material" getter="get_material" brief="">
+ The current [Material] of the primitive mesh.
</member>
</members>
<constants>
@@ -39779,8 +39843,10 @@
</class>
<class name="PrismMesh" inherits="PrimitiveMesh" category="Core">
<brief_description>
+ Class representing a prism-shaped [PrimitiveMesh].
</brief_description>
<description>
+ Class representing a prism-shaped [PrimitiveMesh].
</description>
<methods>
<method name="get_left_to_right" qualifiers="const">
@@ -39856,14 +39922,19 @@
</methods>
<members>
<member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" brief="">
+ Displacement of of the upper edge along the x-axis. 0.0 positions edge straight above the bottome left edge. Defaults to 0.5 (positioned on the midpoint).
</member>
<member name="size" type="Vector3" setter="set_size" getter="get_size" brief="">
+ Size of the prism. Defaults to (2.0, 2.0, 2.0).
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief="">
+ Number of added edge loops along the z-axis. Defaults to 0.
</member>
<member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height" brief="">
+ Number of added edge loops along the y-axis. Defaults to 0.
</member>
<member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" brief="">
+ Number of added edge loops along the x-axis. Defaults to 0.
</member>
</members>
<constants>
@@ -40413,8 +40484,10 @@
</class>
<class name="QuadMesh" inherits="PrimitiveMesh" category="Core">
<brief_description>
+ Class representing a square mesh.
</brief_description>
<description>
+ Class representing a square mesh with size (2,2,0). Consider using a [PlaneMesh] if you require a differently sized plane.
</description>
<methods>
</methods>
@@ -40774,11 +40847,11 @@
Query the closest object intersecting a ray.
</brief_description>
<description>
- A RayCast represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 3D space in order to find the closest object intersecting with the ray.
+ A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray.
- RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks.
+ RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks.
- Only enabled raycasts will be able to query the space and report collisions!
+ Only enabled raycasts will be able to query the space and report collisions.
RayCast calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast.
</description>
@@ -40789,7 +40862,7 @@
<argument index="0" name="node" type="Object">
</argument>
<description>
- Adds a collision exception so the ray does not report collisions with the specified [code]node[/code].
+ Adds a collision exception so the ray does not report collisions with the specified node.
</description>
</method>
<method name="add_exception_rid">
@@ -40798,20 +40871,22 @@
<argument index="0" name="rid" type="RID">
</argument>
<description>
+ Adds a collision exception so the ray does not report collisions with the specified [RID].
</description>
</method>
<method name="clear_exceptions">
<return type="void">
</return>
<description>
- Removes all collision exception for this ray.
+ Removes all collision exceptions for this ray.
</description>
</method>
<method name="force_raycast_update">
<return type="void">
</return>
<description>
- Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work.
+ Updates the collision information for the ray.
+ Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work.
</description>
</method>
<method name="get_cast_to" qualifiers="const">
@@ -40825,14 +40900,24 @@
<return type="Object">
</return>
<description>
- Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
+ Return the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
+ Example:
+ [codeblock]
+ if RayCast.is_colliding():
+ var collider = RayCast.get_collider()
+ [/codeblock]
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the collision shape of the closest object the ray is pointing to.
+ Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray.
+ Example:
+ [codeblock]
+ if RayCast.is_colliding():
+ var shape = RayCast.get_collider_shape()
+ [/codeblock]
</description>
</method>
<method name="get_collision_layer" qualifiers="const">
@@ -40846,14 +40931,14 @@
<return type="Vector3">
</return>
<description>
- Returns the normal of the intersecting object shape face containing the collision point.
+ Returns the normal of the intersecting object's shape at the collision point.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Returns collision point. This point is in [b]global[/b] coordinate system.
+ Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system.
</description>
</method>
<method name="get_type_mask" qualifiers="const">
@@ -40874,7 +40959,7 @@
<return type="bool">
</return>
<description>
- Returns whether this raycast is enabled or not.
+ Returns whether the ray is enabled or not.
</description>
</method>
<method name="remove_exception">
@@ -40883,7 +40968,7 @@
<argument index="0" name="node" type="Object">
</argument>
<description>
- Removes a collision exception so the ray does report collisions with the specified [code]node[/code].
+ Removes a collision exception so the ray does report collisions with the specified node.
</description>
</method>
<method name="remove_exception_rid">
@@ -40892,6 +40977,7 @@
<argument index="0" name="rid" type="RID">
</argument>
<description>
+ Removes a collision exception so the ray does report collisions with the specified [RID].
</description>
</method>
<method name="set_cast_to">
@@ -40900,7 +40986,7 @@
<argument index="0" name="local_point" type="Vector3">
</argument>
<description>
- Sets to which point ray should be casted. This point is in [b]local[/b] coordinate system.
+ Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code].
</description>
</method>
<method name="set_collision_layer">
@@ -40933,12 +41019,20 @@
</methods>
<members>
<member name="cast_to" type="Vector3" setter="set_cast_to" getter="get_cast_to" brief="">
+ The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
+ The RayCast's collison layer(s). Only bodies in the same collision layer(s) will be detected.
</member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief="">
+ If [code]true[/code], collisions will be reported. Default value: [code]false[/code].
</member>
<member name="type_mask" type="int" setter="set_type_mask" getter="get_type_mask" brief="">
+ Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState].
+ Example:
+ [codeblock]
+ RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY
+ [/codeblock]
</member>
</members>
<constants>
@@ -43270,38 +43364,55 @@
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief="">
+ Dampens rotational forces of the Rigid body by the 'angular_damp' rate.
</member>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" brief="">
+ The current rotational velocity of the Rigid body
</member>
<member name="axis_lock" type="int" setter="set_axis_lock" getter="get_axis_lock" brief="" enum="RigidBody.AxisLock">
+ Locks the rotational forces to a particular axis, preventing rotations on other axes.
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce" brief="">
+ Bounciness of the Rigid body.
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" brief="">
+ If true, the Rigid body will no longer calculate forces when there is no movement and will act as a static body. It will wake up when other forces are applied through other collisions or when the 'apply_impulse' method is used.
</member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" brief="">
+ If true, the Rigid body will emit signals when it collides with another Rigid body.
</member>
<member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" brief="">
+ The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
</member>
<member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection" brief="">
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
</member>
<member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" brief="">
+ If true, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction" brief="">
+ The body friction, from 0 (frictionless) to 1 (max friction).
</member>
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" brief="">
+ The 'gravity_scale' for this Rigid body will be multiplied by the global 3d gravity setting found in "Project > Project Settings > Physics > 3d". 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="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief="">
+ The linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
</member>
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" brief="">
+ The body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" brief="">
+ The body mass.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="RigidBody.Mode">
+ The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER.
</member>
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" brief="">
+ The current 'sleeping' state of the Rigid body.
</member>
<member name="weight" type="float" setter="set_weight" getter="get_weight" brief="">
+ The body weight given standard earth-weight (gravity 9.8).
</member>
</members>
<signals>
@@ -44457,17 +44568,18 @@
</class>
<class name="Script" inherits="Resource" category="Core">
<brief_description>
- Base class for scripts.
+ A class stored as a resource.
</brief_description>
<description>
- Base class for scripts. Any script that is loaded becomes one of these resources, which can then create instances.
+ A class stored as a resource. The script exends the functionality of all objects that instance it.
+ The 'new' method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<methods>
<method name="can_instance" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if this script can be instance (ie not a library).
+ Returns true if the script can be instanced.
</description>
</method>
<method name="get_node_type" qualifiers="const">
@@ -44480,7 +44592,7 @@
<return type="String">
</return>
<description>
- Return the script source code (if available).
+ Returns the script source code, or an empty string if source code is not available.
</description>
</method>
<method name="has_script_signal" qualifiers="const">
@@ -44489,13 +44601,14 @@
<argument index="0" name="signal_name" type="String">
</argument>
<description>
+ Returns true if the script, or a base class, defines a signal with the given name.
</description>
</method>
<method name="has_source_code" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the script contains source code.
+ Returns true if the script contains non-empty source code.
</description>
</method>
<method name="instance_has" qualifiers="const">
@@ -44504,21 +44617,24 @@
<argument index="0" name="base_object" type="Object">
</argument>
<description>
- Return true if a given object uses an instance of this script.
+ Returns true if 'base_object' is an instance of this script.
</description>
</method>
<method name="is_tool" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns true if the script is a tool script. A tool script can run in the editor.
</description>
</method>
<method name="reload">
<return type="int" enum="Error">
</return>
<argument index="0" name="keep_state" type="bool" default="false">
+ If true, preserve existing script instances and subclasses.
</argument>
<description>
+ Reloads the script's class implementation. Returns an error code.
</description>
</method>
<method name="set_source_code">
@@ -44527,7 +44643,7 @@
<argument index="0" name="source" type="String">
</argument>
<description>
- Set the script source code.
+ Sets the script source code. Does not reload the class implementation.
</description>
</method>
</methods>
@@ -45495,16 +45611,17 @@
</class>
<class name="Spatial" inherits="Node" category="Core">
<brief_description>
- Base class for all 3D nodes.
+ Most basic 3D game object, parent of all 3D related nodes.
</brief_description>
<description>
- Spatial is the base for every type of 3D [Node]. It contains a 3D [Transform] which can be set or get as local or global. If a Spatial [Node] has Spatial children, their transforms will be relative to the parent.
+ Most basic 3D game object, with a 3D [Transform] and visibility settings. All 3D physics nodes and sprites inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project.
</description>
<methods>
<method name="get_gizmo" qualifiers="const">
<return type="SpatialGizmo">
</return>
<description>
+ Return the SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor.
</description>
</method>
<method name="get_global_transform" qualifiers="const">
@@ -45558,6 +45675,7 @@
<return type="World">
</return>
<description>
+ Return current [World] resource this Spatial node is registered to.
</description>
</method>
<method name="global_rotate">
@@ -45568,6 +45686,7 @@
<argument index="1" name="radians" type="float">
</argument>
<description>
+ Rotate current node along normal [Vector3] by angle in radians in Global space.
</description>
</method>
<method name="global_translate">
@@ -45576,42 +45695,49 @@
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
+ Move current node by [Vector3] offset in Global space.
</description>
</method>
<method name="hide">
<return type="void">
</return>
<description>
+ Disable rendering of this node. Change Spatial Visible property to false.
</description>
</method>
<method name="is_local_transform_notification_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns whether node sends notification that its local transformation changed. Spatial will not propagate this by default.
</description>
</method>
<method name="is_set_as_toplevel" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns whether this node is set as Toplevel, ignoring its parent node transformations.
</description>
</method>
<method name="is_transform_notification_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns whether node sends notification that its transformation changed. Spatial will not propagate this by default.
</description>
</method>
<method name="is_visible" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns whether this node is set to be visible.
</description>
</method>
<method name="is_visible_in_tree" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns whether this node is visible, taking into consideration that its parents visibility.
</description>
</method>
<method name="look_at">
@@ -45622,6 +45748,7 @@
<argument index="1" name="up" type="Vector3">
</argument>
<description>
+ Rotates itself to point into direction of target position. Operations take place in global space.
</description>
</method>
<method name="look_at_from_pos">
@@ -45634,12 +45761,14 @@
<argument index="2" name="up" type="Vector3">
</argument>
<description>
+ Moves itself to specified position and then rotates itself to point into direction of target position. Operations take place in global space.
</description>
</method>
<method name="orthonormalize">
<return type="void">
</return>
<description>
+ Reset this node transformations (like scale, skew and taper) preserving its rotation and translation. Performs orthonormalization on this node [Transform3D].
</description>
</method>
<method name="rotate">
@@ -45650,6 +45779,7 @@
<argument index="1" name="radians" type="float">
</argument>
<description>
+ Rotates node in local space on given normal [Vector3] by angle in radians.
</description>
</method>
<method name="rotate_x">
@@ -45658,6 +45788,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
+ Rotates node in local space on X axis by angle in radians.
</description>
</method>
<method name="rotate_y">
@@ -45666,6 +45797,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
+ Rotates node in local space on Y axis by angle in radians.
</description>
</method>
<method name="rotate_z">
@@ -45674,6 +45806,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
+ Rotates node in local space on Z axis by angle in radians.
</description>
</method>
<method name="set_as_toplevel">
@@ -45682,6 +45815,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Makes this node ignore its parents tranformations. Node tranformations are only in global space.
</description>
</method>
<method name="set_gizmo">
@@ -45690,6 +45824,7 @@
<argument index="0" name="gizmo" type="SpatialGizmo">
</argument>
<description>
+ Set [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor.
</description>
</method>
<method name="set_global_transform">
@@ -45698,13 +45833,14 @@
<argument index="0" name="global" type="Transform">
</argument>
<description>
- Set the transform globally, relative to worldspace.
+ Set the transform globally, relative to world space.
</description>
</method>
<method name="set_identity">
<return type="void">
</return>
<description>
+ Reset all tranformations for this node. Set its [Transform3D] to identity matrix.
</description>
</method>
<method name="set_ignore_transform_notification">
@@ -45713,6 +45849,7 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
+ Set whether this node ignores notification that its transformation changed.
</description>
</method>
<method name="set_notify_local_transform">
@@ -45721,6 +45858,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Set whether this node sends notification that its local transformation changed. Spatial will not propagate this by default.
</description>
</method>
<method name="set_notify_transform">
@@ -45729,6 +45867,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
+ Set whether this node sends notification that its transformation changed. Spatial will not propagate this by default.
</description>
</method>
<method name="set_rotation">
@@ -45755,6 +45894,7 @@
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
+ Set the scale.
</description>
</method>
<method name="set_transform">
@@ -45786,6 +45926,7 @@
<return type="void">
</return>
<description>
+ Enable rendering of this node. Change Spatial Visible property to false.
</description>
</method>
<method name="to_global" qualifiers="const">
@@ -45794,6 +45935,7 @@
<argument index="0" name="local_point" type="Vector3">
</argument>
<description>
+ Tranform [Vector3] from this node local space to world space.
</description>
</method>
<method name="to_local" qualifiers="const">
@@ -45802,6 +45944,7 @@
<argument index="0" name="global_point" type="Vector3">
</argument>
<description>
+ Tranform [Vector3] from world space to this node local space.
</description>
</method>
<method name="translate">
@@ -45810,46 +45953,60 @@
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
+ Change node position by given offset [Vector3].
</description>
</method>
<method name="update_gizmo">
<return type="void">
</return>
<description>
+ Update [SpatialGizmo] of this node.
</description>
</method>
</methods>
<members>
<member name="global_transform" type="Transform" setter="set_global_transform" getter="get_global_transform" brief="">
+ World space (global) [Transform] of this node.
</member>
<member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" brief="">
+ Local euler rotation in radians of this node.
</member>
<member name="rotation_deg" type="Vector3" setter="set_rotation_deg" getter="get_rotation_deg" brief="">
+ Local euler rotation in degrees of this node.
</member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" brief="">
+ Local scale of this node.
</member>
<member name="transform" type="Transform" setter="set_transform" getter="get_transform" brief="">
+ Local space [Transform] of this node.
</member>
<member name="translation" type="Vector3" setter="set_translation" getter="get_translation" brief="">
+ Local translation of this node.
</member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" brief="">
+ Visibility of this node. Toggles if this node is rendered.
</member>
</members>
<signals>
<signal name="visibility_changed">
<description>
+ Emitted when node visibility changed.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
- Spatial nodes receive this notification with their global transform changes. This means that either the current or a parent node changed its transform.
+ Spatial nodes receive this notification when their global transform changes. This means that either the current or a parent node changed its transform.
+ In order for NOTIFICATION_TRANSFORM_CHANGED to work user first needs to ask for it, with set_notify_transform(true).
</constant>
<constant name="NOTIFICATION_ENTER_WORLD" value="41" enum="">
+ Spatial nodes receive this notification when they are registered to new [World] resource.
</constant>
<constant name="NOTIFICATION_EXIT_WORLD" value="42" enum="">
+ Spatial nodes receive this notification when they are unregistered from current [World] resource.
</constant>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43" enum="">
+ Spatial nodes receive this notification when their visibility changes.
</constant>
</constants>
</class>
@@ -46927,8 +47084,10 @@
</class>
<class name="SphereMesh" inherits="PrimitiveMesh" category="Core">
<brief_description>
+ Class representing a spherical [PrimitiveMesh].
</brief_description>
<description>
+ Class representing a spherical [PrimitiveMesh].
</description>
<methods>
<method name="get_height" qualifiers="const">
@@ -47004,14 +47163,19 @@
</methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" brief="">
+ Full height of the sphere. Defaults to 2.0.
</member>
<member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" brief="">
+ Determines whether a full sphere or a hemisphere is created. Attention: To get a regular hemisphere the height and radius of the sphere have to equal. Defaults to false.
</member>
<member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" brief="">
+ Number of radial segments on the sphere. Defaults to 64.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" brief="">
+ Radius of sphere. Defaults to 1.0.
</member>
<member name="rings" type="int" setter="set_rings" getter="get_rings" brief="">
+ Number of segments along the height of the sphere. Defaults to 32.
</member>
</members>
<constants>
@@ -48011,12 +48175,16 @@
</methods>
<members>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce" brief="">
+ The body bounciness.
</member>
<member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" brief="">
+ The constant angular velocity for the body. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation.
</member>
<member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" brief="">
+ The constant linear velocity for the body. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement.
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction" brief="">
+ The body friction, from 0 (frictionless) to 1 (full friction).
</member>
</members>
<constants>
@@ -49444,7 +49612,7 @@
- Rounded corners (individual radius for each corner)
- Shadow
About corner radius:
- Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example:
+ Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example:
[codeblock]
height = 30
corner_radius_top_left = 50
@@ -51758,10 +51926,10 @@
</class>
<class name="TextureRect" inherits="Control" category="Core">
<brief_description>
- Control Frame that draws a texture.
+ Control that draws a texture.
</brief_description>
<description>
- Control frame that simply draws an assigned texture. It can stretch or not. It's a simple way to just show an image in a UI.
+ Control that draws a texture.
</description>
<methods>
<method name="get_stretch_mode" qualifiers="const">
@@ -51809,10 +51977,13 @@
</methods>
<members>
<member name="expand" type="bool" setter="set_expand" getter="has_expand" brief="">
+ If [code]true[/code] texture will expand to fit. Default value: [code]false[/code].
</member>
<member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" brief="" enum="TextureRect.StretchMode">
+ Stretch mode of the texture. Use STRETCH_* constants as value.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
+ The [Texture] resource for the node.
</member>
</members>
<constants>
@@ -53077,10 +53248,10 @@
</class>
<class name="Timer" inherits="Node" category="Core">
<brief_description>
- A simple Timer node.
+ A countdown timer.
</brief_description>
<description>
- Timer node. This is a simple node that will emit a timeout callback when the timer runs out. It can optionally be set to loop.
+ Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one shot" mode.
</description>
<methods>
<method name="get_time_left" qualifiers="const">
@@ -53180,47 +53351,58 @@
<return type="void">
</return>
<description>
- Start the timer.
+ Start the Timer.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<description>
- Stop (cancel) the timer.
+ Stop (cancel) the Timer.
</description>
</method>
</methods>
<members>
<member name="autostart" type="bool" setter="set_autostart" getter="has_autostart" brief="">
+ If [code]true[/code], Timer will automatically start when entering the scene tree. Default value: [code]false[/code].
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" brief="">
+ If [code]true[/code], Timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code].
</member>
<member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" brief="" enum="Timer.TimerProcessMode">
+ Processing mode. Uses TIMER_PROCESS_* constants as value.
</member>
<member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" brief="">
+ Wait time in seconds.
</member>
</members>
<signals>
<signal name="timeout">
<description>
- Emitted when the time runs out.
+ Emitted when the Timer reaches 0.
</description>
</signal>
</signals>
<constants>
<constant name="TIMER_PROCESS_FIXED" value="0">
- Update the timer at fixed intervals (framerate processing).
+ Update the Timer at fixed intervals (framerate processing).
</constant>
<constant name="TIMER_PROCESS_IDLE" value="1">
- Update the timer during the idle time at each frame.
+ Update the Timer during the idle time at each frame.
</constant>
</constants>
</class>
<class name="ToolButton" inherits="Button" category="Core">
<brief_description>
+ Flat button helper class.
</brief_description>
<description>
+ This is a helper class to generate a flat [Button] (see [method Button.set_flat]), creating a ToolButton is equivalent to:
+
+ [codeblock]
+ var btn = Button.new()
+ btn.set_flat(true)
+ [/codeblock]
</description>
<methods>
</methods>
@@ -53425,10 +53607,10 @@
</class>
<class name="Transform" category="Built-In Types">
<brief_description>
- 3D Transformation.
+ 3D Transformation. 3x4 matrix.
</brief_description>
<description>
- Transform is used to store translation, rotation and scaling transformations. It consists of a Basis "basis" and Vector3 "origin". Transform is used to represent transformations of objects in space, and as such, determine their position, orientation and scale. It is similar to a 3x4 matrix.
+ Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [Basis] "basis" and an [Vector3] "origin". It is similar to a 3x4 matrix.
</description>
<methods>
<method name="Transform">
@@ -53443,7 +53625,7 @@
<argument index="3" name="origin" type="Vector3">
</argument>
<description>
- Construct the Transform from four Vector3. Each axis corresponds to local basis vectors (some of which may be scaled).
+ Construct the Transform from four [Vector3]. Each axis corresponds to local basis vectors (some of which may be scaled).
</description>
</method>
<method name="Transform">
@@ -53454,7 +53636,7 @@
<argument index="1" name="origin" type="Vector3">
</argument>
<description>
- Construct the Transform from a Basis and Vector3.
+ Construct the Transform from a [Basis] and [Vector3].
</description>
</method>
<method name="Transform">
@@ -53463,7 +53645,7 @@
<argument index="0" name="from" type="Transform2D">
</argument>
<description>
- Construct the Transform from a Transform2D.
+ Construct the Transform from a [Transform2D].
</description>
</method>
<method name="Transform">
@@ -53472,7 +53654,7 @@
<argument index="0" name="from" type="Quat">
</argument>
<description>
- Construct the Transform from a Quat. The origin will be Vector3(0, 0, 0).
+ Construct the Transform from a [Quat]. The origin will be Vector3(0, 0, 0).
</description>
</method>
<method name="Transform">
@@ -53481,7 +53663,7 @@
<argument index="0" name="from" type="Basis">
</argument>
<description>
- Construct the Transform from a Basis. The origin will be Vector3(0, 0, 0).
+ Construct the Transform from a [Basis]. The origin will be Vector3(0, 0, 0).
</description>
</method>
<method name="affine_inverse">
@@ -53499,13 +53681,14 @@
<argument index="1" name="weight" type="float">
</argument>
<description>
+ Interpolate to other Transform by weight amount (0-1).
</description>
</method>
<method name="inverse">
<return type="Transform">
</return>
<description>
- Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling).
+ 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).
</description>
</method>
<method name="looking_at">
@@ -53552,7 +53735,7 @@
<argument index="0" name="ofs" type="Vector3">
</argument>
<description>
- Translate the transform by the specified displacement.
+ Translate the transform by the specified offset.
</description>
</method>
<method name="xform">
@@ -53576,10 +53759,10 @@
</methods>
<members>
<member name="basis" type="Basis" setter="" getter="" brief="">
- The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system travelling with the object.
+ The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
</member>
<member name="origin" type="Vector3" setter="" getter="" brief="">
- The origin of the transform. Which is the translation offset.
+ The translation offset of the transform.
</member>
</members>
<constants>
@@ -53587,10 +53770,10 @@
</class>
<class name="Transform2D" category="Built-In Types">
<brief_description>
- 3x2 Matrix for 2D transforms.
+ 2D Transformation. 3x2 matrix.
</brief_description>
<description>
- 3x2 Matrix for 2D transforms.
+ Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a two [Vector2] x, y and [Vector2] "origin". It is similar to a 3x2 matrix.
</description>
<methods>
<method name="Transform2D">
@@ -53599,6 +53782,7 @@
<argument index="0" name="from" type="Transform">
</argument>
<description>
+ Constructs the [Transform2D] from a 3D [Transform].
</description>
</method>
<method name="Transform2D">
@@ -53611,6 +53795,7 @@
<argument index="2" name="origin" type="Vector2">
</argument>
<description>
+ Constructs the [Transform2D] from 3 [Vector2] consisting of rows x, y and origin.
</description>
</method>
<method name="Transform2D">
@@ -53621,13 +53806,14 @@
<argument index="1" name="pos" type="Vector2">
</argument>
<description>
+ Constructs the [Transform2D] from rotation angle in radians and position [Vector2].
</description>
</method>
<method name="affine_inverse">
<return type="Transform2D">
</return>
<description>
- Return the inverse of the matrix.
+ Returns the inverse of the matrix.
</description>
</method>
<method name="basis_xform">
@@ -53636,6 +53822,7 @@
<argument index="0" name="v" type="var">
</argument>
<description>
+ Transforms the given vector "v" by this transform basis (no translation).
</description>
</method>
<method name="basis_xform_inv">
@@ -53644,12 +53831,14 @@
<argument index="0" name="v" type="var">
</argument>
<description>
+ Inverse-transforms vector "v" by this transform basis (no translation).
</description>
</method>
<method name="get_origin">
<return type="Vector2">
</return>
<description>
+ Return the origin [Vector2] (translation).
</description>
</method>
<method name="get_rotation">
@@ -53663,6 +53852,7 @@
<return type="Vector2">
</return>
<description>
+ Return the scale.
</description>
</method>
<method name="interpolate_with">
@@ -53673,18 +53863,21 @@
<argument index="1" name="weight" type="float">
</argument>
<description>
+ Interpolate to other Transform2D by weight amount (0-1).
</description>
</method>
<method name="inverse">
<return type="Transform2D">
</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).
</description>
</method>
<method name="orthonormalized">
<return type="Transform2D">
</return>
<description>
+ Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
</description>
</method>
<method name="rotated">
@@ -53693,6 +53886,7 @@
<argument index="0" name="phi" type="float">
</argument>
<description>
+ Rotate the transform by phi.
</description>
</method>
<method name="scaled">
@@ -53701,6 +53895,7 @@
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
+ Scale the transform by the specified 2D scaling factors.
</description>
</method>
<method name="translated">
@@ -53709,6 +53904,7 @@
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
+ Translate the transform by the specified offset.
</description>
</method>
<method name="xform">
@@ -53717,6 +53913,7 @@
<argument index="0" name="v" type="var">
</argument>
<description>
+ Transforms the given vector "v" by this transform.
</description>
</method>
<method name="xform_inv">
@@ -53725,15 +53922,19 @@
<argument index="0" name="v" type="var">
</argument>
<description>
+ Inverse-transforms the given vector "v" by this transform.
</description>
</method>
</methods>
<members>
<member name="origin" type="Vector2" setter="" getter="" brief="">
+ The translation offset of the transform.
</member>
<member name="x" type="Vector2" setter="" getter="" brief="">
+ The X axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
</member>
<member name="y" type="Vector2" setter="" getter="" brief="">
+ The Y axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
</member>
</members>
<constants>
@@ -55606,8 +55807,10 @@
</class>
<class name="Variant" category="Core">
<brief_description>
+ The most important data type in Godot.
</brief_description>
<description>
+ A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time, instead they are used mainly for communication, editing, serialization and moving data around.
</description>
<methods>
</methods>