diff --git a/classes/class_area.rst b/classes/class_area.rst index d982a1cd3..c1d66924f 100644 --- a/classes/class_area.rst +++ b/classes/class_area.rst @@ -103,7 +103,7 @@ Emitted when another area exits. - **area_shape_entered** **(** :ref:`int` area_id, :ref:`Area` area, :ref:`int` area_shape, :ref:`int` self_shape **)** -Emitted when another area enters, reporting which areas overlapped. +Emitted when another area enters, reporting which areas overlapped. ``shape_owner_get_owner(shape_find_owner(shape))`` returns the parent object of the owner of the ``shape``. ---- diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 20c581484..cc031378c 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -95,7 +95,7 @@ Emitted when another area exits. - **area_shape_entered** **(** :ref:`int` area_id, :ref:`Area2D` area, :ref:`int` area_shape, :ref:`int` self_shape **)** -Emitted when another area enters, reporting which shapes overlapped. +Emitted when another area enters, reporting which shapes overlapped. ``shape_owner_get_owner(shape_find_owner(shape))`` returns the parent object of the owner of the ``shape``. ---- diff --git a/classes/class_array.rst b/classes/class_array.rst index 3a672f752..d61fddcd3 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -172,7 +172,7 @@ Appends an element at the end of the array (alias of :ref:`push_back` **back** **(** **)** -Returns the last element of the array if the array is not empty. +Returns the last element of the array, or ``null`` if the array is empty. ---- @@ -258,7 +258,7 @@ Searches the array in reverse order for a value and returns its index or -1 if n - :ref:`Variant` **front** **(** **)** -Returns the first element of the array if the array is not empty. +Returns the first element of the array, or ``null`` if the array is empty. ---- @@ -321,7 +321,7 @@ Returns the minimum value contained in the array if all elements are of comparab - :ref:`Variant` **pop_back** **(** **)** -Removes the last element of the array. +Removes and returns the last element of the array. Returns ``null`` if the array is empty. ---- @@ -329,7 +329,7 @@ Removes the last element of the array. - :ref:`Variant` **pop_front** **(** **)** -Removes the first element of the array. +Removes and returns the first element of the array. Returns ``null`` if the array is empty. ---- diff --git a/classes/class_basis.rst b/classes/class_basis.rst index c4de7c3da..a18d77be3 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -85,13 +85,13 @@ Constants .. _class_Basis_constant_FLIP_Z: -- **IDENTITY** = **Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )** +- **IDENTITY** = **Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )** --- The identity basis. This is identical to calling ``Basis()`` without any parameters. This constant can be used to make your code clearer. -- **FLIP_X** = **Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )** +- **FLIP_X** = **Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )** --- The basis that will flip something along the X axis when used in a transformation. -- **FLIP_Y** = **Basis( 1, 0, 0, 0, -1, 0, 0, 0, 1 )** +- **FLIP_Y** = **Basis( 1, 0, 0, 0, -1, 0, 0, 0, 1 )** --- The basis that will flip something along the Y axis when used in a transformation. -- **FLIP_Z** = **Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1 )** +- **FLIP_Z** = **Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1 )** --- The basis that will flip something along the Z axis when used in a transformation. Description ----------- @@ -183,7 +183,7 @@ Returns the determinant of the matrix. - :ref:`Vector3` **get_euler** **(** **)** -Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). +Returns the basis's rotation in the form of Euler angles (in the YXZ convention: first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). See :ref:`get_rotation_quat` if you need a quaternion instead. ---- @@ -191,7 +191,7 @@ Assuming that the matrix is a proper rotation matrix (orthonormal matrix with de - :ref:`int` **get_orthogonal_index** **(** **)** -This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code. +This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to the Godot source code. ---- @@ -199,6 +199,8 @@ This function considers a discretization of rotations into 24 points on unit sph - :ref:`Quat` **get_rotation_quat** **(** **)** +Returns the basis's rotation in the form of a quaternion. See :ref:`get_euler` if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles. + ---- .. _class_Basis_method_get_scale: diff --git a/classes/class_bitmapfont.rst b/classes/class_bitmapfont.rst index 6aa3a6f78..b6c71f218 100644 --- a/classes/class_bitmapfont.rst +++ b/classes/class_bitmapfont.rst @@ -16,7 +16,9 @@ BitmapFont Brief Description ----------------- -Renders text using ``*.fnt`` fonts. +Renders text using fonts under the `BMFont `_ format. + +Handles files with the ``.fnt`` extension Properties ---------- diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index 36b0a3c18..c8ad20266 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -125,6 +125,29 @@ A node with the ability to send HTTP requests. Uses :ref:`HTTPClient` position **)** -Adds a vertex with the currently set color/uv/etc. +Adds a vertex in local coordinate space with the currently set color/uv/etc. ---- diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index c2a8a32bb..bed78952a 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -83,6 +83,8 @@ Property Descriptions The event's device ID. +**Note:** This device ID will always be ``-1`` for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input. + Method Descriptions ------------------- diff --git a/classes/class_kinematiccollision.rst b/classes/class_kinematiccollision.rst index 81395e53e..fbd184e9e 100644 --- a/classes/class_kinematiccollision.rst +++ b/classes/class_kinematiccollision.rst @@ -77,7 +77,7 @@ The colliding body. | *Getter* | get_collider_id() | +-----------+-------------------+ -The colliding body's unique :ref:`RID`. +The colliding body's unique instance ID. See :ref:`Object.get_instance_id`. ---- diff --git a/classes/class_kinematiccollision2d.rst b/classes/class_kinematiccollision2d.rst index 773da61bd..1fdfdf6eb 100644 --- a/classes/class_kinematiccollision2d.rst +++ b/classes/class_kinematiccollision2d.rst @@ -77,7 +77,7 @@ The colliding body. | *Getter* | get_collider_id() | +-----------+-------------------+ -The colliding body's unique :ref:`RID`. +The colliding body's unique instance ID. See :ref:`Object.get_instance_id`. ---- diff --git a/classes/class_light2d.rst b/classes/class_light2d.rst index 0bda06508..3283a1442 100644 --- a/classes/class_light2d.rst +++ b/classes/class_light2d.rst @@ -433,7 +433,7 @@ Smooth shadow gradient length. | *Getter* | get_item_shadow_cull_mask() | +-----------+----------------------------------+ -The shadow mask. Used with :ref:`LightOccluder2D` to cast shadows. Only occluders with a matching shadow mask will cast shadows. +The shadow mask. Used with :ref:`LightOccluder2D` to cast shadows. Only occluders with a matching light mask will cast shadows. ---- diff --git a/classes/class_node.rst b/classes/class_node.rst index 464334e9b..730bcbe23 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -292,6 +292,8 @@ enum **DuplicateFlags**: - **DUPLICATE_USE_INSTANCING** = **8** --- Duplicate using instancing. +An instance stays linked to the original so when the original changes, the instance changes too. + Constants --------- @@ -572,7 +574,7 @@ Pause mode. How the node will behave if the :ref:`SceneTree` is | *Getter* | get_process_priority() | +-----------+-----------------------------+ -The node's priority in the execution order of the enabled processing callbacks (i.e. :ref:`NOTIFICATION_PROCESS`, :ref:`NOTIFICATION_PHYSICS_PROCESS` and their internal counterparts). Nodes with a higher process priority will have their processing callbacks executed first. +The node's priority in the execution order of the enabled processing callbacks (i.e. :ref:`NOTIFICATION_PROCESS`, :ref:`NOTIFICATION_PHYSICS_PROCESS` and their internal counterparts). Nodes whose process priority value is *lower* will have their processing callbacks executed first. Method Descriptions ------------------- diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index fd9f0f386..313a85db0 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -18,7 +18,7 @@ Node2D Brief Description ----------------- -A 2D game object, parent of all 2D-related nodes. Has a position, rotation, scale and Z index. +A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. Properties ---------- @@ -79,7 +79,7 @@ Methods Description ----------- -A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order. +A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order. Tutorials --------- diff --git a/classes/class_object.rst b/classes/class_object.rst index 75df20ca8..447daccd3 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -171,6 +171,14 @@ Some classes that extend Object add memory management. This is the case of :ref: Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list` and handled in :ref:`_get` and :ref:`_set`. However, scripting languages and C++ have simpler means to export them. +Property membership can be tested directly in GDScript using ``in``: + +:: + + var n = Node2D.new() + print("position" in n) # Prints "True". + print("other_property" in n) # Prints "False". + Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See :ref:`_notification`. Method Descriptions diff --git a/classes/class_os.rst b/classes/class_os.rst index 94487ec57..07959c9a8 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -515,7 +515,7 @@ The current screen index (starting from 0). | *Getter* | get_exit_code() | +-----------+----------------------+ -The exit code passed to the OS when the main loop exits. +The exit code passed to the OS when the main loop exits. By convention, an exit code of ``0`` indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive). ---- diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 47f7dfe58..7d2bb8ccd 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -350,6 +350,8 @@ If ``true``, the label uses BBCode formatting. The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. +**Note:** It is unadvised to use ``+=`` operator with ``bbcode_text`` (e.g. ``bbcode_text += "some string"``) as it replaces the whole text and can cause slowdowns. Use :ref:`append_bbcode` for adding text instead. + ---- .. _class_RichTextLabel_property_custom_effects: diff --git a/classes/class_vehiclewheel.rst b/classes/class_vehiclewheel.rst index b059e59f0..183104065 100644 --- a/classes/class_vehiclewheel.rst +++ b/classes/class_vehiclewheel.rst @@ -296,7 +296,7 @@ This is the distance in meters the wheel is lowered from its origin point. Don't | *Getter* | get_roll_influence() | +-----------+---------------------------+ -This value affects the roll of your vehicle. If set to 0.0 for all wheels, your vehicle will be prone to rolling over, while a value of 1.0 will resist body roll. +This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll. Method Descriptions -------------------