summaryrefslogtreecommitdiff
path: root/doc/base
diff options
context:
space:
mode:
Diffstat (limited to 'doc/base')
-rw-r--r--doc/base/classes.xml617
1 files changed, 469 insertions, 148 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 7776bb1ce5..90ca2e5b79 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -5083,10 +5083,10 @@
</class>
<class name="Area2D" inherits="CollisionObject2D" category="Core">
<brief_description>
- General purpose area detection and influence for 2D physics.
+ 2D area that detects nodes that enter or exit it. Can override 2D physics properties within range.
</brief_description>
<description>
- General purpose area detection for 2D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
+ 2D area that detects nodes that enter or exit it. Change the 'space_override' property SPACE_OVERRIDE_* to override physics parameters for nodes like [Rigidbody2D]. E.g. gravity, damping... See [CollisionObject2D] for usage.
</description>
<methods>
<method name="get_angular_damp" qualifiers="const">
@@ -5115,14 +5115,14 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the layer mask.
+ Return an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer.
</description>
</method>
<method name="get_collision_mask" qualifiers="const">
<return type="int">
</return>
<description>
- Return the physics layers this area can scan for collisions.
+ Return the physics layers this area will scan to determine collisions.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
@@ -5131,7 +5131,7 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
- Return an individual bit on the collision mask.
+ Return an individual bit on the collision mask. Describes whether this area will collide with others on the given layer.
</description>
</method>
<method name="get_gravity" qualifiers="const">
@@ -5166,14 +5166,14 @@
<return type="Array">
</return>
<description>
- Return a list of the areas that are totally or partially inside this area.
+ Returns a list of the [Area2D]s that intersect with this area.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Array">
</return>
<description>
- Return a list of the bodies ([PhysicsBody2D]) that are totally or partially inside this area.
+ Return a list of the [PhysicsBody2D]s that intersect with this area.
</description>
</method>
<method name="get_priority" qualifiers="const">
@@ -5395,33 +5395,50 @@
</method>
</methods>
<members>
- <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief="">
+ <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief="rate of spin loss">
+ The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'.
</member>
- <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" brief="">
+ <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" brief="name of audio bus">
+ The name of the Area2D's audio bus.
</member>
- <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" brief="">
+ <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" brief="Whether to override audio bus">
+ If [code]true[/code], overrides the default audio bus with the Area2D's. Defaults to [code]false[/code].
</member>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
+ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="others-collide-with-this layers">
+ The physics layer this Area2D is in.
+ Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans.
</member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="">
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="this-collides-with-others layers">
+ The physics layers this Area2D scans to determine collision detections.
</member>
- <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" brief="">
+ <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" brief="internal gravity intensity">
+ The gravity intensity within the Area2D (ranges -1024 to 1024). This is useful to alter the force of gravity without altering its direction.
+ This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
</member>
- <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" brief="">
+ <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" brief="gravity drop rate">
+ The falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
</member>
- <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" brief="">
+ <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" brief="is gravity a point?">
+ If [code]true[/code], calculates gravity from a particular point during a space override (see [method set_space_override_mode]). If a point, [Vector2] position is set with [method set_gravity_vector]. Defaults to [code]false[/code].
</member>
- <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" brief="">
+ <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" brief="gravity non-normalized vector or center-point">
+ The gravitational direction/strength as a vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
</member>
- <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief="">
+ <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief="rate of movement loss">
+ The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'.
</member>
- <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" brief="">
+ <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" brief="others cannot detect this?">
+ If [code]true[/code], other monitoring areas can detect this Area2D (is it undetectable at the moment?). Defaults to [code]true[/code].
</member>
- <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief="">
+ <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief="this cannot detect others?">
+ If [code]true[/code], this detects bodies/areas entering/exiting it (can it detect others at the moment?). Defaults to [code]true[/code].
</member>
- <member name="priority" type="float" setter="set_priority" getter="get_priority" brief="">
+ <member name="priority" type="float" setter="set_priority" getter="get_priority" brief="(high) process before others (low)">
+ The processing order for this priority. Ranges from 0 to 128. Defaults to 0. Higher priorities are processed first.
</member>
- <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="" enum="Area2D.SpaceOverride">
+ <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="how to override gravity/damping" enum="Area2D.SpaceOverride">
+ How to override gravity and damping calculations within this Area2D, if at all. Consult the SPACE_OVERRIDE_* constants for available options.
</member>
</members>
<signals>
@@ -5507,6 +5524,11 @@
</signal>
</signals>
<constants>
+ <constant name="SPACE_OVERRIDE_DISABLED" value="0" enum="Area2D.SpaceOverride">This area does not affect gravity/damp. These are areas that exist only to detect collisions and objects entering or exiting them.</constant>
+ <constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="Area2D.SpaceOverride">This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.</constant>
+ <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="Area2D.SpaceOverride">This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.</constant>
+ <constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="Area2D.SpaceOverride">This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.</constant>
+ <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="Area2D.SpaceOverride">This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.</constant>
</constants>
</class>
<class name="Array" category="Built-In Types">
@@ -9025,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">
@@ -9035,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">
@@ -9043,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">
@@ -9051,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">
@@ -9073,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">
@@ -9083,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>
@@ -9261,6 +9292,7 @@
<return type="String">
</return>
<description>
+ Returns the name of the bone node attached to.
</description>
</method>
<method name="set_bone_name">
@@ -9269,6 +9301,7 @@
<argument index="0" name="bone_name" type="String">
</argument>
<description>
+ Changes the name of the bone node
</description>
</method>
</methods>
@@ -9370,35 +9403,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">
@@ -9407,7 +9435,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">
@@ -9416,7 +9443,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">
@@ -9425,7 +9451,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">
@@ -9434,7 +9459,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">
@@ -9443,20 +9467,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>
@@ -9464,7 +9492,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.
@@ -11033,8 +11061,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">
@@ -11096,12 +11126,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>
@@ -12155,8 +12189,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">
@@ -12175,6 +12211,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">
@@ -12183,6 +12220,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">
@@ -12204,8 +12242,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>
@@ -12213,17 +12253,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">
@@ -12260,16 +12299,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>
@@ -12277,10 +12318,10 @@
</class>
<class name="Color" category="Built-In Types">
<brief_description>
- Color in RGBA format.
+ Color in RGBA format with some support for ARGB format.
</brief_description>
<description>
- A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values &gt; 1.
+ A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values &gt; 1.
</description>
<methods>
<method name="Color">
@@ -12295,7 +12336,10 @@
<argument index="3" name="a" type="float">
</argument>
<description>
- Construct the color from an RGBA profile.
+ Constructs a color from an RGBA profile using values between 0 and 1 (float).
+ [codeblock]
+ var c = Color(0.2, 1.0, .7, .8) # a color of an RGBA(51, 255, 178, 204)
+ [/codeblock]
</description>
</method>
<method name="Color">
@@ -12308,7 +12352,10 @@
<argument index="2" name="b" type="float">
</argument>
<description>
- Construct the color from an RGBA profile.
+ Constructs a color from an RGB profile using values between 0 and 1 (float). Alpha will always be 1.
+ [codeblock]
+ var c = Color(0.2, 1.0, .7) # a color of an RGBA(51, 255, 178, 255)
+ [/codeblock]
</description>
</method>
<method name="Color">
@@ -12317,7 +12364,10 @@
<argument index="0" name="from" type="int">
</argument>
<description>
- Construct the color from an RGBA profile.
+ Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile).
+ [codeblock]
+ var c = Color(274) # a color of an RGBA(0, 0, 1, 18)
+ [/codeblock]
</description>
</method>
<method name="Color">
@@ -12326,7 +12376,19 @@
<argument index="0" name="from" type="String">
</argument>
<description>
- Construct the color from an RGBA profile.
+ Constructs a color from an HTML hexadecimal color string in ARGB or RGB format.
+ The following string formats are supported:
+ [code]"#ff00ff00"[/code] - ARGB format with '#'
+ [code]"ff00ff00"[/code] - ARGB format
+ [code]"#ff00ff"[/code] - RGB format with '#'
+ [code]"ff00ff"[/code] - RGB format
+ [codeblock]
+ # The following code creates the same color of an RGBA(178, 217, 10, 255)
+ var c1 = Color("#ffb2d90a") # ARGB format with '#'
+ var c2 = Color("ffb2d90a") # ARGB format
+ var c3 = Color("#b2d90a") # RGB format with '#'
+ var c4 = Color("b2d90a") # RGB format
+ [/codeblock]
</description>
</method>
<method name="blend">
@@ -12335,28 +12397,46 @@
<argument index="0" name="over" type="Color">
</argument>
<description>
- Return a new color blended with anothor one.
+ Returns a new color resulting from blending this color over another color. If the color is opaque, the result would also be opaque. The other color could then take a range of values with different alpha values.
+ [codeblock]
+ var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50%
+ var fg = Color(1.0, 0.0, 0.0, .5) # Red with alpha of 50%
+ var blendedColor = bg.blend(fg) # Brown with alpha of 75%
+ [/codeblock]
</description>
</method>
<method name="contrasted">
<return type="Color">
</return>
<description>
- Return the most contrasting color with this one.
+ Returns the most contrasting color.
+ [codeblock]
+ var c = Color(.3, .4, .9)
+ var contrastedColor = c.contrasted() # a color of an RGBA(204, 229, 102, 255)
+ [/codeblock]
</description>
</method>
<method name="gray">
<return type="float">
</return>
<description>
- Convert the color to gray.
+ Returns the color's grayscale.
+ The gray is calculated by (r + g + b) / 3.
+ [codeblock]
+ var c = Color(0.2, 0.45, 0.82)
+ var gray = c.gray() # a value of 0.466667
+ [/codeblock]
</description>
</method>
<method name="inverted">
<return type="Color">
</return>
<description>
- Return the inverted color (1-r, 1-g, 1-b, 1-a).
+ Returns the inverted color (1-r, 1-g, 1-b, 1-a).
+ [codeblock]
+ var c = Color(.3, .4, .9)
+ var invertedColor = c.inverted() # a color of an RGBA(178, 153, 26, 255)
+ [/codeblock]
</description>
</method>
<method name="linear_interpolate">
@@ -12367,21 +12447,36 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Return the linear interpolation with another color.
+ Returns the color of the linear interpolation with another color. The value t is between 0 and 1 (float).
+ [codeblock]
+ var c1 = Color(1.0, 0.0, 0.0)
+ var c2 = Color(0.0, 1.0, 0.0)
+ var li_c = c1.linear_interpolate(c2, 0.5) # a color of an RGBA(128, 128, 0, 255)
+ [/codeblock]
</description>
</method>
<method name="to_32">
<return type="int">
</return>
<description>
- Convert the color to a 32 its integer (each byte represents a RGBA).
+ Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile).
+ [codeblock]
+ var c = Color(1, .5, .2)
+ print(str(c.to_32())) # prints 4294934323
+ [/codeblock]
+
+ [i]This is same as [method to_ARGB32] but may be changed later to support RGBA format instead[/i].
</description>
</method>
<method name="to_ARGB32">
<return type="int">
</return>
<description>
- Convert color to ARGB32, more compatible with DirectX.
+ Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). More compatible with DirectX.
+ [codeblock]
+ var c = Color(1, .5, .2)
+ print(str(c.to_32())) # prints 4294934323
+ [/codeblock]
</description>
</method>
<method name="to_html">
@@ -12390,7 +12485,13 @@
<argument index="0" name="with_alpha" type="bool" default="True">
</argument>
<description>
- Return the HTML hexadecimal color string.
+ Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]).
+ Optionally flag 'false' to not include alpha in hexadecimal string.
+ [codeblock]
+ var c = Color(1, 1, 1, .5)
+ var s1 = c.to_html() # Results "7fffffff"
+ var s2 = c.to_html(false) # Results 'ffffff'
+ [/codeblock]
</description>
</method>
</methods>
@@ -12952,23 +13053,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">
@@ -12983,7 +13084,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">
@@ -13838,12 +13939,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">
@@ -13854,7 +13955,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">
@@ -13863,22 +13964,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>
@@ -14189,8 +14290,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">
@@ -14252,12 +14355,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>
@@ -14947,8 +15054,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">
@@ -15024,14 +15133,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>
@@ -19267,20 +19381,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>
@@ -20479,8 +20604,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">
@@ -20508,8 +20635,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>
@@ -22123,7 +22252,7 @@
IP Protocol support functions.
</brief_description>
<description>
- IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded.
+ IP contains support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded.
</description>
<methods>
<method name="clear_cache">
@@ -22132,6 +22261,7 @@
<argument index="0" name="hostname" type="String" default="&quot;&quot;">
</argument>
<description>
+ Removes all of a "hostname"'s cached references. If no "hostname" is given then all cached IP addresses are removed.
</description>
</method>
<method name="erase_resolve_item">
@@ -22140,13 +22270,14 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Erase a queue ID, removing it from the queue if needed. This should be used after a queue is completed to free it and enable more queries to happen.
+ Removes a given item "id" from the queue. This should be used to free a queue after it has completed to enable more queries to happen.
</description>
</method>
- <method name="get_local_addresses" qualifiers="const">
+ <method name="get_local_addresses" qualifiers="const">
<return type="Array">
</return>
<description>
+ Returns all of the user's current IPv4 and IPv6 addresses as an array.
</description>
</method>
<method name="get_resolve_item_address" qualifiers="const">
@@ -22155,7 +22286,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Return a resolved item address, or an empty string if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]).
+ Returns a queued hostname's IP address, given its queue "id". Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]).
</description>
</method>
<method name="get_resolve_item_status" qualifiers="const">
@@ -22164,7 +22295,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Return the status of hostname queued for resolving, given its queue ID. Returned status can be any of the RESOLVER_STATUS_* enumeration.
+ Returns a queued hostname's status as a RESOLVER_STATUS_* constant, given its queue "id".
</description>
</method>
<method name="resolve_hostname">
@@ -22175,7 +22306,7 @@
<argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
</argument>
<description>
- Resolve a given hostname, blocking. Resolved hostname is returned as an IPv4 or IPv6 depending on "ip_type".
+ Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the TYPE_* constant given as "ip_type".
</description>
</method>
<method name="resolve_hostname_queue_item">
@@ -22186,7 +22317,7 @@
<argument index="1" name="ip_type" type="int" enum="IP.Type" default="3">
</argument>
<description>
- Create a queue item for resolving a given hostname to an IPv4 or IPv6 depending on "ip_type". The queue ID is returned, or RESOLVER_INVALID_ID on error.
+ Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the TYPE_* constant given as "ip_type". Returns the queue ID if successful, or RESOLVER_INVALID_ID on error.
</description>
</method>
</methods>
@@ -23267,6 +23398,7 @@
</class>
<class name="InputEvent" inherits="Resource" category="Core">
<brief_description>
+ Generic input event
</brief_description>
<description>
</description>
@@ -23277,24 +23409,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">
@@ -23303,7 +23439,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">
@@ -23312,7 +23448,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">
@@ -23321,7 +23457,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">
@@ -23334,14 +23470,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">
@@ -26278,10 +26414,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">
@@ -26319,8 +26455,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>
@@ -26328,8 +26466,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">
@@ -26338,6 +26478,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">
@@ -26426,6 +26567,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">
@@ -29685,7 +29827,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">
@@ -38037,8 +38179,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">
@@ -38086,10 +38230,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>
@@ -39747,8 +39894,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">
@@ -39768,6 +39917,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>
@@ -39775,8 +39925,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">
@@ -39852,14 +40004,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>
@@ -40409,8 +40566,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>
@@ -40770,11 +40929,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>
@@ -40785,7 +40944,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">
@@ -40794,20 +40953,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">
@@ -40821,14 +40982,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">
@@ -40842,14 +41013,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">
@@ -40870,7 +41041,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">
@@ -40879,7 +41050,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">
@@ -40888,6 +41059,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">
@@ -40896,7 +41068,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">
@@ -40929,12 +41101,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>
@@ -40945,12 +41125,9 @@
Query the closest object intersecting a ray.
</brief_description>
<description>
- A RayCast2D represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 2D space in order to find the closest object intersecting with the ray.
-
- RayCast2D 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.
-
- Only enabled raycasts will be able to query the space and report collisions!
-
+ A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 2D space in order to find the closest object along the path of the ray.
+ RayCast2D 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.
RayCast2D 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>
<methods>
@@ -40960,7 +41137,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">
@@ -40969,20 +41146,21 @@
<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">
@@ -40996,14 +41174,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.
+ Returns 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 RayCast2D.is_colliding():
+ var collider = RayCast2D.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 RayCast2D.is_colliding():
+ var shape = RayCast2D.get_collider_shape()
+ [/codeblock]
</description>
</method>
<method name="get_collision_layer" qualifiers="const">
@@ -41017,14 +41205,14 @@
<return type="Vector2">
</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="Vector2">
</return>
<description>
- Returns the collision point in which the ray intersects the closest object. 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_exclude_parent_body" qualifiers="const">
@@ -41061,7 +41249,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">
@@ -41070,6 +41258,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">
@@ -41120,14 +41309,23 @@
</methods>
<members>
<member name="cast_to" type="Vector2" 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 RayCast2D'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="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" brief="">
+ If [code]true[/code], the parent node will be excluded from collision detection. Default value: [code]true[/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>
@@ -43266,38 +43464,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>
@@ -44453,17 +44668,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">
@@ -44476,7 +44692,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">
@@ -44485,13 +44701,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">
@@ -44500,21 +44717,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">
@@ -44523,7 +44743,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>
@@ -45491,16 +45711,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">
@@ -45554,6 +45775,7 @@
<return type="World">
</return>
<description>
+ Return current [World] resource this Spatial node is registered to.
</description>
</method>
<method name="global_rotate">
@@ -45564,6 +45786,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">
@@ -45572,42 +45795,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">
@@ -45618,6 +45848,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">
@@ -45630,12 +45861,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">
@@ -45646,6 +45879,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">
@@ -45654,6 +45888,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">
@@ -45662,6 +45897,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">
@@ -45670,6 +45906,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">
@@ -45678,6 +45915,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">
@@ -45686,6 +45924,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">
@@ -45694,13 +45933,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">
@@ -45709,6 +45949,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">
@@ -45717,6 +45958,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">
@@ -45725,6 +45967,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">
@@ -45751,6 +45994,7 @@
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
+ Set the scale.
</description>
</method>
<method name="set_transform">
@@ -45782,6 +46026,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">
@@ -45790,6 +46035,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">
@@ -45798,6 +46044,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">
@@ -45806,46 +46053,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>
@@ -46923,8 +47184,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">
@@ -47000,14 +47263,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>
@@ -48007,12 +48275,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>
@@ -49440,7 +49712,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
@@ -51754,10 +52026,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">
@@ -51805,10 +52077,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>
@@ -52188,11 +52463,10 @@
</class>
<class name="TileMap" inherits="Node2D" category="Core">
<brief_description>
- Node for 2D tile-based games.
+ Node for 2D tile-based maps.
</brief_description>
<description>
- Node for 2D tile-based games. Tilemaps use a [TileSet] which contain a list of tiles (textures, their rect and a collision) and are used to create complex grid-based maps.
- To optimize drawing and culling (sort of like [GridMap]), you can specify a quadrant size, so chunks of the map will be batched together at drawing time.
+ Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps.
</description>
<methods>
<method name="clear">
@@ -52635,40 +52909,55 @@
</methods>
<members>
<member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" brief="">
+ The custom [Transform2D] to be applied to the TileMap's cells.
</member>
<member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" brief="" enum="TileMap.HalfOffset">
+ Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED.
</member>
<member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" brief="">
+ The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16.
</member>
<member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" brief="">
+ The TileMap's cell size.
</member>
<member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" brief="" enum="TileMap.TileOrigin">
+ Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT.
</member>
<member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled" brief="">
+ If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code].
</member>
<member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" brief="">
+ Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0.
</member>
<member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" brief="">
+ Friction value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 1.
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="">
+ The collision layer(s) for all colliders in the TileMap.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="">
+ The collision mask(s) for all colliders in the TileMap.
</member>
<member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" brief="">
+ If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code].
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="TileMap.Mode">
+ The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE.
</member>
<member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" brief="">
+ The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s).
</member>
<member name="tile_data" type="PoolIntArray" setter="_set_tile_data" getter="_get_tile_data" brief="">
+ A [PoolIntArray] containing
</member>
<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset" brief="">
+ The assigned [TileSet].
</member>
</members>
<signals>
<signal name="settings_changed">
<description>
- Signal indicating that a tilemap setting has changed.
+ Emitted when a tilemap setting has changed.
</description>
</signal>
</signals>
@@ -53073,10 +53362,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">
@@ -53176,47 +53465,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>
@@ -53421,10 +53721,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">
@@ -53439,7 +53739,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">
@@ -53450,7 +53750,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">
@@ -53459,7 +53759,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">
@@ -53468,7 +53768,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">
@@ -53477,7 +53777,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">
@@ -53495,13 +53795,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">
@@ -53548,7 +53849,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">
@@ -53572,10 +53873,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>
@@ -53583,10 +53884,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">
@@ -53595,6 +53896,7 @@
<argument index="0" name="from" type="Transform">
</argument>
<description>
+ Constructs the [Transform2D] from a 3D [Transform].
</description>
</method>
<method name="Transform2D">
@@ -53607,6 +53909,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">
@@ -53617,13 +53920,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">
@@ -53632,6 +53936,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">
@@ -53640,12 +53945,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">
@@ -53659,6 +53966,7 @@
<return type="Vector2">
</return>
<description>
+ Return the scale.
</description>
</method>
<method name="interpolate_with">
@@ -53669,18 +53977,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">
@@ -53689,6 +54000,7 @@
<argument index="0" name="phi" type="float">
</argument>
<description>
+ Rotate the transform by phi.
</description>
</method>
<method name="scaled">
@@ -53697,6 +54009,7 @@
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
+ Scale the transform by the specified 2D scaling factors.
</description>
</method>
<method name="translated">
@@ -53705,6 +54018,7 @@
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
+ Translate the transform by the specified offset.
</description>
</method>
<method name="xform">
@@ -53713,6 +54027,7 @@
<argument index="0" name="v" type="var">
</argument>
<description>
+ Transforms the given vector "v" by this transform.
</description>
</method>
<method name="xform_inv">
@@ -53721,15 +54036,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>
@@ -55602,8 +55921,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>