summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DONORS.md2
-rw-r--r--doc/base/classes.xml204
-rw-r--r--scene/2d/area_2d.cpp8
3 files changed, 151 insertions, 63 deletions
diff --git a/DONORS.md b/DONORS.md
index 09049ede48..57902fb2fc 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -21,7 +21,7 @@ None so far, but your company could be the first! :)
## Mini sponsors
Arron Washington
- Chrisartguy
+ Chris Phyffer
Christian Uldall Pedersen
Hein-Pieter van Braam
Matthieu Huvé
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index dcea162a84..63903e89ed 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">
@@ -40829,11 +40851,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>
@@ -40844,7 +40866,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">
@@ -40853,20 +40875,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">
@@ -40880,14 +40904,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">
@@ -40901,14 +40935,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">
@@ -40929,7 +40963,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">
@@ -40938,7 +40972,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">
@@ -40947,6 +40981,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">
@@ -40955,7 +40990,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">
@@ -40988,12 +41023,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>
@@ -41004,12 +41047,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>
@@ -41019,7 +41059,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">
@@ -41028,20 +41068,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">
@@ -41055,14 +41096,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">
@@ -41076,14 +41127,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">
@@ -41120,7 +41171,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">
@@ -41129,6 +41180,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">
@@ -41179,14 +41231,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>
@@ -51887,10 +51948,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">
@@ -51938,10 +51999,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>
@@ -52321,11 +52385,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">
@@ -52768,40 +52831,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>
@@ -53206,10 +53284,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">
@@ -53309,40 +53387,44 @@
<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>
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index 1124904963..9fc6c8d23a 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -596,7 +596,7 @@ void Area2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_area_enter_tree", "id"), &Area2D::_area_enter_tree);
ClassDB::bind_method(D_METHOD("_area_exit_tree", "id"), &Area2D::_area_exit_tree);
- ClassDB::bind_method(D_METHOD("set_space_override_mode", "enable"), &Area2D::set_space_override_mode);
+ ClassDB::bind_method(D_METHOD("set_space_override_mode", "space_override_mode"), &Area2D::set_space_override_mode);
ClassDB::bind_method(D_METHOD("get_space_override_mode"), &Area2D::get_space_override_mode);
ClassDB::bind_method(D_METHOD("set_gravity_is_point", "enable"), &Area2D::set_gravity_is_point);
@@ -680,6 +680,12 @@ void Area2D::_bind_methods() {
ADD_GROUP("Audio Bus", "audio_bus_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "audio_bus_name", PROPERTY_HINT_ENUM, ""), "set_audio_bus", "get_audio_bus");
+
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_DISABLED);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_COMBINE_REPLACE);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE);
+ BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE_COMBINE);
}
Area2D::Area2D()