diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index f695dbeb8be..7bc5155ba0b 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -133,7 +133,7 @@ Mark the following property as exported (editable in the Inspector dock and save @export var string = "" @export var int_number = 5 @export var float_number: float = 5 - @export var image : Image + @export var image: Image .. rst-class:: classref-item-separator @@ -173,7 +173,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_COLOR_NO_ALPHA` to add subgroups within groups. @@ -712,7 +712,7 @@ Method Descriptions :ref:`Color` **Color8** **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8=255 **)** -Returns a :ref:`Color` constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value. +Returns a :ref:`Color` constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value. Using :ref:`Color8` instead of the standard :ref:`Color` constructor is useful when you need to match exact color values in an :ref:`Image`. :: @@ -720,6 +720,8 @@ Returns a :ref:`Color` constructed from red (``r8``), green (``g8`` var dark_blue = Color8(0, 0, 51) # Same as Color(0, 0, 0.2). var my_color = Color8(306, 255, 0, 102) # Same as Color(1.2, 1, 0, 0.4). +\ **Note:** Due to the lower precision of :ref:`Color8` compared to the standard :ref:`Color` constructor, a color created with :ref:`Color8` will generally not be equal to the same color created with the standard :ref:`Color` constructor. Use :ref:`Color.is_equal_approx` for comparisons to avoid issues with floating-point precision error. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 87e5bfa09fe..b13e5f163e9 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -3758,7 +3758,7 @@ The property is shown in the :ref:`EditorInspector` (defa :ref:`PropertyUsageFlags` **PROPERTY_USAGE_INTERNAL** = ``8`` - +The property is excluded from the class reference. .. _class_@GlobalScope_constant_PROPERTY_USAGE_CHECKABLE: @@ -5904,7 +5904,7 @@ Linearly interpolates between two values by the factor defined in ``weight``. To :: - lerp(0, 4, 0.75) # Returns 3.0 + lerpf(0, 4, 0.75) # Returns 3.0 See also :ref:`inverse_lerp` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. @@ -5939,9 +5939,9 @@ Converts from linear energy to decibels (audio). This can be used to implement v :ref:`float` **log** **(** :ref:`float` x **)** -Returns the natural logarithm of ``x``. This is the amount of time needed to reach a certain level of continuous growth. +Returns the `natural logarithm `__ of ``x`` (base `[i]e[/i] `__, with *e* being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth. -\ **Note:** This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. +\ **Note:** This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. To use base 10 logarithm, use ``log(x) / log(10)``. :: @@ -6208,25 +6208,33 @@ Converts one or more arguments of any type to string in the best way possible an void **print_rich** **(** ... **)** |vararg| -Converts one or more arguments of any type to string in the best way possible and prints them to the console. The following BBCode tags are supported: b, i, u, s, indent, code, url, center, right, color, bgcolor, fgcolor. Color tags only support named colors such as ``red``, *not* hexadecimal color codes. Unsupported tags will be left as-is in standard output. +Converts one or more arguments of any type to string in the best way possible and prints them to the console. + +The following BBCode tags are supported: ``b``, ``i``, ``u``, ``s``, ``indent``, ``code``, ``url``, ``center``, ``right``, ``color``, ``bgcolor``, ``fgcolor``. -When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Displaying ANSI escape codes is currently only supported on Linux and macOS. Support for ANSI escape codes may vary across terminal emulators, especially for italic and strikethrough. +Color tags only support the following named colors: ``black``, ``red``, ``green``, ``yellow``, ``blue``, ``magenta``, ``pink``, ``purple``, ``cyan``, ``white``, ``orange``, ``gray``. Hexadecimal color codes are not supported. + +URL tags only support URLs wrapped by an URL tag, not URLs with a different title. + +When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Support for ANSI escape codes varies across terminal emulators, especially for italic and strikethrough. In standard output, ``code`` is represented with faint text but without any font change. Unsupported tags are left as-is in standard output. .. tabs:: .. code-tab:: gdscript - print_rich("[code][b]Hello world![/b][/code]") # Prints out: [b]Hello world![/b] + print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font .. code-tab:: csharp - GD.PrintRich("[code][b]Hello world![/b][/code]"); // Prints out: [b]Hello world![/b] + GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font \ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. +\ **Note:** On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output. + .. rst-class:: classref-item-separator ---- @@ -6735,9 +6743,9 @@ Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` :: - sign(-6.5) # Returns -1.0 - sign(0.0) # Returns 0.0 - sign(6.5) # Returns 1.0 + signf(-6.5) # Returns -1.0 + signf(0.0) # Returns 0.0 + signf(6.5) # Returns 1.0 .. rst-class:: classref-item-separator @@ -6753,9 +6761,9 @@ Returns ``-1`` if ``x`` is negative, ``1`` if ``x`` is positive, and ``0`` if if :: - sign(-6) # Returns -1 - sign(0) # Returns 0 - sign(6) # Returns 1 + signi(-6) # Returns -1 + signi(0) # Returns 0 + signi(6) # Returns 1 .. rst-class:: classref-item-separator @@ -6859,8 +6867,8 @@ A type-safe version of :ref:`snapped`, return :: - snapped(32.0, 2.5) # Returns 32.5 - snapped(3.14159, 0.01) # Returns 3.14 + snappedf(32.0, 2.5) # Returns 32.5 + snappedf(3.14159, 0.01) # Returns 3.14 .. rst-class:: classref-item-separator @@ -6878,8 +6886,8 @@ A type-safe version of :ref:`snapped`, return :: - snapped(53, 16) # Returns 48 - snapped(4096, 100) # Returns 4100 + snappedi(53, 16) # Returns 48 + snappedi(4096, 100) # Returns 4100 .. rst-class:: classref-item-separator diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index f6746b71dcb..3dce76104d7 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -502,7 +502,7 @@ Returns ``true`` if the **AABB** is on both sides of a plane. :ref:`Variant` **intersects_ray** **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** |const| -Returns ``true`` if the given ray intersects with this **AABB**. Ray length is infinite. +Returns the point of intersection of the given ray with this **AABB** or ``null`` if there is no intersection. Ray length is infinite. .. rst-class:: classref-item-separator @@ -514,7 +514,7 @@ Returns ``true`` if the given ray intersects with this **AABB**. Ray length is i :ref:`Variant` **intersects_segment** **(** :ref:`Vector3` from, :ref:`Vector3` to **)** |const| -Returns ``true`` if the **AABB** intersects the line segment between ``from`` and ``to``. +Returns the point of intersection between ``from`` and ``to`` with this **AABB** or ``null`` if there is no intersection. .. rst-class:: classref-item-separator @@ -567,7 +567,7 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`AABB` right **)** -Returns ``true`` if the vectors are not equal. +Returns ``true`` if the AABBs are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. diff --git a/classes/class_aescontext.rst b/classes/class_aescontext.rst index 9a2f1fdc8a4..88c84a081f7 100644 --- a/classes/class_aescontext.rst +++ b/classes/class_aescontext.rst @@ -34,27 +34,27 @@ This class provides access to AES encryption/decryption of raw data. Both AES-EC var key = "My secret key!!!" # Key must be either 16 or 32 bytes. var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed. # Encrypt ECB - aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8()) - var encrypted = aes.update(data.to_utf8()) + aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer()) + var encrypted = aes.update(data.to_utf8_buffer()) aes.finish() # Decrypt ECB - aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8()) + aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer()) var decrypted = aes.update(encrypted) aes.finish() # Check ECB - assert(decrypted == data.to_utf8()) + assert(decrypted == data.to_utf8_buffer()) var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes. # Encrypt CBC - aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8(), iv.to_utf8()) - encrypted = aes.update(data.to_utf8()) + aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer()) + encrypted = aes.update(data.to_utf8_buffer()) aes.finish() # Decrypt CBC - aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8(), iv.to_utf8()) + aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer()) decrypted = aes.update(encrypted) aes.finish() # Check CBC - assert(decrypted == data.to_utf8()) + assert(decrypted == data.to_utf8_buffer()) .. code-tab:: csharp @@ -70,27 +70,27 @@ This class provides access to AES encryption/decryption of raw data. Both AES-EC string key = "My secret key!!!"; // Key must be either 16 or 32 bytes. string data = "My secret text!!"; // Data size must be multiple of 16 bytes, apply padding if needed. // Encrypt ECB - _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8()); - byte[] encrypted = _aes.Update(data.ToUtf8()); + _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer()); + byte[] encrypted = _aes.Update(data.ToUtf8Buffer()); _aes.Finish(); // Decrypt ECB - _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8()); + _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer()); byte[] decrypted = _aes.Update(encrypted); _aes.Finish(); // Check ECB - Debug.Assert(decrypted == data.ToUtf8()); + Debug.Assert(decrypted == data.ToUtf8Buffer()); string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes. // Encrypt CBC - _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8(), iv.ToUtf8()); - encrypted = _aes.Update(data.ToUtf8()); + _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer()); + encrypted = _aes.Update(data.ToUtf8Buffer()); _aes.Finish(); // Decrypt CBC - _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8(), iv.ToUtf8()); + _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer()); decrypted = _aes.Update(encrypted); _aes.Finish(); // Check CBC - Debug.Assert(decrypted == data.ToUtf8()); + Debug.Assert(decrypted == data.ToUtf8Buffer()); } } diff --git a/classes/class_animatablebody2d.rst b/classes/class_animatablebody2d.rst index 11264de808f..8d9003e0f66 100644 --- a/classes/class_animatablebody2d.rst +++ b/classes/class_animatablebody2d.rst @@ -12,7 +12,7 @@ AnimatableBody2D **Inherits:** :ref:`StaticBody2D` **<** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors. +Physics body for 2D physics which moves only by script or animation (while affecting other bodies on its path). Useful for moving platforms and doors. .. rst-class:: classref-introduction-group diff --git a/classes/class_animatablebody3d.rst b/classes/class_animatablebody3d.rst index 347d2a310aa..563e7eb7a85 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -12,7 +12,7 @@ AnimatableBody3D **Inherits:** :ref:`StaticBody3D` **<** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors. +Physics body for 3D physics which moves only by script or animation (while affecting other bodies on its path). Useful for moving platforms and doors. .. rst-class:: classref-introduction-group diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 4631df46fef..fc30973a5c6 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -308,7 +308,7 @@ Property Descriptions - void **set_assigned_animation** **(** :ref:`String` value **)** - :ref:`String` **get_assigned_animation** **(** **)** -If playing, the the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also :ref:`current_animation`. +If playing, the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also :ref:`current_animation`. .. rst-class:: classref-item-separator diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index c5408cd6e13..81fd8f82f58 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -75,7 +75,7 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`monitoring` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`priority` | ``0.0`` | + | :ref:`int` | :ref:`priority` | ``0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group @@ -551,14 +551,14 @@ If ``true``, the area detects bodies or areas entering and exiting it. .. rst-class:: classref-property -:ref:`float` **priority** = ``0.0`` +:ref:`int` **priority** = ``0`` .. rst-class:: classref-property-setget -- void **set_priority** **(** :ref:`float` value **)** -- :ref:`float` **get_priority** **(** **)** +- void **set_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_priority** **(** **)** -The area's priority. Higher priority areas are processed first. +The area's priority. Higher priority areas are processed first. The :ref:`World2D`'s physics is always processed last, after all areas. .. rst-class:: classref-section-separator diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index 346dba0d953..01b702fe1f1 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -73,7 +73,7 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`monitoring` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`priority` | ``0.0`` | + | :ref:`int` | :ref:`priority` | ``0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`reverb_bus_amount` | ``0.0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------+ @@ -563,14 +563,14 @@ If ``true``, the area detects bodies or areas entering and exiting it. .. rst-class:: classref-property -:ref:`float` **priority** = ``0.0`` +:ref:`int` **priority** = ``0`` .. rst-class:: classref-property-setget -- void **set_priority** **(** :ref:`float` value **)** -- :ref:`float` **get_priority** **(** **)** +- void **set_priority** **(** :ref:`int` value **)** +- :ref:`int` **get_priority** **(** **)** -The area's priority. Higher priority areas are processed first. +The area's priority. Higher priority areas are processed first. The :ref:`World3D`'s physics is always processed last, after all areas. .. rst-class:: classref-item-separator @@ -689,7 +689,7 @@ The magnitude of area-specific wind force. - void **set_wind_source_path** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_wind_source_path** **(** **)** -The :ref:`Node3D` which is used to specify the the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the :ref:`Node3D`'s local transform, and its origin is the origin of the :ref:`Node3D`'s local transform. +The :ref:`Node3D` which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the :ref:`Node3D`'s local transform, and its origin is the origin of the :ref:`Node3D`'s local transform. .. rst-class:: classref-section-separator diff --git a/classes/class_array.rst b/classes/class_array.rst index 101ddf12895..0d33e1730c1 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -70,8 +70,6 @@ Arrays can be concatenated using the ``+`` operator: \ **Note:** Erasing elements while iterating over arrays is **not** supported and will result in unpredictable behavior. -\ **Note:** When declaring an array with ``const``, the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using ``const`` will only prevent assigning the constant with another value after it was initialized. - .. rst-class:: classref-reftable-group Constructors @@ -873,6 +871,18 @@ See also :ref:`filter`, :ref:`reduce`. In this example every array element is checked and the first maximum value is returned: + +:: + + func _ready(): + var arr = [Vector2(0, 1), Vector2(2, 0), Vector2(1, 1), Vector2(1, 0), Vector2(0, 2)] + # In this example we compare the lengths. + print(arr.reduce(func(max, val): return val if is_length_greater(val, max) else max)) + + func is_length_greater(a, b): + return a.length() > b.length() + .. rst-class:: classref-item-separator ---- @@ -885,6 +895,8 @@ Returns the maximum value contained in the array if all elements are of comparab Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned. +See also :ref:`max` for an example of using a custom comparator. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index d08c024d86d..f88a660008a 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -250,6 +250,8 @@ Determines when the button is considered clicked, one of the :ref:`ActionMode` associated with the button. Not to be confused with node groups. +\ **Note:** The button will be configured as a radio button if a :ref:`ButtonGroup` is assigned to it. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 70f632b993c..e4582ecaa05 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -3134,7 +3134,7 @@ Repeat flags for the texture. See :ref:`TextureFilter` value **)** - :ref:`Transparency` **get_transparency** **(** **)** -If ``true``, transparency is enabled on the body. Some transparency modes will disable shadow casting. Any transparency mode other than Disabled has a greater performance impact compared to opaque rendering. See also :ref:`blend_mode`. +The material's transparency mode. Some transparency modes will disable shadow casting. Any transparency mode other than :ref:`TRANSPARENCY_DISABLED` has a greater performance impact compared to opaque rendering. See also :ref:`blend_mode`. .. rst-class:: classref-item-separator diff --git a/classes/class_button.rst b/classes/class_button.rst index 85f3a0b85fe..945e39df267 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -138,6 +138,8 @@ Theme Properties +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`h_separation` | ``2`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Font` | :ref:`font` | | @@ -209,7 +211,7 @@ When this property is enabled, text that is too large to fit the button is clipp - void **set_expand_icon** **(** :ref:`bool` value **)** - :ref:`bool` **is_expand_icon** **(** **)** -When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. +When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. See also :ref:`icon_max_width`. .. rst-class:: classref-item-separator @@ -509,6 +511,18 @@ The horizontal space between **Button**'s icon and text. Negative values will be ---- +.. _class_Button_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +The maximum allowed width of the **Button**'s icon. This limit is applied on top of the default size of the icon, or its expanded size if :ref:`expand_icon` is ``true``. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_constant_outline_size: .. rst-class:: classref-themeproperty diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst index b0f2a550171..0132e486465 100644 --- a/classes/class_buttongroup.rst +++ b/classes/class_buttongroup.rst @@ -19,7 +19,7 @@ Group of Buttons. Description ----------- -Group of :ref:`BaseButton`. The members of this group are treated like radio buttons in the sense that only one button can be pressed at the same time. +Group of :ref:`BaseButton`. The members of this group are treated like radio buttons in the sense that only one button can be pressed at the same time. Some types of buttons (such as :ref:`CheckBox`) may have a special appearance for this state. Every member of the ButtonGroup should have :ref:`BaseButton.toggle_mode` set to ``true``. diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 3465cdce834..90a9ace5560 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -196,7 +196,9 @@ Method Descriptions :ref:`Callable` **bind** **(** ... **)** |vararg| |const| -Returns a copy of this **Callable** with one or more arguments bound. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. +Returns a copy of this **Callable** with one or more arguments bound. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. See also :ref:`unbind`. + +\ **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. .. rst-class:: classref-item-separator @@ -208,7 +210,9 @@ Returns a copy of this **Callable** with one or more arguments bound. When calle :ref:`Callable` **bindv** **(** :ref:`Array` arguments **)** -Returns a copy of this **Callable** with one or more arguments bound, reading them from an array. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. +Returns a copy of this **Callable** with one or more arguments bound, reading them from an array. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. See also :ref:`unbind`. + +\ **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. .. rst-class:: classref-item-separator @@ -407,7 +411,15 @@ Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer do :ref:`Callable` **unbind** **(** :ref:`int` argcount **)** |const| -Returns a copy of this **Callable** with the arguments unbound, as defined by ``argcount``. Calling the returned **Callable** will call the method without the extra arguments that are supplied in the **Callable** on which you are calling this method. +Returns a copy of this **Callable** with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to ``argcount``. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also :ref:`bind`. + +\ **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. + +:: + + func _ready(): + foo.unbind(1).call(1, 2) # Calls foo(1). + foo.bind(3, 4).unbind(1).call(1, 2) # Calls foo(1, 3, 4), note that it does not change the arguments from bind. .. rst-class:: classref-section-separator diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 1b1e75c68d0..d8ad8a6650e 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -549,7 +549,7 @@ The rendering layers in which this **CanvasItem** responds to :ref:`Light2D` value **)** - :ref:`Material` **get_material** **(** **)** -The material applied to textures on this **CanvasItem**. +The material applied to this **CanvasItem**. .. rst-class:: classref-item-separator @@ -566,7 +566,7 @@ The material applied to textures on this **CanvasItem**. - void **set_modulate** **(** :ref:`Color` value **)** - :ref:`Color` **get_modulate** **(** **)** -The color applied to textures on this **CanvasItem**. +The color applied to this **CanvasItem**. This property does affect child **CanvasItem**\ s, unlike :ref:`self_modulate` which only affects the node itself. .. rst-class:: classref-item-separator @@ -583,7 +583,9 @@ The color applied to textures on this **CanvasItem**. - void **set_self_modulate** **(** :ref:`Color` value **)** - :ref:`Color` **get_self_modulate** **(** **)** -The color applied to textures on this **CanvasItem**. This is not inherited by children **CanvasItem**\ s. +The color applied to this **CanvasItem**. This property does **not** affect child **CanvasItem**\ s, unlike :ref:`modulate` which affects both the node itself and its children. + +\ **Note:** Internal children (e.g. sliders in :ref:`ColorPicker` or tab bar in :ref:`TabContainer`) are also not affected by this property (see ``include_internal`` parameter of :ref:`Node.get_child` and other similar methods). .. rst-class:: classref-item-separator diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index 95552413f60..69cfba3a510 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -86,6 +86,8 @@ Methods .. table:: :widths: auto + +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_floor_snap` **(** **)** | +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_floor_angle` **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| | +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -262,7 +264,7 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. -As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, so it will be able to detach from the ground when jumping. +As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap`. .. rst-class:: classref-item-separator @@ -468,6 +470,18 @@ Minimum angle (in radians) where the body is allowed to slide when it encounters Method Descriptions ------------------- +.. _class_CharacterBody2D_method_apply_floor_snap: + +.. rst-class:: classref-method + +void **apply_floor_snap** **(** **)** + +Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor` returns ``true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_CharacterBody2D_method_get_floor_angle: .. rst-class:: classref-method @@ -568,8 +582,8 @@ Returns a :ref:`KinematicCollision2D`, which contain .. code-tab:: gdscript for i in get_slide_collision_count(): - var collision = get_slide_collision(i) - print("Collided with: ", collision.collider.name) + var collision = get_slide_collision(i) + print("Collided with: ", collision.get_collider().name) .. code-tab:: csharp diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 3407fa3d76a..d1104863695 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -90,6 +90,8 @@ Methods .. table:: :widths: auto + +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_floor_snap` **(** **)** | +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_floor_angle` **(** :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| | +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -268,7 +270,7 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. -As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, so it will be able to detach from the ground when jumping. +As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap`. .. rst-class:: classref-item-separator @@ -474,6 +476,18 @@ Minimum angle (in radians) where the body is allowed to slide when it encounters Method Descriptions ------------------- +.. _class_CharacterBody3D_method_apply_floor_snap: + +.. rst-class:: classref-method + +void **apply_floor_snap** **(** **)** + +Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor` returns ``true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_CharacterBody3D_method_get_floor_angle: .. rst-class:: classref-method diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index 684800b32bc..f37d92cdd39 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -23,6 +23,8 @@ A checkbox allows the user to make a binary choice (choosing only one of two pos See also :ref:`BaseButton` which contains common properties and methods associated with this node. +\ **Note:** CheckBox changes its appearance when it's configured as a radio button. See various ``radio_*`` theme properties. To configure CheckBox to act as a radio button, use :ref:`BaseButton.button_group` and :ref:`ButtonGroup`. + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index 7372223461c..f066c8cf48a 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -12,14 +12,16 @@ CollisionPolygon2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Defines a 2D collision polygon. +Node that represents a 2D collision polygon. .. rst-class:: classref-introduction-group Description ----------- -Provides a concave or convex 2D collision polygon to a :ref:`CollisionObject2D` parent. Polygons can be drawn in the editor or specified by a list of vertices. See also :ref:`ConvexPolygonShape2D`. +Provides a 2D collision polygon to a :ref:`CollisionObject2D` parent. Polygons can be drawn in the editor or specified by a list of vertices. + +Depending on the build mode, this node effectively provides several convex shapes (by convex decomposition of the polygon) or a single concave shape made of the polygon's segments. In the editor, a **CollisionPolygon2D** can be generated from a :ref:`Sprite2D`'s outline by selecting a :ref:`Sprite2D` node, going to the **Sprite2D** menu at the top of the 2D editor viewport then choosing **Create CollisionPolygon2D Sibling**. @@ -64,7 +66,7 @@ enum **BuildMode**: :ref:`BuildMode` **BUILD_SOLIDS** = ``0`` -Collisions will include the polygon and its contained area. +Collisions will include the polygon and its contained area. In this mode the node has the same effect as several :ref:`ConvexPolygonShape2D` nodes, one for each convex shape in the convex decomposition of the polygon (but without the overhead of multiple nodes). .. _class_CollisionPolygon2D_constant_BUILD_SEGMENTS: @@ -72,7 +74,7 @@ Collisions will include the polygon and its contained area. :ref:`BuildMode` **BUILD_SEGMENTS** = ``1`` -Collisions will only include the polygon edges. +Collisions will only include the polygon edges. In this mode the node has the same effect as a single :ref:`ConcavePolygonShape2D` made of segments, with the restriction that each segment (after the first one) starts where the previous one ends, and the last one ends where the first one starts (forming a closed but hollow polygon). .. rst-class:: classref-section-separator @@ -164,7 +166,9 @@ The margin used for one-way collision (in pixels). Higher values will make the s - void **set_polygon** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_polygon** **(** **)** -The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the :ref:`PackedVector2Array`, not a reference. +The polygon's list of vertices. Each point will be connected to the next, and the final point will be connected to the first. + +\ **Warning:** The returned value is a clone of the :ref:`PackedVector2Array`, not a reference. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index 80afbc92c5d..e811559a9c0 100644 --- a/classes/class_collisionpolygon3d.rst +++ b/classes/class_collisionpolygon3d.rst @@ -12,16 +12,16 @@ CollisionPolygon3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Editor-only node for defining a collision polygon in 3D space. +Node that represents a 3D collision polygon, given by the thickening of a 2D polygon in the local XY plane along the local Z axis. .. rst-class:: classref-introduction-group Description ----------- -Allows editing a concave or convex collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates several :ref:`ConvexPolygonShape3D`\ s at run-time to represent the original polygon using convex decomposition. +Provides a 3D collision polygon to a :ref:`CollisionObject3D` parent, by thickening a 2D (convex or concave) polygon in the local XY plane along the local Z axis. The 2D polygon in the local XY plane can be drawn in the editor or specified by a list of vertices. That 2D polygon is thickened evenly in the local Z and -Z directions. -\ **Note:** Since this is an editor-only helper, properties modified during gameplay will have no effect. +This node has the same effect as several :ref:`ConvexPolygonShape3D` nodes, created by thickening the 2D convex polygons in the convex decomposition of the given 2D polygon (but without the overhead of multiple nodes). \ **Warning:** A non-uniformly scaled CollisionPolygon3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change its :ref:`polygon`'s vertices instead. @@ -63,7 +63,7 @@ Property Descriptions - void **set_depth** **(** :ref:`float` value **)** - :ref:`float` **get_depth** **(** **)** -Length that the resulting collision extends in either direction perpendicular to its polygon. +Length that the resulting collision extends in either direction perpendicular to its 2D polygon. .. rst-class:: classref-item-separator @@ -114,7 +114,7 @@ The collision margin for the generated :ref:`Shape3D`. See :ref:` - void **set_polygon** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_polygon** **(** **)** -Array of vertices which define the polygon. +Array of vertices which define the 2D polygon in the local XY plane. \ **Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the ``polygon`` member. diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 7a3edb78070..07579d5cfd4 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -19,7 +19,7 @@ Node that represents collision shape data in 2D space. Description ----------- -Editor facility for creating and editing collision shapes in 2D space. Set the :ref:`shape` property to configure the shape. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject2D.shape_owner_get_shape` to get the actual shape. +Editor facility for creating and editing collision shapes in 2D space. Set the :ref:`shape` property to configure the shape. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area2D` to give it a detection shape, or add it to a :ref:`PhysicsBody2D` to create a solid object. diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index 19398fcaaba..0802b638da7 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -19,7 +19,7 @@ Node that represents collision shape data in 3D space. Description ----------- -Editor facility for creating and editing collision shapes in 3D space. Set the :ref:`shape` property to configure the shape. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject3D.shape_owner_get_shape` to get the actual shape. +Editor facility for creating and editing collision shapes in 3D space. Set the :ref:`shape` property to configure the shape. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area3D` to give it a detection shape, or add it to a :ref:`PhysicsBody3D` to create a solid object. diff --git a/classes/class_compressedcubemap.rst b/classes/class_compressedcubemap.rst index e69c8af1bcb..a213b43b73a 100644 --- a/classes/class_compressedcubemap.rst +++ b/classes/class_compressedcubemap.rst @@ -21,14 +21,16 @@ Description A cubemap that is loaded from a ``.ccube`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedCubemap** can use one of 4 compresson methods: -- Uncompressed (uncompressed on the GPU) - - Lossless (WebP or PNG, uncompressed on the GPU) - Lossy (WebP, uncompressed on the GPU) - VRAM Compressed (compressed on the GPU) +- VRAM Uncompressed (uncompressed on the GPU) + +- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) + Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. diff --git a/classes/class_compressedcubemaparray.rst b/classes/class_compressedcubemaparray.rst index fa085b54f33..80a1c51ca7b 100644 --- a/classes/class_compressedcubemaparray.rst +++ b/classes/class_compressedcubemaparray.rst @@ -21,14 +21,16 @@ Description A cubemap array that is loaded from a ``.ccubearray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedCubemapArray** can use one of 4 compresson methods: -- Uncompressed (uncompressed on the GPU) - - Lossless (WebP or PNG, uncompressed on the GPU) - Lossy (WebP, uncompressed on the GPU) - VRAM Compressed (compressed on the GPU) +- VRAM Uncompressed (uncompressed on the GPU) + +- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) + Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. diff --git a/classes/class_compressedtexture2d.rst b/classes/class_compressedtexture2d.rst index dbbe5e594b0..9ef346709e1 100644 --- a/classes/class_compressedtexture2d.rst +++ b/classes/class_compressedtexture2d.rst @@ -21,14 +21,16 @@ Description A texture that is loaded from a ``.ctex`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedTexture2D** can use one of 4 compression methods (including a lack of any compression): -- Uncompressed (uncompressed on the GPU) - - Lossless (WebP or PNG, uncompressed on the GPU) - Lossy (WebP, uncompressed on the GPU) - VRAM Compressed (compressed on the GPU) +- VRAM Uncompressed (uncompressed on the GPU) + +- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) + Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. diff --git a/classes/class_compressedtexture2darray.rst b/classes/class_compressedtexture2darray.rst index d70e4e6b441..e4c372a3779 100644 --- a/classes/class_compressedtexture2darray.rst +++ b/classes/class_compressedtexture2darray.rst @@ -21,14 +21,16 @@ Description A texture array that is loaded from a ``.ctexarray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedTexture2DArray** can use one of 4 compresson methods: -- Uncompressed (uncompressed on the GPU) - - Lossless (WebP or PNG, uncompressed on the GPU) - Lossy (WebP, uncompressed on the GPU) - VRAM Compressed (compressed on the GPU) +- VRAM Uncompressed (uncompressed on the GPU) + +- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) + Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. diff --git a/classes/class_compressedtexturelayered.rst b/classes/class_compressedtexturelayered.rst index f95e69fce74..8e4f4244583 100644 --- a/classes/class_compressedtexturelayered.rst +++ b/classes/class_compressedtexturelayered.rst @@ -21,19 +21,7 @@ Base class for texture arrays that can optionally be compressed. Description ----------- -A texture array that is loaded from a ``.ctexarray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. :ref:`CompressedTexture2D` can use one of 4 compresson methods: - -- Uncompressed (uncompressed on the GPU) - -- Lossless (WebP or PNG, uncompressed on the GPU) - -- Lossy (WebP, uncompressed on the GPU) - -- VRAM Compressed (compressed on the GPU) - -Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. - -Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +Base class for :ref:`CompressedTexture2DArray` and :ref:`CompressedTexture3D`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also :ref:`TextureLayered`. .. rst-class:: classref-reftable-group diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index 04c3232dd09..4661fe96d1c 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -19,14 +19,20 @@ Concave polygon shape resource for 2D physics. Description ----------- -2D concave polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for :ref:`RigidBody2D` nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. +2D concave polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. -The main difference between a :ref:`ConvexPolygonShape2D` and a **ConcavePolygonShape2D** is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. +The shape consists of a collection of line segments, and as such it does not include any "inside" that the segments might be enclosing. If the segments do enclose anything, then the shape is *hollow*, as opposed to a :ref:`ConvexPolygonShape2D` which is solid. See also :ref:`CollisionPolygon2D`. -\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape2D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape2D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D` first. +Being made out of line segments, this shape is the most freely configurable single 2D shape. It can be used to form (hollow) polygons of any nature, convex or concave. + +\ **Note:** When used for collision, **ConcavePolygonShape2D** is intended to work with static :ref:`PhysicsBody2D` nodes like :ref:`StaticBody2D` and is not recommended to use with :ref:`RigidBody2D` nodes in a mode other than Static. A :ref:`CollisionPolygon2D` in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better suited for static bodies. + +\ **Warning:** The nature of this shape makes it extra prone to being tunneled through by (small) fast physics bodies. For example, consider a (small) rigid body *Ball* traveling toward a static body *Box* at high speed. If the box uses a **ConcavePolygonShape2D** consisting of four segments, then the ball might end up inside the box or tunnel all the way through the box, if it goes fast enough. This is (partly) because the ball can only collide against the individual segments of the hollow box. In interactions with rigid bodies tunneling can be avoided by enabling continuous collision detection on the rigid body. \ **Warning:** Using this shape for an :ref:`Area2D` (via a :ref:`CollisionShape2D` node) may give unexpected results: the area will only detect collisions with the segments in the **ConcavePolygonShape2D** (and not with any "inside" of the shape, for example). +\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape2D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape2D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D` first. + .. rst-class:: classref-reftable-group Properties @@ -59,7 +65,7 @@ Property Descriptions - void **set_segments** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_segments** **(** **)** -The array of points that make up the **ConcavePolygonShape2D**'s line segments. +The array of points that make up the **ConcavePolygonShape2D**'s line segments. The array (of length divisible by two) is naturally divided into pairs (one pair for each segment); each pair consists of the starting point of a segment and the endpoint of a segment. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_concavepolygonshape3d.rst b/classes/class_concavepolygonshape3d.rst index 3c603a2e33d..39496bc2946 100644 --- a/classes/class_concavepolygonshape3d.rst +++ b/classes/class_concavepolygonshape3d.rst @@ -19,14 +19,20 @@ Concave polygon shape resource (also called "trimesh") for 3D physics. Description ----------- -3D concave polygon shape resource (also called "trimesh") to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. This shape is created by feeding a list of triangles. Despite its name, **ConcavePolygonShape3D** can also store convex polygon shapes. However, unlike :ref:`ConvexPolygonShape3D`, **ConcavePolygonShape3D** is *not* limited to storing convex shapes exclusively. +3D concave polygon shape resource (also called "trimesh") to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. -\ **Note:** When used for collision, **ConcavePolygonShape3D** is intended to work with static :ref:`PhysicsBody3D` nodes like :ref:`StaticBody3D` and will not work with :ref:`CharacterBody3D` or :ref:`RigidBody3D` with a mode other than Static. +The shape consists of a collection of triangle faces, and as such it does not include any "inside" that the faces might be enclosing. If the faces enclose anything, then the shape is *hollow*, as opposed to a :ref:`ConvexPolygonShape3D` which is solid. See also :ref:`CollisionPolygon3D`. -\ **Performance:** Due to its complexity, **ConcavePolygonShape3D** is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape3D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape3D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape3D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D` first. +Being made out of triangle faces, this shape is the most freely configurable single 3D shape. Despite its name, it can be used to form (hollow) polyhedra of any nature, convex or concave. + +\ **Note:** When used for collision, **ConcavePolygonShape3D** is intended to work with static :ref:`PhysicsBody3D` nodes like :ref:`StaticBody3D` and will not work with :ref:`CharacterBody3D` or :ref:`RigidBody3D` in a mode other than Static. + +\ **Warning:** The nature of this shape makes it extra prone to being tunneled through by (small) fast physics bodies. For example, consider a (small) rigid body *Ball* traveling toward a static body *Box* at high speed. If the box uses a **ConcavePolygonShape3D** consisting of twelve triangle faces (two triangle faces for each of the six sides of the box), then the ball might end up inside the box or tunnel all the way through the box, if it goes fast enough. This is (partly) because the ball can only collide against the individual faces of the hollow box. In interactions with rigid bodies tunneling can be avoided by enabling continuous collision detection on the rigid body. \ **Warning:** Using this shape for an :ref:`Area3D` (via a :ref:`CollisionShape3D` node, created e.g. by using the *Create Trimesh Collision Sibling* option in the *Mesh* menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results: the area will only detect collisions with the triangle faces in the **ConcavePolygonShape3D** (and not with any "inside" of the shape, for example); moreover it will only detect all such collisions if :ref:`backface_collision` is ``true``. +\ **Performance:** Due to its complexity, **ConcavePolygonShape3D** is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape3D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape3D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape3D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D` first. + .. rst-class:: classref-introduction-group Tutorials @@ -97,7 +103,7 @@ Method Descriptions :ref:`PackedVector3Array` **get_faces** **(** **)** |const| -Returns the faces (an array of triangles). +Returns the faces of the trimesh shape as an array of vertices. The array (of length divisible by three) is naturally divided into triples; each triple of vertices defines a triangle. .. rst-class:: classref-item-separator @@ -109,7 +115,7 @@ Returns the faces (an array of triangles). void **set_faces** **(** :ref:`PackedVector3Array` faces **)** -Sets the faces (an array of triangles). +Sets the faces of the trimesh shape from an array of vertices. The ``faces`` array should be composed of triples such that each triple of vertices defines a triangle. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_conetwistjoint3d.rst b/classes/class_conetwistjoint3d.rst index 1d9cf6cd140..4a06f9c14d2 100644 --- a/classes/class_conetwistjoint3d.rst +++ b/classes/class_conetwistjoint3d.rst @@ -247,9 +247,7 @@ Method Descriptions :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the value of the specified parameter. .. rst-class:: classref-item-separator @@ -261,9 +259,7 @@ Method Descriptions void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the value of the specified parameter. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_control.rst b/classes/class_control.rst index 3b193fe2854..5ca435281b1 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -159,6 +159,8 @@ Methods +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`_get_minimum_size` **(** **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_tooltip` **(** :ref:`Vector2` at_position **)** |virtual| |const| | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_has_point` **(** :ref:`Vector2` point **)** |virtual| |const| | @@ -1223,7 +1225,7 @@ Anchors the top edge of the node to the origin, the center or the end of its par - void **set_auto_translate** **(** :ref:`bool` value **)** - :ref:`bool` **is_auto_translating** **(** **)** -Toggles if any text should automatically change to its translated version depending on the current locale. Note that this will not affect any internal nodes (e.g. the popup of a :ref:`MenuButton`). +Toggles if any text should automatically change to its translated version depending on the current locale. Also decides if the node's strings should be parsed for POT generation. @@ -1327,7 +1329,7 @@ Tells Godot which node it should give focus to if the user presses the left arro - void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** - :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| -Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_right` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the bottom of this one. +Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_right` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the right of this one. .. rst-class:: classref-item-separator @@ -1344,7 +1346,7 @@ Tells Godot which node it should give focus to if the user presses the right arr - void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** - :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| -Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_up` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the bottom of this one. +Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_up` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the top of this one. .. rst-class:: classref-item-separator @@ -1993,6 +1995,20 @@ If not overridden, defaults to :ref:`Vector2.ZERO`. ---- +.. _class_Control_method__get_tooltip: + +.. rst-class:: classref-method + +:ref:`String` **_get_tooltip** **(** :ref:`Vector2` at_position **)** |virtual| |const| + +Virtual method to be implemented by the user. Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. See :ref:`get_tooltip`. + +\ **Note:** If this method returns an empty :ref:`String`, no tooltip is displayed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_method__gui_input: .. rst-class:: classref-method @@ -2462,7 +2478,7 @@ Returns the minimum size for this control. See :ref:`custom_minimum_size` **get_offset** **(** :ref:`Side` offset **)** |const| -Returns the anchor for the specified :ref:`Side`. A getter method for :ref:`offset_bottom`, :ref:`offset_left`, :ref:`offset_right` and :ref:`offset_top`. +Returns the offset for the specified :ref:`Side`. A getter method for :ref:`offset_bottom`, :ref:`offset_left`, :ref:`offset_right` and :ref:`offset_top`. .. rst-class:: classref-item-separator @@ -2685,9 +2701,11 @@ See :ref:`get_theme_color` for details. :ref:`String` **get_tooltip** **(** :ref:`Vector2` at_position=Vector2(0, 0) **)** |const| -Returns the tooltip text ``at_position`` in local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns :ref:`tooltip_text`. +Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns :ref:`tooltip_text`. + +This method can be overridden to customize its behavior. See :ref:`_get_tooltip`. -\ **Note:** This method can be overridden to customize its behavior. If this method returns an empty :ref:`String`, no tooltip is displayed. +\ **Note:** If this method returns an empty :ref:`String`, no tooltip is displayed. .. rst-class:: classref-item-separator @@ -3182,7 +3200,7 @@ Sets :ref:`offset_right` and :ref:`offset_b void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** -Sets the anchor for the specified :ref:`Side` to the **Control** at ``neighbor`` node path. A setter method for :ref:`focus_neighbor_bottom`, :ref:`focus_neighbor_left`, :ref:`focus_neighbor_right` and :ref:`focus_neighbor_top`. +Sets the focus neighbor for the specified :ref:`Side` to the **Control** at ``neighbor`` node path. A setter method for :ref:`focus_neighbor_bottom`, :ref:`focus_neighbor_left`, :ref:`focus_neighbor_right` and :ref:`focus_neighbor_top`. .. rst-class:: classref-item-separator diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 6177f19fe79..0d06c0eab26 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -19,11 +19,15 @@ Convex polygon shape resource for 2D physics. Description ----------- -2D convex polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). See also :ref:`CollisionPolygon2D`. +2D convex polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. -The main difference between a **ConvexPolygonShape2D** and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. +The shape is a *solid* that includes all the points that it encloses, as opposed to :ref:`ConcavePolygonShape2D` which is hollow if it encloses anything. See also :ref:`CollisionPolygon2D`. -\ **Performance:** **ConvexPolygonShape2D** is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. +The solid nature of the shape makes it well-suited for both detection and physics; in physics body interactions this allows depenetrating even those shapes which end up (e.g. due to high speed) fully inside the convex shape (similarly to primitive shapes, but unlike :ref:`ConcavePolygonShape2D`). The convexity limits the possible geometric shape of a single **ConvexPolygonShape2D**: it cannot be concave. + +\ **Convex decomposition:** Concave objects' collisions can be represented accurately using *several* convex shapes. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). It can be achieved using several **ConvexPolygonShape2D** nodes or by using the :ref:`CollisionPolygon2D` node in Solids build mode. To generate a collision polygon from a sprite, select the :ref:`Sprite2D` node, go to the **Sprite2D** menu that appears above the viewport, and choose **Create Polygon2D Sibling**. + +\ **Performance:** **ConvexPolygonShape2D** is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. .. rst-class:: classref-reftable-group @@ -69,7 +73,9 @@ Property Descriptions - void **set_points** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_points** **(** **)** -The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use :ref:`set_point_cloud` to generate a convex hull shape from concave shape points. +The polygon's list of vertices that form a convex hull. Can be in either clockwise or counterclockwise order. + +\ **Warning:** Only set this property to a list of points that actually form a convex hull. Use :ref:`set_point_cloud` to generate the convex hull of an arbitrary set of points. .. rst-class:: classref-section-separator @@ -86,7 +92,7 @@ Method Descriptions void **set_point_cloud** **(** :ref:`PackedVector2Array` point_cloud **)** -Based on the set of points provided, this creates and assigns the :ref:`points` property using the convex hull algorithm. Removing all unneeded points. See :ref:`Geometry2D.convex_hull` for details. +Based on the set of points provided, this assigns the :ref:`points` property using the convex hull algorithm, removing all unneeded points. See :ref:`Geometry2D.convex_hull` for details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_convexpolygonshape3d.rst b/classes/class_convexpolygonshape3d.rst index 59e8b32a3f8..a0f39a2a941 100644 --- a/classes/class_convexpolygonshape3d.rst +++ b/classes/class_convexpolygonshape3d.rst @@ -19,11 +19,15 @@ Convex polygon shape resource for 3D physics. Description ----------- -3D convex polygon shape resource to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. Unlike :ref:`ConcavePolygonShape3D`, **ConvexPolygonShape3D** cannot store concave polygon shapes. **ConvexPolygonShape3D**\ s can be manually drawn in the editor using the :ref:`CollisionPolygon3D` node. +3D convex polygon shape resource to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. -\ **Convex decomposition:** Concave objects' collisions can be represented accurately using *several* **ConvexPolygonShape3D**\ s. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). This is available in the editor by selecting the :ref:`MeshInstance3D`, going to the **Mesh** menu and choosing **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions` can be called in a script to perform this decomposition at run-time. +The shape is a *solid* that includes all the points that it encloses, as opposed to :ref:`ConcavePolygonShape3D` which is hollow if it encloses anything. See also :ref:`CollisionPolygon3D`. -\ **Performance:** **ConvexPolygonShape3D** is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. +The solid nature of the shape makes it well-suited for both detection and physics; in physics body interactions this allows depenetrating even those shapes which end up (e.g. due to high speed) fully inside the convex shape (similarly to primitive shapes, but unlike :ref:`ConcavePolygonShape3D` and :ref:`HeightMapShape3D`). The convexity restricts the possible geometric shape of a single **ConvexPolygonShape3D**: it cannot be concave. + +\ **Convex decomposition:** Concave objects' collisions can be represented accurately using *several* convex shapes. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). It can be achieved by using several **ConvexPolygonShape3D** nodes or by using the :ref:`CollisionPolygon3D` node. To generate a collision polygon from a mesh, select the :ref:`MeshInstance3D` node, go to the **Mesh** menu that appears above the viewport and choose **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions` can be called in a script to perform this decomposition at run-time. + +\ **Performance:** **ConvexPolygonShape3D** is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. .. rst-class:: classref-introduction-group diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index f81a8d11d94..7d1fb40fc41 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -1662,7 +1662,7 @@ Particle system's running speed scaling ratio. A value of ``0`` can be used to p - void **set_split_scale** **(** :ref:`bool` value **)** - :ref:`bool` **get_split_scale** **(** **)** -If set to true, three different scale curves can be specified, one per scale axis. +If set to ``true``, three different scale curves can be specified, one per scale axis. .. rst-class:: classref-item-separator diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index d7c1f4baf24..a808cc1a61b 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -44,7 +44,7 @@ For now, this includes generating cryptographically secure random bytes, RSA key cert.save("user://generated.crt") # Encryption var data = "Some data" - var encrypted = crypto.encrypt(key, data.to_utf8()) + var encrypted = crypto.encrypt(key, data.to_utf8_buffer()) # Decryption var decrypted = crypto.decrypt(key, encrypted) # Signing @@ -53,7 +53,7 @@ For now, this includes generating cryptographically secure random bytes, RSA key var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key) # Checks assert(verified) - assert(data.to_utf8() == decrypted) + assert(data.to_utf8_buffer() == decrypted) .. code-tab:: csharp @@ -77,7 +77,7 @@ For now, this includes generating cryptographically secure random bytes, RSA key _cert.Save("user://generated.crt"); // Encryption string data = "Some data"; - byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8()); + byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8Buffer()); // Decryption byte[] decrypted = _crypto.Decrypt(_key, encrypted); // Signing @@ -86,7 +86,7 @@ For now, this includes generating cryptographically secure random bytes, RSA key bool verified = _crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, _key); // Checks Debug.Assert(verified); - Debug.Assert(data.ToUtf8() == decrypted); + Debug.Assert(data.ToUtf8Buffer() == decrypted); } } diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 8ee2588b59b..389d7d33dfd 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -378,7 +378,7 @@ If the curve has no up vectors, the function sends an error to the console, and :ref:`Transform3D` **sample_baked_with_rotation** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false, :ref:`bool` apply_tilt=false **)** |const| -Similar with ``interpolate_baked()``. The the return value is ``Transform3D``, with ``origin`` as point position, ``basis.x`` as sideway vector, ``basis.y`` as up vector, ``basis.z`` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. +Similar with ``interpolate_baked()``. The return value is ``Transform3D``, with ``origin`` as point position, ``basis.x`` as sideway vector, ``basis.y`` as up vector, ``basis.z`` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. .. rst-class:: classref-item-separator diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 244babf075a..7e2f971f6fa 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -189,8 +189,6 @@ The keys of a dictionary can be iterated with the ``for`` keyword: \ **Note:** Erasing elements while iterating over dictionaries is **not** supported and will result in unpredictable behavior. -\ **Note:** When declaring a dictionary with ``const``, the dictionary becomes read-only. A read-only Dictionary's entries cannot be overridden at run-time. This does *not* affect nested :ref:`Array` and **Dictionary** values. - .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_diraccess.rst b/classes/class_diraccess.rst index 3a48d33231a..a06b9ee01db 100644 --- a/classes/class_diraccess.rst +++ b/classes/class_diraccess.rst @@ -195,7 +195,7 @@ Property Descriptions - void **set_include_hidden** **(** :ref:`bool` value **)** - :ref:`bool` **get_include_hidden** **(** **)** -If ``true``, hidden files are included when the navigating directory. +If ``true``, hidden files are included when navigating the directory. Affects :ref:`list_dir_begin`, :ref:`get_directories` and :ref:`get_files`. diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index d2076a05076..e3fdd669051 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -62,6 +62,8 @@ Methods +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2i` | :ref:`get_display_safe_area` **(** **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_keyboard_focus_screen` **(** **)** |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_name` **(** **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_primary_screen` **(** **)** |const| | @@ -204,6 +206,8 @@ Methods +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ScreenOrientation` | :ref:`screen_get_orientation` **(** :ref:`int` screen=-1 **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`screen_get_pixel` **(** :ref:`Vector2i` position **)** |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`screen_get_position` **(** :ref:`int` screen=-1 **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`screen_get_refresh_rate` **(** :ref:`int` screen=-1 **)** |const| | @@ -518,6 +522,14 @@ Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Display server supports expanding window content to the title. See :ref:`WINDOW_FLAG_EXTEND_TO_TITLE`. **macOS** +.. _class_DisplayServer_constant_FEATURE_SCREEN_CAPTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_SCREEN_CAPTURE** = ``21`` + +Display server supports reading screen pixels. See :ref:`screen_get_pixel`. + .. rst-class:: classref-item-separator ---- @@ -594,7 +606,7 @@ Default landscape orientation. :ref:`ScreenOrientation` **SCREEN_PORTRAIT** = ``1`` -Default portrait orienstation. +Default portrait orientation. .. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE: @@ -990,7 +1002,7 @@ The window can't be focused. No-focus window will ignore all input, except mouse :ref:`WindowFlags` **WINDOW_FLAG_POPUP** = ``5`` -Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have ``transient parent`` set (see :ref:`window_set_transient`). +Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see :ref:`window_set_transient`). .. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE: @@ -1212,7 +1224,7 @@ OpenGL context (only with the GL Compatibility renderer): - Linux: ``GLXContext*`` for the window. -- MacOS: ``NSOpenGLContext*`` for the window. +- macOS: ``NSOpenGLContext*`` for the window. - Android: ``EGLContext`` for the window. @@ -1267,6 +1279,22 @@ Utterance reached a word or sentence boundary. Constants --------- +.. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS: + +.. rst-class:: classref-constant + +**SCREEN_WITH_MOUSE_FOCUS** = ``-4`` + +Represents the screen containing the mouse pointer. + +.. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS: + +.. rst-class:: classref-constant + +**SCREEN_WITH_KEYBOARD_FOCUS** = ``-3`` + +Represents the screen containing the window with the keyboard focus. + .. _class_DisplayServer_constant_SCREEN_PRIMARY: .. rst-class:: classref-constant @@ -1504,6 +1532,18 @@ Returns the unobscured area of the display where interactive controls should be ---- +.. _class_DisplayServer_method_get_keyboard_focus_screen: + +.. rst-class:: classref-method + +:ref:`int` **get_keyboard_focus_screen** **(** **)** |const| + +Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_get_name: .. rst-class:: classref-method @@ -1613,7 +1653,7 @@ Adds a new checkable item with text ``label`` to the global menu with ID ``menu_ Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. @@ -1640,7 +1680,7 @@ Adds a new checkable item with text ``label`` and icon ``icon`` to the global me Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. @@ -1667,7 +1707,7 @@ Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. @@ -1694,7 +1734,7 @@ Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the glo Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). \ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. @@ -1723,7 +1763,7 @@ Adds a new item with text ``label`` to the global menu with ID ``menu_root``. Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. @@ -1752,7 +1792,7 @@ Contrarily to normal binary items, multistate items can have more than two state Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). \ **Note:** By default, there's no indication of the current item state, it should be changed manually. @@ -1781,7 +1821,7 @@ Adds a new radio-checkable item with text ``label`` to the global menu with ID ` Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. -An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). \ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. @@ -2055,7 +2095,7 @@ Returns the text of the item at index ``idx``. :ref:`String` **global_menu_get_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| -Returns the tooltip associated with the specified index index ``idx``. +Returns the tooltip associated with the specified index ``idx``. \ **Note:** This method is implemented on macOS. @@ -2145,7 +2185,7 @@ Removes the item at index ``idx`` from the global menu ``menu_root``. void **global_menu_set_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Key` keycode **)** -Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single :ref:`Key`, or a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single :ref:`Key`, or a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). \ **Note:** This method is implemented on macOS. @@ -2161,7 +2201,7 @@ void **global_menu_set_item_callback** **(** :ref:`String` menu_ro Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed. -\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. +\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created. \ **Note:** This method is implemented on macOS. @@ -2249,7 +2289,7 @@ void **global_menu_set_item_key_callback** **(** :ref:`String` men Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated. -\ **Note:** The ``key_callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. +\ **Note:** The ``key_callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created. \ **Note:** This method is implemented on macOS. @@ -2638,6 +2678,22 @@ Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientat ---- +.. _class_DisplayServer_method_screen_get_pixel: + +.. rst-class:: classref-method + +:ref:`Color` **screen_get_pixel** **(** :ref:`Vector2i` position **)** |const| + +Returns color of the display pixel at the ``position``. + +\ **Note:** This method is implemented on Linux (X11), macOS, and Windows. + +\ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_screen_get_position: .. rst-class:: classref-method @@ -2765,7 +2821,7 @@ Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation` image **)** -Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. To use icons in the operating system's native format, use :ref:`set_native_icon` instead. +Sets the window icon (usually displayed in the top-left corner) with an :ref:`Image`. To use icons in the operating system's native format, use :ref:`set_native_icon` instead. .. rst-class:: classref-item-separator @@ -2855,7 +2911,7 @@ Each :ref:`Dictionary` contains two :ref:`String - ``language`` is language code in ``lang_Variant`` format. ``lang`` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And ``Variant`` part is an engine dependent string describing country, region or/and dialect. -Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and MacOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech. +Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and macOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. @@ -2941,9 +2997,9 @@ void **tts_set_utterance_callback** **(** :ref:`TTSUtteranceEvent`, :ref:`TTS_UTTERANCE_ENDED`, and :ref:`TTS_UTTERANCE_CANCELED` callable's method should take one :ref:`int` parameter, the utterance id. +- :ref:`TTS_UTTERANCE_STARTED`, :ref:`TTS_UTTERANCE_ENDED`, and :ref:`TTS_UTTERANCE_CANCELED` callable's method should take one :ref:`int` parameter, the utterance ID. -- :ref:`TTS_UTTERANCE_BOUNDARY` callable's method should take two :ref:`int` parameters, the index of the character and the utterance id. +- :ref:`TTS_UTTERANCE_BOUNDARY` callable's method should take two :ref:`int` parameters, the index of the character and the utterance ID. \ **Note:** The granularity of the boundary callbacks is engine dependent. diff --git a/classes/class_dtlsserver.rst b/classes/class_dtlsserver.rst index c888ec296f5..69da23ef98b 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -43,8 +43,8 @@ Below a small example of how to use it: func _process(delta): while server.is_connection_available(): - var peer : PacketPeerUDP = server.take_connection() - var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer) + var peer: PacketPeerUDP = server.take_connection() + var dtls_peer: PacketPeerDTLS = dtls.take_connection(peer) if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING: continue # It is normal that 50% of the connections fails due to cookie exchange. print("Peer connected!") @@ -55,7 +55,7 @@ Below a small example of how to use it: if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED: while p.get_available_packet_count() > 0: print("Received message from client: %s" % p.get_packet().get_string_from_utf8()) - p.put_packet("Hello DTLS client".to_utf8()) + p.put_packet("Hello DTLS client".to_utf8_buffer()) .. code-tab:: csharp @@ -98,7 +98,7 @@ Below a small example of how to use it: while (p.GetAvailablePacketCount() > 0) { GD.Print($"Received Message From Client: {p.GetPacket().GetStringFromUtf8()}"); - p.PutPacket("Hello DTLS Client".ToUtf8()); + p.PutPacket("Hello DTLS Client".ToUtf8Buffer()); } } } @@ -128,7 +128,7 @@ Below a small example of how to use it: if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED: if !connected: # Try to contact server - dtls.put_packet("The answer is... 42!".to_utf8()) + dtls.put_packet("The answer is... 42!".to_utf8_buffer()) while dtls.get_available_packet_count() > 0: print("Connected: %s" % dtls.get_packet().get_string_from_utf8()) connected = true @@ -159,7 +159,7 @@ Below a small example of how to use it: if (!_connected) { // Try to contact server - _dtls.PutPacket("The Answer Is..42!".ToUtf8()); + _dtls.PutPacket("The Answer Is..42!".ToUtf8Buffer()); } while (_dtls.GetAvailablePacketCount() > 0) { diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index 3cabea5eb6d..ef64160a276 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -12,6 +12,8 @@ EditorExportPlatform **Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**Inherited By:** :ref:`EditorExportPlatformPC` + Identifies a supported export platform, and internally provides the functionality of exporting to that platform. .. rst-class:: classref-introduction-group diff --git a/classes/class_editorexportplatformpc.rst b/classes/class_editorexportplatformpc.rst new file mode 100644 index 00000000000..6b86b556cfb --- /dev/null +++ b/classes/class_editorexportplatformpc.rst @@ -0,0 +1,22 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorExportPlatformPC.xml. + +.. _class_EditorExportPlatformPC: + +EditorExportPlatformPC +====================== + +**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` + +Base class for the desktop platform exporter (Windows and Linux/BSD). + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 8cdf4241c0e..dee7f58d46f 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -54,8 +54,12 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_export_features` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_export_options` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_should_update_export_options` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_file` **(** :ref:`String` path, :ref:`PackedByteArray` file, :ref:`bool` remap **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_ios_bundle_file` **(** :ref:`String` path **)** | @@ -76,6 +80,8 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_shared_object` **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_option` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`skip` **(** **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -232,6 +238,26 @@ Return a :ref:`PackedStringArray` of additional feature ---- +.. _class_EditorExportPlugin_method__get_export_options: + +.. rst-class:: classref-method + +:ref:`Dictionary[]` **_get_export_options** **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| + +Return a list of export options that can be configured for this export plugin. + +Each element in the return value is a :ref:`Dictionary` with the following keys: + +- ``option``: A dictionary with the structure documented by :ref:`Object.get_property_list`, but all keys are optional. + +- ``default_value``: The default value for this option. + +- ``update_visibility``: An optional boolean value. If set to ``true``, the preset will emit :ref:`Object.property_list_changed` when the option is changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlugin_method__get_name: .. rst-class:: classref-method @@ -246,6 +272,18 @@ Implementing this method is required. ---- +.. _class_EditorExportPlugin_method__should_update_export_options: + +.. rst-class:: classref-method + +:ref:`bool` **_should_update_export_options** **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| + +Return ``true``, if the result of :ref:`_get_export_options` has changed and the export options of preset corresponding to ``platform`` should be updated. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlugin_method_add_file: .. rst-class:: classref-method @@ -376,6 +414,18 @@ In case of a directory code-sign will error if you place non code object in dire ---- +.. _class_EditorExportPlugin_method_get_option: + +.. rst-class:: classref-method + +:ref:`Variant` **get_option** **(** :ref:`StringName` name **)** |const| + +Returns the current value of an export option supplied by :ref:`_get_export_options`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlugin_method_skip: .. rst-class:: classref-method diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index cfbc942f81f..0715ea7dd00 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -351,7 +351,7 @@ The view format in which the **EditorFileDialog** displays resources to the user - void **set_file_mode** **(** :ref:`FileMode` value **)** - :ref:`FileMode` **get_file_mode** **(** **)** -The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode` +The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 60cef634d96..56ca27e1a9c 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -10,7 +10,7 @@ EditorInterface =============== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`Object` Godot editor's interface. @@ -34,6 +34,8 @@ Properties +-------------------------+------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`distraction_free_mode` | +-------------------------+------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`movie_maker_enabled` | + +-------------------------+------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -50,7 +52,7 @@ Methods +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`edit_script` **(** :ref:`Script` script, :ref:`int` line=-1, :ref:`int` column=0, :ref:`bool` grab_focus=true **)** | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`get_base_control` **(** **)** | + | :ref:`Control` | :ref:`get_base_control` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorCommandPalette` | :ref:`get_command_palette` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -58,17 +60,17 @@ Methods +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_current_path` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`get_edited_scene_root` **(** **)** | + | :ref:`Node` | :ref:`get_edited_scene_root` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VBoxContainer` | :ref:`get_editor_main_screen` **(** **)** | + | :ref:`VBoxContainer` | :ref:`get_editor_main_screen` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorPaths` | :ref:`get_editor_paths` **(** **)** | + | :ref:`EditorPaths` | :ref:`get_editor_paths` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_editor_scale` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSettings` | :ref:`get_editor_settings` **(** **)** | + | :ref:`EditorSettings` | :ref:`get_editor_settings` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileSystemDock` | :ref:`get_file_system_dock` **(** **)** | + | :ref:`FileSystemDock` | :ref:`get_file_system_dock` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorInspector` | :ref:`get_inspector` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -76,20 +78,18 @@ Methods +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_playing_scene` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem` **(** **)** | + | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer` **(** **)** | + | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptEditor` | :ref:`get_script_editor` **(** **)** | + | :ref:`ScriptEditor` | :ref:`get_script_editor` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_selected_paths` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSelection` | :ref:`get_selection` **(** **)** | + | :ref:`EditorSelection` | :ref:`get_selection` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`inspect_object` **(** :ref:`Object` object, :ref:`String` for_property="", :ref:`bool` inspector_only=false **)** | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_movie_maker_enabled` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_playing_scene` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_plugin_enabled` **(** :ref:`String` plugin **)** |const| | @@ -116,8 +116,6 @@ Methods +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_main_screen_editor` **(** :ref:`String` name **)** | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_movie_maker_enabled` **(** :ref:`bool` enabled **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_plugin_enabled` **(** :ref:`String` plugin, :ref:`bool` enabled **)** | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`stop_playing_scene` **(** **)** | @@ -145,6 +143,23 @@ Property Descriptions If ``true``, enables distraction-free mode which hides side docks to increase the space available for the main view. +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_property_movie_maker_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **movie_maker_enabled** + +.. rst-class:: classref-property-setget + +- void **set_movie_maker_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_movie_maker_enabled** **(** **)** + +If ``true``, the Movie Maker mode is enabled in the editor. See :ref:`MovieWriter` for more information. + .. rst-class:: classref-section-separator ---- @@ -194,7 +209,7 @@ Edits the given :ref:`Script`. The line and column on which to ope .. rst-class:: classref-method -:ref:`Control` **get_base_control** **(** **)** +:ref:`Control` **get_base_control** **(** **)** |const| Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. @@ -246,7 +261,7 @@ Returns the current path being viewed in the :ref:`FileSystemDock` **get_edited_scene_root** **(** **)** +:ref:`Node` **get_edited_scene_root** **(** **)** |const| Returns the edited (current) scene's root :ref:`Node`. @@ -258,7 +273,7 @@ Returns the edited (current) scene's root :ref:`Node`. .. rst-class:: classref-method -:ref:`VBoxContainer` **get_editor_main_screen** **(** **)** +:ref:`VBoxContainer` **get_editor_main_screen** **(** **)** |const| Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen`. @@ -272,7 +287,7 @@ Returns the editor control responsible for main screen plugins and tools. Use it .. rst-class:: classref-method -:ref:`EditorPaths` **get_editor_paths** **(** **)** +:ref:`EditorPaths` **get_editor_paths** **(** **)** |const| Returns the :ref:`EditorPaths` singleton. @@ -298,7 +313,7 @@ Returns the actual scale of the editor UI (``1.0`` being 100% scale). This can b .. rst-class:: classref-method -:ref:`EditorSettings` **get_editor_settings** **(** **)** +:ref:`EditorSettings` **get_editor_settings** **(** **)** |const| Returns the editor's :ref:`EditorSettings` instance. @@ -310,7 +325,7 @@ Returns the editor's :ref:`EditorSettings` instance. .. rst-class:: classref-method -:ref:`FileSystemDock` **get_file_system_dock** **(** **)** +:ref:`FileSystemDock` **get_file_system_dock** **(** **)** |const| Returns the editor's :ref:`FileSystemDock` instance. @@ -362,7 +377,7 @@ Returns the name of the scene that is being played. If no scene is currently bei .. rst-class:: classref-method -:ref:`EditorFileSystem` **get_resource_filesystem** **(** **)** +:ref:`EditorFileSystem` **get_resource_filesystem** **(** **)** |const| Returns the editor's :ref:`EditorFileSystem` instance. @@ -374,7 +389,7 @@ Returns the editor's :ref:`EditorFileSystem` instance. .. rst-class:: classref-method -:ref:`EditorResourcePreview` **get_resource_previewer** **(** **)** +:ref:`EditorResourcePreview` **get_resource_previewer** **(** **)** |const| Returns the editor's :ref:`EditorResourcePreview` instance. @@ -386,7 +401,7 @@ Returns the editor's :ref:`EditorResourcePreview` i .. rst-class:: classref-method -:ref:`ScriptEditor` **get_script_editor** **(** **)** +:ref:`ScriptEditor` **get_script_editor** **(** **)** |const| Returns the editor's :ref:`ScriptEditor` instance. @@ -412,7 +427,7 @@ Returns an array containing the paths of the currently selected files (and direc .. rst-class:: classref-method -:ref:`EditorSelection` **get_selection** **(** **)** +:ref:`EditorSelection` **get_selection** **(** **)** |const| Returns the editor's :ref:`EditorSelection` instance. @@ -432,18 +447,6 @@ Shows the given property on the given ``object`` in the editor's Inspector dock. ---- -.. _class_EditorInterface_method_is_movie_maker_enabled: - -.. rst-class:: classref-method - -:ref:`bool` **is_movie_maker_enabled** **(** **)** |const| - -Returns ``true`` if Movie Maker mode is enabled in the editor. See also :ref:`set_movie_maker_enabled`. See :ref:`MovieWriter` for more information. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorInterface_method_is_playing_scene: .. rst-class:: classref-method @@ -600,18 +603,6 @@ Sets the editor's current main screen to the one specified in ``name``. ``name`` ---- -.. _class_EditorInterface_method_set_movie_maker_enabled: - -.. rst-class:: classref-method - -void **set_movie_maker_enabled** **(** :ref:`bool` enabled **)** - -Sets whether Movie Maker mode is enabled in the editor. See also :ref:`is_movie_maker_enabled`. See :ref:`MovieWriter` for more information. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorInterface_method_set_plugin_enabled: .. rst-class:: classref-method diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index 49406fec22e..fba3d127bf8 100644 --- a/classes/class_editorpaths.rst +++ b/classes/class_editorpaths.rst @@ -155,7 +155,11 @@ Returns the absolute path to the self-contained file that makes the current Godo Returns ``true`` if the editor is marked as self-contained, ``false`` otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an ``editor_data/`` folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects. -Self-contained mode can be enabled by creating a file named ``._sc_`` or ``_sc_`` in the same folder as the editor binary while the editor is not running. See also :ref:`get_self_contained_file`. +Self-contained mode can be enabled by creating a file named ``._sc_`` or ``_sc_`` in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also :ref:`get_self_contained_file`. + +\ **Note:** On macOS, quarantine flag should be manually removed before using self-contained mode, see `Running on macOS `__. + +\ **Note:** On macOS, placing ``_sc_`` or any other file inside .app bundle will break digital signature and make it non-portable, consider placing it in the same folder as the .app bundle instead. \ **Note:** The Steam release of Godot uses self-contained mode by default. diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 1f857e161b1..91a9eb00175 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -1279,7 +1279,7 @@ The callback should have 4 arguments: :ref:`Object` ``undo_redo``, :ref:`EditorInterface` **get_editor_interface** **(** **)** -Returns the :ref:`EditorInterface` object that gives you control over Godot editor's window and its functionalities. +Returns the :ref:`EditorInterface` singleton. It provides access to some parts of the editor GUI as well as various inner states and tools. .. rst-class:: classref-item-separator diff --git a/classes/class_editorresourceconversionplugin.rst b/classes/class_editorresourceconversionplugin.rst index f42ea520504..6cb08d14339 100644 --- a/classes/class_editorresourceconversionplugin.rst +++ b/classes/class_editorresourceconversionplugin.rst @@ -30,13 +30,13 @@ Below shows an example of a basic plugin that will convert an :ref:`ImageTexture extends EditorResourceConversionPlugin - func _handles(resource : Resource): + func _handles(resource: Resource): return resource is ImageTexture func _converts_to(): return "PortableCompressedTexture2D" - func _convert(itex : Resource): + func _convert(itex: Resource): var ptex = PortableCompressedTexture2D.new() ptex.create_from_image(itex.get_image(), PortableCompressedTexture2D.COMPRESSION_MODE_LOSSLESS) return ptex diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 0d595ebc72c..30ce5424606 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -30,7 +30,7 @@ Accessing the settings can be done using the following methods, such as: .. code-tab:: gdscript - var settings = EditorInterface.get_editor_settings() + var settings = get_editor_interface().get_editor_settings() # `settings.set("some/property", 10)` also works as this class overrides `_set()` internally. settings.set_setting("some/property", 10) # `settings.get("some/property")` also works as this class overrides `_get()` internally. @@ -257,6 +257,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`interface/editor/editor_language` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/editor_screen` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/expand_to_title` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/font_antialiasing` | @@ -275,6 +277,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/mouse_extra_buttons_navigate_history` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/project_manager_screen` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/save_each_scene_on_quit` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/separate_distraction_mode` | @@ -1171,7 +1175,7 @@ The modifier key that must be held to pan in the 3D editor. :ref:`bool` **editors/3d/navigation/warped_mouse_panning** -If ``true``, warps the mouse around the 3D viewport while panning in the 3D editor. This makes it possible to pan over a large area without having to exit panning then mouse the mouse back constantly. +If ``true``, warps the mouse around the 3D viewport while panning in the 3D editor. This makes it possible to pan over a large area without having to exit panning and adjust the mouse cursor. .. rst-class:: classref-item-separator @@ -1485,7 +1489,7 @@ Controls whether the mouse wheel scroll zooms or pans in subeditors. The list of :ref:`bool` **editors/panning/warped_mouse_panning** -If ``true``, warps the mouse around the 2D viewport while panning in the 2D editor. This makes it possible to pan over a large area without having to exit panning then mouse the mouse back constantly. +If ``true``, warps the mouse around the 2D viewport while panning in the 2D editor. This makes it possible to pan over a large area without having to exit panning and adjust the mouse cursor. .. rst-class:: classref-item-separator @@ -1871,6 +1875,18 @@ Translations are provided by the community. If you spot a mistake, :doc:`contrib ---- +.. _class_EditorSettings_property_interface/editor/editor_screen: + +.. rst-class:: classref-property + +:ref:`int` **interface/editor/editor_screen** + +The preferred monitor to display the editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/expand_to_title: .. rst-class:: classref-property @@ -1989,13 +2005,25 @@ If ``true``, the mouse's additional side buttons will be usable to navigate in t ---- +.. _class_EditorSettings_property_interface/editor/project_manager_screen: + +.. rst-class:: classref-property + +:ref:`int` **interface/editor/project_manager_screen** + +The preferred monitor to display the project manager. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/save_each_scene_on_quit: .. rst-class:: classref-property :ref:`bool` **interface/editor/save_each_scene_on_quit** -If ``true``, the editor will save all scenes when confirming the **Save** action when quitting the editor or quitting to the project list. If ``false``, the editor will ask to save each scene individually. +If ``false``, the editor will save all scenes when confirming the **Save** action when quitting the editor or quitting to the project list. If ``true``, the editor will ask to save each scene individually. .. rst-class:: classref-item-separator @@ -2533,7 +2561,7 @@ If ``true``, makes the caret blink according to :ref:`text_editor/appearance/car :ref:`float` **text_editor/appearance/caret/caret_blink_interval** -The interval at which to blink the caret (in seconds). See also :ref:`text_editor/appearance/caret/caret_blink`. +The interval at which the caret will blink (in seconds). See also :ref:`text_editor/appearance/caret/caret_blink`. .. rst-class:: classref-item-separator @@ -3646,7 +3674,7 @@ Erases the setting whose name is specified by ``property``. :ref:`PackedStringArray` **get_changed_settings** **(** **)** |const| -Gets an array of the settings which have been changed since the last save. Note that internally ``changed_settings`` is cleared after a successful save, so generally the most appropriate place to use this method is when processing :ref:`NOTIFICATION_EDITOR_SETTINGS_CHANGED` +Gets an array of the settings which have been changed since the last save. Note that internally ``changed_settings`` is cleared after a successful save, so generally the most appropriate place to use this method is when processing :ref:`NOTIFICATION_EDITOR_SETTINGS_CHANGED`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorundoredomanager.rst b/classes/class_editorundoredomanager.rst index 65b8769748c..02305cd2512 100644 --- a/classes/class_editorundoredomanager.rst +++ b/classes/class_editorundoredomanager.rst @@ -31,6 +31,10 @@ The usage is mostly the same as :ref:`UndoRedo`. You create and This guessing can sometimes yield false results, so you can provide a custom context object when creating an action. +\ **EditorUndoRedoManager** is intended to be used by Godot editor plugins. You can obtain it using :ref:`EditorPlugin.get_undo_redo`. For non-editor uses or plugins that don't need to integrate with the editor's undo history, use :ref:`UndoRedo` instead. + +The manager's API is mostly the same as in :ref:`UndoRedo`, so you can refer to its documentation for more examples. The main difference is that **EditorUndoRedoManager** uses object + method name for actions, instead of :ref:`Callable`. + .. rst-class:: classref-reftable-group Methods diff --git a/classes/class_editorvcsinterface.rst b/classes/class_editorvcsinterface.rst index bd9c61f46fa..0907a0aa996 100644 --- a/classes/class_editorvcsinterface.rst +++ b/classes/class_editorvcsinterface.rst @@ -397,7 +397,7 @@ Pulls changes from the remote. This can give rise to merge conflicts. void **_push** **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| -Pushes changes to the ``remote``. Optionally, if ``force`` is set to true, a force push will override the change history already present on the remote. +Pushes changes to the ``remote``. If ``force`` is ``true``, a force push will override the change history already present on the remote. .. rst-class:: classref-item-separator diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 17744e72589..a64b0b09c1a 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -1858,7 +1858,7 @@ If ``true``, screen-space reflections are enabled. Screen-space reflections are - void **set_ssr_fade_in** **(** :ref:`float` value **)** - :ref:`float` **get_ssr_fade_in** **(** **)** -The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). Only positive values are valid (negative values will be clamped to ``0.0``). +The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to ``0.0``). .. rst-class:: classref-item-separator diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index eeb04d811c5..9ab009a9158 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -255,7 +255,7 @@ Property Descriptions - void **set_access** **(** :ref:`Access` value **)** - :ref:`Access` **get_access** **(** **)** -The file system access scope. See enum ``Access`` constants. +The file system access scope. See :ref:`Access` constants. \ **Warning:** Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See `godot-proposals#1123 `__. @@ -359,7 +359,7 @@ The available file type filters. For example, this shows only ``.png`` and ``.gd - void **set_mode_overrides_title** **(** :ref:`bool` value **)** - :ref:`bool` **is_mode_overriding_title** **(** **)** -If ``true``, changing the ``Mode`` property will set the window title accordingly (e.g. setting mode to :ref:`FILE_MODE_OPEN_FILE` will change the window title to "Open a File"). +If ``true``, changing the :ref:`file_mode` property will set the window title accordingly (e.g. setting :ref:`file_mode` to :ref:`FILE_MODE_OPEN_FILE` will change the window title to "Open a File"). .. rst-class:: classref-item-separator diff --git a/classes/class_filesystemdock.rst b/classes/class_filesystemdock.rst index 32bcd0c19c5..b28d1fd2c08 100644 --- a/classes/class_filesystemdock.rst +++ b/classes/class_filesystemdock.rst @@ -12,9 +12,16 @@ FileSystemDock **Inherits:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -.. container:: contribute +Editor dock for managing files in the project. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +This class is available only in :ref:`EditorPlugin`\ s and can't be instantiated. You can access it using :ref:`EditorInterface.get_file_system_dock`. + +While FileSystemDock doesn't expose any methods for file manipulation, you can listen for various file-related signals. .. rst-class:: classref-reftable-group @@ -43,9 +50,7 @@ Signals **display_mode_changed** **(** **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when the user switches file display mode or split mode. .. rst-class:: classref-item-separator @@ -57,9 +62,7 @@ Signals **file_removed** **(** :ref:`String` file **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when the given ``file`` was removed. .. rst-class:: classref-item-separator @@ -71,9 +74,7 @@ Signals **files_moved** **(** :ref:`String` old_file, :ref:`String` new_file **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when a file is moved from ``old_file`` path to ``new_file`` path. .. rst-class:: classref-item-separator @@ -85,9 +86,7 @@ Signals **folder_moved** **(** :ref:`String` old_folder, :ref:`String` new_folder **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when a folder is moved from ``old_folder`` path to ``new_folder`` path. .. rst-class:: classref-item-separator @@ -99,9 +98,7 @@ Signals **folder_removed** **(** :ref:`String` folder **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when the given ``folder`` was removed. .. rst-class:: classref-item-separator @@ -113,9 +110,7 @@ Signals **inherit** **(** :ref:`String` file **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when a new scene is created that inherits the scene at ``file`` path. .. rst-class:: classref-item-separator @@ -127,9 +122,7 @@ Signals **instantiate** **(** :ref:`PackedStringArray` files **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when the given scenes are being instantiated in the editor. .. rst-class:: classref-item-separator @@ -141,9 +134,7 @@ Signals **resource_removed** **(** :ref:`Resource` resource **)** -.. container:: contribute - - There is currently no description for this signal. Please help us by :ref:`contributing one `! +Emitted when an external ``resource`` had its file removed. .. rst-class:: classref-section-separator @@ -160,9 +151,7 @@ Method Descriptions void **navigate_to_path** **(** :ref:`String` path **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the given ``path`` as currently selected, ensuring that the selected file/directory is visible. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_font.rst b/classes/class_font.rst index 54a2f5069e8..a9b12fa5dc4 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -462,6 +462,20 @@ Returns list of supported `variation coordinates `, use :ref:`FontVariation.variation_opentype`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index 97f5c0b27a0..8132ecd1b45 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -135,6 +135,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_cache_underline_thickness` **(** :ref:`int` cache_index, :ref:`int` size **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_char_from_glyph_index` **(** :ref:`int` size, :ref:`int` glyph_index **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_embolden` **(** :ref:`int` cache_index **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_face_index` **(** :ref:`int` cache_index **)** |const| | @@ -715,6 +717,18 @@ Returns thickness of the underline in pixels. ---- +.. _class_FontFile_method_get_char_from_glyph_index: + +.. rst-class:: classref-method + +:ref:`int` **get_char_from_glyph_index** **(** :ref:`int` size, :ref:`int` glyph_index **)** |const| + +Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`get_glyph_index`. + +.. rst-class:: classref-item-separator + +---- + .. _class_FontFile_method_get_embolden: .. rst-class:: classref-method diff --git a/classes/class_fontvariation.rst b/classes/class_fontvariation.rst index 5e3c66edd5f..ed48d8300ad 100644 --- a/classes/class_fontvariation.rst +++ b/classes/class_fontvariation.rst @@ -44,6 +44,15 @@ To use simulated bold font variant: +To set the coordinate of multiple variation axes: + +:: + + var fv = FontVariation.new(); + var ts = TextServerManager.get_primary_interface() + fv.base_font = load("res://BarlowCondensed-Regular.ttf") + fv.variation_opentype = { ts.name_to_tag("wght"): 900, ts.name_to_tag("custom_hght"): 900 } + .. rst-class:: classref-reftable-group Properties @@ -125,7 +134,7 @@ Base font used to create a variation. If not set, default :ref:`Theme` value **)** - :ref:`Font[]` **get_fallbacks** **(** **)** -Array of fallback :ref:`Font`\ s. If not set :ref:`base_font` fallback are ussed. +Array of fallback :ref:`Font`\ s to use as a substitute if a glyph is not found in this **FontVariation**. If not set, :ref:`base_font`'s fallbacks are used instead. .. rst-class:: classref-item-separator @@ -265,6 +274,10 @@ Active face index in the TrueType / OpenType collection file. Font OpenType variation coordinates. More info: `OpenType variation tags `__. +\ **Note:** This :ref:`Dictionary` uses OpenType tags as keys. Variation axes can be identified both by tags(``int``) and names (``string``). Some axes might be accessible by multiple names. For example, ``wght`` refers to the same axis as ``weight``. Tags on the other hand are unique. To convert between names and tags, use :ref:`TextServer.name_to_tag` and :ref:`TextServer.tag_to_name`. + +\ **Note:** To get available variation axes of a font, use :ref:`Font.get_supported_variation_list`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_gltfnode.rst b/classes/class_gltfnode.rst index dd743c718b2..342468c5233 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -21,6 +21,8 @@ Description Represents a GLTF node. GLTF nodes may have names, transforms, children (other GLTF nodes), and more specialized properties (represented by their own classes). +GLTF nodes generally exist inside of :ref:`GLTFState` which represents all data of a GLTF file. Most of GLTFNode's properties are indices of other data in the GLTF file. You can extend a GLTF node with additional properties by using :ref:`get_additional_data` and :ref:`set_additional_data`. + .. rst-class:: classref-introduction-group Tutorials @@ -96,9 +98,7 @@ Property Descriptions - void **set_camera** **(** :ref:`int` value **)** - :ref:`int` **get_camera** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node is a camera, the index of the :ref:`GLTFCamera` in the :ref:`GLTFState` that describes the camera's properties. If -1, this node is not a camera. .. rst-class:: classref-item-separator @@ -115,9 +115,7 @@ Property Descriptions - void **set_children** **(** :ref:`PackedInt32Array` value **)** - :ref:`PackedInt32Array` **get_children** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The indices of the children nodes in the :ref:`GLTFState`. If this GLTF node has no children, this will be an empty array. .. rst-class:: classref-item-separator @@ -134,9 +132,7 @@ Property Descriptions - void **set_height** **(** :ref:`int` value **)** - :ref:`int` **get_height** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +How deep into the node hierarchy this node is. A root node will have a height of 0, its children will have a height of 1, and so on. If -1, the height has not been calculated. .. rst-class:: classref-item-separator @@ -153,9 +149,7 @@ Property Descriptions - void **set_light** **(** :ref:`int` value **)** - :ref:`int` **get_light** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node is a light, the index of the :ref:`GLTFLight` in the :ref:`GLTFState` that describes the light's properties. If -1, this node is not a light. .. rst-class:: classref-item-separator @@ -172,9 +166,7 @@ Property Descriptions - void **set_mesh** **(** :ref:`int` value **)** - :ref:`int` **get_mesh** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node is a mesh, the index of the :ref:`GLTFMesh` in the :ref:`GLTFState` that describes the mesh's properties. If -1, this node is not a mesh. .. rst-class:: classref-item-separator @@ -191,9 +183,7 @@ Property Descriptions - void **set_parent** **(** :ref:`int` value **)** - :ref:`int` **get_parent** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The index of the parent node in the :ref:`GLTFState`. If -1, this node is a root node. .. rst-class:: classref-item-separator @@ -210,9 +200,7 @@ Property Descriptions - void **set_position** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_position** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The position of the GLTF node relative to its parent. .. rst-class:: classref-item-separator @@ -229,9 +217,7 @@ Property Descriptions - void **set_rotation** **(** :ref:`Quaternion` value **)** - :ref:`Quaternion` **get_rotation** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The rotation of the GLTF node relative to its parent. .. rst-class:: classref-item-separator @@ -248,9 +234,7 @@ Property Descriptions - void **set_scale** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_scale** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The scale of the GLTF node relative to its parent. .. rst-class:: classref-item-separator @@ -267,9 +251,7 @@ Property Descriptions - void **set_skeleton** **(** :ref:`int` value **)** - :ref:`int` **get_skeleton** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node has a skeleton, the index of the :ref:`GLTFSkeleton` in the :ref:`GLTFState` that describes the skeleton's properties. If -1, this node does not have a skeleton. .. rst-class:: classref-item-separator @@ -286,9 +268,7 @@ Property Descriptions - void **set_skin** **(** :ref:`int` value **)** - :ref:`int` **get_skin** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If this GLTF node has a skin, the index of the :ref:`GLTFSkin` in the :ref:`GLTFState` that describes the skin's properties. If -1, this node does not have a skin. .. rst-class:: classref-item-separator @@ -305,9 +285,7 @@ Property Descriptions - void **set_xform** **(** :ref:`Transform3D` value **)** - :ref:`Transform3D` **get_xform** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The transform of the GLTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred. .. rst-class:: classref-section-separator diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index f30b1953530..a47f9d000c6 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -12,9 +12,16 @@ GLTFState **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Represents all data of a GLTF file. + +.. rst-class:: classref-introduction-group + +Description +----------- - There is currently no description for this class. Please help us by :ref:`contributing one `! +Contains all nodes and resources of a GLTF file. This is used by :ref:`GLTFDocument` as data storage, which allows :ref:`GLTFDocument` and all :ref:`GLTFDocumentExtension` classes to remain stateless. + +GLTFState can be populated by :ref:`GLTFDocument` reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a GLTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by :ref:`GLTFDocumentExtension` classes. This allows for custom data to be stored in the GLTF file or for custom data to be converted to/from Godot nodes. .. rst-class:: classref-reftable-group @@ -326,9 +333,7 @@ Property Descriptions - void **set_root_nodes** **(** :ref:`PackedInt32Array` value **)** - :ref:`PackedInt32Array` **get_root_nodes** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The root nodes of the GLTF file. Typically, a GLTF file will only have one scene, and therefore one root node. However, a GLTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene. .. rst-class:: classref-item-separator @@ -345,9 +350,7 @@ Property Descriptions - void **set_scene_name** **(** :ref:`String` value **)** - :ref:`String` **get_scene_name** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the GLTF file. .. rst-class:: classref-item-separator @@ -423,9 +426,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_animation_player** **(** :ref:`int` idx **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the :ref:`AnimationPlayer` node with the given index. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer` nodes to GLTF animations. .. rst-class:: classref-item-separator @@ -437,9 +438,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_animation_players_count** **(** :ref:`int` idx **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the number of :ref:`AnimationPlayer` nodes in this **GLTFState**. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer` nodes to GLTF animations. .. rst-class:: classref-item-separator @@ -451,9 +450,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_animations** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFAnimation`\ s in the GLTF file. When importing, these will be generated as animations in an :ref:`AnimationPlayer` node. When exporting, these will be generated from Godot :ref:`AnimationPlayer` nodes. .. rst-class:: classref-item-separator @@ -479,9 +476,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_cameras** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFCamera`\ s in the GLTF file. These are the cameras that the :ref:`GLTFNode.camera` index refers to. .. rst-class:: classref-item-separator @@ -521,9 +516,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_lights** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFLight`\ s in the GLTF file. These are the lights that the :ref:`GLTFNode.light` index refers to. .. rst-class:: classref-item-separator @@ -549,9 +542,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_meshes** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFMesh`\ es in the GLTF file. These are the meshes that the :ref:`GLTFNode.mesh` index refers to. .. rst-class:: classref-item-separator @@ -563,9 +554,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_nodes** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFNode`\ s in the GLTF file. These are the nodes that :ref:`GLTFNode.children` and :ref:`root_nodes` refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes. .. rst-class:: classref-item-separator @@ -577,9 +566,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_scene_node** **(** :ref:`int` idx **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the Godot scene node that corresponds to the same index as the :ref:`GLTFNode` it was generated from. Not every :ref:`GLTFNode` will have a scene node generated, and not every generated scene node will have a corresponding :ref:`GLTFNode`. .. rst-class:: classref-item-separator @@ -591,9 +578,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_skeletons** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFSkeleton`\ s in the GLTF file. These are the skeletons that the :ref:`GLTFNode.skeleton` index refers to. .. rst-class:: classref-item-separator @@ -605,9 +590,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_skins** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of all :ref:`GLTFSkin`\ s in the GLTF file. These are the skins that the :ref:`GLTFNode.skin` index refers to. .. rst-class:: classref-item-separator @@ -645,9 +628,7 @@ Retrieves the array of texture samplers that are used by the textures contained :ref:`String[]` **get_unique_animation_names** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of unique animation names. This is only used during the import process. .. rst-class:: classref-item-separator @@ -659,9 +640,7 @@ Retrieves the array of texture samplers that are used by the textures contained :ref:`String[]` **get_unique_names** **(** **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns an array of unique node names. This is used in both the import process and export process. .. rst-class:: classref-item-separator @@ -701,9 +680,7 @@ The first argument should be the :ref:`GLTFDocumentExtension` animations **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFAnimation`\ s in the state. When importing, these will be generated as animations in an :ref:`AnimationPlayer` node. When exporting, these will be generated from Godot :ref:`AnimationPlayer` nodes. .. rst-class:: classref-item-separator @@ -729,9 +706,7 @@ void **set_buffer_views** **(** :ref:`GLTFBufferView[]` bu void **set_cameras** **(** :ref:`GLTFCamera[]` cameras **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFCamera`\ s in the state. These are the cameras that the :ref:`GLTFNode.camera` index refers to. .. rst-class:: classref-item-separator @@ -771,9 +746,7 @@ void **set_images** **(** :ref:`Texture2D[]` images **)** void **set_lights** **(** :ref:`GLTFLight[]` lights **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFLight`\ s in the state. These are the lights that the :ref:`GLTFNode.light` index refers to. .. rst-class:: classref-item-separator @@ -799,9 +772,7 @@ void **set_materials** **(** :ref:`Material[]` materials **)** void **set_meshes** **(** :ref:`GLTFMesh[]` meshes **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFMesh`\ es in the state. These are the meshes that the :ref:`GLTFNode.mesh` index refers to. .. rst-class:: classref-item-separator @@ -813,9 +784,7 @@ void **set_meshes** **(** :ref:`GLTFMesh[]` meshes **)** void **set_nodes** **(** :ref:`GLTFNode[]` nodes **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFNode`\ s in the state. These are the nodes that :ref:`GLTFNode.children` and :ref:`root_nodes` refer to. Some of the nodes set here may not be generated in the Godot scene, or may generate multiple Godot scene nodes. .. rst-class:: classref-item-separator @@ -827,9 +796,7 @@ void **set_nodes** **(** :ref:`GLTFNode[]` nodes **)** void **set_skeletons** **(** :ref:`GLTFSkeleton[]` skeletons **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFSkeleton`\ s in the state. These are the skeletons that the :ref:`GLTFNode.skeleton` index refers to. .. rst-class:: classref-item-separator @@ -841,9 +808,7 @@ void **set_skeletons** **(** :ref:`GLTFSkeleton[]` skeletons void **set_skins** **(** :ref:`GLTFSkin[]` skins **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the :ref:`GLTFSkin`\ s in the state. These are the skins that the :ref:`GLTFNode.skin` index refers to. .. rst-class:: classref-item-separator @@ -881,9 +846,7 @@ void **set_textures** **(** :ref:`GLTFTexture[]` textures **) void **set_unique_animation_names** **(** :ref:`String[]` unique_animation_names **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the unique animation names in the state. This is only used during the import process. .. rst-class:: classref-item-separator @@ -895,9 +858,7 @@ void **set_unique_animation_names** **(** :ref:`String[]` unique_a void **set_unique_names** **(** :ref:`String[]` unique_names **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the unique node names in the state. This is used in both the import process and export process. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 0940b2e4656..752fb56f360 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -727,8 +727,8 @@ Below is a sample code to help get started: :: func _is_in_input_hotzone(in_node, in_port, mouse_position): - var port_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) - var port_pos : Vector2 = in_node.get_position() + in_node.get_connection_input_position(in_port) - port_size / 2 + var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) + var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_input_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) @@ -750,8 +750,8 @@ Below is a sample code to help get started: :: func _is_in_output_hotzone(in_node, in_port, mouse_position): - var port_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) - var port_pos : Vector2 = in_node.get_position() + in_node.get_connection_output_position(in_port) - port_size / 2 + var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) + var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_output_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index 784a50a297f..40e5af47b9c 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -146,7 +146,7 @@ Theme Properties +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`title_color` | ``Color(0.875, 0.875, 0.875, 1)`` | +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`close_h_offset` | ``22`` | + | :ref:`int` | :ref:`close_h_offset` | ``12`` | +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`close_offset` | ``22`` | +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ @@ -933,7 +933,7 @@ Color of the title text. .. rst-class:: classref-themeproperty -:ref:`int` **close_h_offset** = ``22`` +:ref:`int` **close_h_offset** = ``12`` .. container:: contribute diff --git a/classes/class_hmaccontext.rst b/classes/class_hmaccontext.rst index 0c33cf745b4..045fa308d6c 100644 --- a/classes/class_hmaccontext.rst +++ b/classes/class_hmaccontext.rst @@ -30,11 +30,11 @@ The HMACContext class is useful for advanced HMAC use cases, such as streaming t var ctx = HMACContext.new() func _ready(): - var key = "supersecret".to_utf8() + var key = "supersecret".to_utf8_buffer() var err = ctx.start(HashingContext.HASH_SHA256, key) assert(err == OK) - var msg1 = "this is ".to_utf8() - var msg2 = "super duper secret".to_utf8() + var msg1 = "this is ".to_utf8_buffer() + var msg2 = "super duper secret".to_utf8_buffer() err = ctx.update(msg1) assert(err == OK) err = ctx.update(msg2) @@ -54,11 +54,11 @@ The HMACContext class is useful for advanced HMAC use cases, such as streaming t public override void _Ready() { - byte[] key = "supersecret".ToUtf8(); + byte[] key = "supersecret".ToUtf8Buffer(); Error err = _ctx.Start(HashingContext.HashType.Sha256, key); Debug.Assert(err == Error.Ok); - byte[] msg1 = "this is ".ToUtf8(); - byte[] msg2 = "super duper secret".ToUtf8(); + byte[] msg1 = "this is ".ToUtf8Buffer(); + byte[] msg2 = "super duper secret".ToUtf8Buffer(); err = _ctx.Update(msg1); Debug.Assert(err == Error.Ok); err = _ctx.Update(msg2); diff --git a/classes/class_image.rst b/classes/class_image.rst index bb85bd15085..6c1fab9cb1b 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -671,6 +671,22 @@ Use ETC2 compression. Use BPTC compression. +.. _class_Image_constant_COMPRESS_ASTC: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressMode` **COMPRESS_ASTC** = ``4`` + +Use ASTC compression. + +.. _class_Image_constant_COMPRESS_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompressMode` **COMPRESS_MAX** = ``5`` + +Represents the size of the :ref:`CompressMode` enum. + .. rst-class:: classref-item-separator ---- @@ -934,7 +950,7 @@ Removes the image's mipmaps. Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. -The ``mode`` parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. +The ``source`` parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. For ASTC compression, the ``astc_format`` parameter must be supplied. diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index 9b29941d1ab..98a191b19d4 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -43,7 +43,7 @@ This is because images have to be imported as a :ref:`CompressedTexture2D`. diff --git a/classes/class_input.rst b/classes/class_input.rst index 64a5bac9052..9280134ffe5 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -901,7 +901,7 @@ void **set_custom_mouse_cursor** **(** :ref:`Resource` image, :r Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing ``null`` to the image parameter resets to the system cursor. See :ref:`CursorShape` for the list of shapes. -\ ``image``'s size must be lower than 256×256. +\ ``image``'s size must be lower than or equal to 256×256. To avoid rendering issues, sizes lower than or equal to 128×128 are recommended. \ ``hotspot`` must be within ``image``'s size. diff --git a/classes/class_inputeventfromwindow.rst b/classes/class_inputeventfromwindow.rst index 9ae4dd5fc39..7065219ff08 100644 --- a/classes/class_inputeventfromwindow.rst +++ b/classes/class_inputeventfromwindow.rst @@ -14,9 +14,14 @@ InputEventFromWindow **Inherited By:** :ref:`InputEventScreenDrag`, :ref:`InputEventScreenTouch`, :ref:`InputEventWithModifiers` -.. container:: contribute +Base class for :ref:`Viewport`-based input events. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +InputEventFromWindow represents events specifically received by windows. This includes mouse events, keyboard events in focused windows or touch screen actions. .. rst-class:: classref-reftable-group @@ -50,9 +55,7 @@ Property Descriptions - void **set_window_id** **(** :ref:`int` value **)** - :ref:`int` **get_window_id** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The ID of a :ref:`Window` that received this event. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_inputeventgesture.rst b/classes/class_inputeventgesture.rst index d66d668f6e0..ceb0aa276e5 100644 --- a/classes/class_inputeventgesture.rst +++ b/classes/class_inputeventgesture.rst @@ -16,6 +16,13 @@ InputEventGesture Base class for touch control gestures. +.. rst-class:: classref-introduction-group + +Description +----------- + +InputEventGesture is sent when a user performs a supported gesture on a touch screen. Gestures can't be emulated using mouse, because they typically require multi-touch. + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_inputeventmagnifygesture.rst b/classes/class_inputeventmagnifygesture.rst index 95d092cb125..cb93e7ae582 100644 --- a/classes/class_inputeventmagnifygesture.rst +++ b/classes/class_inputeventmagnifygesture.rst @@ -12,9 +12,14 @@ InputEventMagnifyGesture **Inherits:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +:ref:`InputEvent` that represents a magnifying touch gesture. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Magnify gesture is performed when the user pinches the touch screen. It's typically used for zooming. .. rst-class:: classref-reftable-group @@ -48,9 +53,7 @@ Property Descriptions - void **set_factor** **(** :ref:`float` value **)** - :ref:`float` **get_factor** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The amount (or delta) of the event. This value is higher the faster the gesture is performed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_inputeventpangesture.rst b/classes/class_inputeventpangesture.rst index 2b87cdc7b42..1c58524a15b 100644 --- a/classes/class_inputeventpangesture.rst +++ b/classes/class_inputeventpangesture.rst @@ -12,9 +12,14 @@ InputEventPanGesture **Inherits:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +:ref:`InputEvent` that represents a panning touch gesture. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +Pan gesture is performed when the user swipes the touch screen with two fingers. It's typically used for panning/scrolling. .. rst-class:: classref-reftable-group @@ -48,9 +53,7 @@ Property Descriptions - void **set_delta** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_delta** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Panning amount since last pan event. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_inputeventshortcut.rst b/classes/class_inputeventshortcut.rst index cd043aa6afd..392c478b742 100644 --- a/classes/class_inputeventshortcut.rst +++ b/classes/class_inputeventshortcut.rst @@ -12,9 +12,14 @@ InputEventShortcut **Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +:ref:`InputEvent` that signifies a triggered keyboard :ref:`Shortcut`. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +InputEventShortcut is a special event that can be received in :ref:`Node._unhandled_key_input`. It's typically sent by the editor's Command Palette to trigger actions, but can also be sent manually using :ref:`Viewport.push_unhandled_input`. .. rst-class:: classref-reftable-group @@ -48,9 +53,7 @@ Property Descriptions - void **set_shortcut** **(** :ref:`Shortcut` value **)** - :ref:`Shortcut` **get_shortcut** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The :ref:`Shortcut` represented by this event. Its :ref:`Shortcut.matches_event` method will always return ``true`` for this event. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_int.rst b/classes/class_int.rst index b930c7f14c7..2dda122c1fa 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -10,51 +10,52 @@ int === -Integer built-in type. +Built-in integer Variant type. .. rst-class:: classref-introduction-group Description ----------- -Signed 64-bit integer type. +Signed 64-bit integer type. This means that it can take values from ``-2^63`` to ``2^63 - 1``, i.e. from ``-9223372036854775808`` to ``9223372036854775807``. When it exceeds these bounds, it will wrap around. -It can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854775808, 9223372036854775807]``. Exceeding those bounds will wrap around. +\ **int**\ s can be automatically converted to :ref:`float`\ s when necessary, for example when passing them as arguments in functions. The :ref:`float` will be as close to the original integer as possible. -\ **int** is a :ref:`Variant` type, and will thus be used when assigning an integer value to a :ref:`Variant`. It can also be enforced with the ``: int`` type hint. +Likewise, :ref:`float`\ s can be automatically converted into **int**\ s. This will truncate the :ref:`float`, discarding anything after the floating point. + +\ **Note:** In a boolean context, an **int** will evaluate to ``false`` if it equals ``0``, and to ``true`` otherwise. .. tabs:: .. code-tab:: gdscript - var my_variant = 0 # int, value 0. - my_variant += 4.2 # float, value 4.2. - var my_int: int = 1 # int, value 1. - my_int = 4.2 # int, value 4, the right value is implicitly cast to int. - my_int = int("6.7") # int, value 6, the String is explicitly cast with int. - var max_int = 9223372036854775807 - print(max_int) # 9223372036854775807, OK. - max_int += 1 - print(max_int) # -9223372036854775808, we overflowed and wrapped around. + var x: int = 1 # x is 1 + x = 4.2 # x is 4, because 4.2 gets truncated + var max_int = 9223372036854775807 # Biggest value an int can store + max_int += 1 # max_int is -9223372036854775808, because it wrapped around .. code-tab:: csharp - int myInt = (int)"6.7".ToFloat(); // int, value 6, the String is explicitly cast with int. - // We have to use `long` here, because GDSript's `int` - // is 64 bits long while C#'s `int` is only 32 bits. - long maxInt = 9223372036854775807; - GD.Print(maxInt); // 9223372036854775807, OK. - maxInt++; - GD.Print(maxInt); // -9223372036854775808, we overflowed and wrapped around. + int x = 1; // x is 1 + x = 4.2; // x is 4, because 4.2 gets truncated + // We use long below, because GDScript's int is 64-bit while C#'s int is 32-bit. + long maxLong = 9223372036854775807; // Biggest value a long can store + maxLong++; // maxLong is now -9223372036854775808, because it wrapped around. - // Alternatively, if we used C#'s 32-bit `int` type, the maximum value is much smaller: - int halfInt = 2147483647; - GD.Print(halfInt); // 2147483647, OK. - halfInt++; - GD.Print(halfInt); // -2147483648, we overflowed and wrapped around. + // Alternatively with C#'s 32-bit int type, which has a smaller maximum value. + int maxInt = 2147483647; // Biggest value an int can store + maxInt++; // maxInt is now -2147483648, because it wrapped around + + +In GDScript, you can use the ``0b`` literal for binary representation, the ``0x`` literal for hexadecimal representation, and the ``_`` symbol to separate long numbers and improve readability. + +:: + var x = 0b1001 # x is 9 + var y = 0xF5 # y is 245 + var z = 10_000_000 # z is 10000000 .. rst-class:: classref-reftable-group @@ -179,7 +180,7 @@ Constructor Descriptions :ref:`int` **int** **(** **)** -Constructs a default-initialized **int** set to ``0``. +Constructs an **int** set to ``0``. .. rst-class:: classref-item-separator @@ -199,7 +200,7 @@ Constructs an **int** as a copy of the given **int**. :ref:`int` **int** **(** :ref:`String` from **)** -Converts a :ref:`String` to an **int**, following the same rules as :ref:`String.to_int`. +Constructs a new **int** from a :ref:`String`, following the same rules as :ref:`String.to_int`. .. rst-class:: classref-item-separator @@ -209,7 +210,7 @@ Converts a :ref:`String` to an **int**, following the same rules a :ref:`int` **int** **(** :ref:`bool` from **)** -Cast a :ref:`bool` value to an integer value, ``int(true)`` will be equals to 1 and ``int(false)`` will be equals to 0. +Constructs a new **int** from a :ref:`bool`. ``true`` is converted to ``1`` and ``false`` is converted to ``0``. .. rst-class:: classref-item-separator @@ -219,7 +220,7 @@ Cast a :ref:`bool` value to an integer value, ``int(true)`` will be :ref:`int` **int** **(** :ref:`float` from **)** -Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds ``from`` towards zero), so for example ``int(2.7)`` will be equals to 2, ``int(0.1)`` will be equals to 0 and ``int(-2.7)`` will be equals to -2. This operation is also called truncation. +Constructs a new **int** from a :ref:`float`. This will truncate the :ref:`float`, discarding anything after the floating point. .. rst-class:: classref-section-separator @@ -236,7 +237,7 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is not equivalent to the given :ref:`float`. +Returns ``true`` if the **int** is not equivalent to the :ref:`float`. .. rst-class:: classref-item-separator @@ -248,7 +249,7 @@ Returns ``true`` if this **int** is not equivalent to the given :ref:`float` **operator !=** **(** :ref:`int` right **)** -Returns ``true`` if the integers are not equal. +Returns ``true`` if the **int**\ s are not equal. .. rst-class:: classref-item-separator @@ -260,13 +261,13 @@ Returns ``true`` if the integers are not equal. :ref:`int` **operator %** **(** :ref:`int` right **)** -Returns the remainder after dividing two integers. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Returns the remainder after dividing two **int**\ s. Uses truncated division, which returns a negative number if the dividend is negative. If this is not desired, consider using :ref:`@GlobalScope.posmod`. :: - print(5 % 2) # 1 - print(12 % 4) # 0 - print(-5 % 3) # -2 + print(6 % 2) # Prints 0 + print(11 % 4) # Prints 3 + print(-5 % 3) # Prints -2 .. rst-class:: classref-item-separator @@ -278,21 +279,20 @@ Returns the remainder after dividing two integers. This operation uses truncated :ref:`int` **operator &** **(** :ref:`int` right **)** -Returns the result of bitwise ``AND`` operation for two integers. +Performs the bitwise ``AND`` operation. :: - print(3 & 1) # 1 - print(11 & 3) # 3 + print(0b1100 & 0b1010) # Prints 8 (binary 1000) -It's useful to retrieve binary flags from a variable. +This is useful for retrieving binary flags from a variable. :: - var flags = 5 - # Do something if the first bit is enabled. - if flags & 1: - do_stuff() + var flags = 0b101 + # Check if the first or second bit are enabled. + if flags & 0b011: + do_stuff() # This line will run. .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ It's useful to retrieve binary flags from a variable. :ref:`Color` **operator *** **(** :ref:`Color` right **)** -Multiplies each component of the :ref:`Color` by the given **int**. +Multiplies each component of the :ref:`Color` by the **int**. .. rst-class:: classref-item-separator @@ -316,7 +316,7 @@ Multiplies each component of the :ref:`Color` by the given **int**. :ref:`Quaternion` **operator *** **(** :ref:`Quaternion` right **)** -Multiplies each component of the :ref:`Quaternion` by the given **int**. This operation is not meaningful on its own, but it can be used as a part of a larger expression. +Multiplies each component of the :ref:`Quaternion` by the **int**. This operation is not meaningful on its own, but it can be used as a part of a larger expression. .. rst-class:: classref-item-separator @@ -328,11 +328,11 @@ Multiplies each component of the :ref:`Quaternion` by the give :ref:`Vector2` **operator *** **(** :ref:`Vector2` right **)** -Multiplies each component of the :ref:`Vector2` by the given **int**. +Multiplies each component of the :ref:`Vector2` by the **int**. :: - print(2 * Vector2(1, 1)) # Vector2(2, 2) + print(2 * Vector2(1, 4)) # Prints (2, 8) .. rst-class:: classref-item-separator @@ -344,7 +344,7 @@ Multiplies each component of the :ref:`Vector2` by the given **in :ref:`Vector2i` **operator *** **(** :ref:`Vector2i` right **)** -Multiplies each component of the :ref:`Vector2i` by the given **int**. +Multiplies each component of the :ref:`Vector2i` by the **int**. .. rst-class:: classref-item-separator @@ -356,7 +356,7 @@ Multiplies each component of the :ref:`Vector2i` by the given ** :ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** -Multiplies each component of the :ref:`Vector3` by the given **int**. +Multiplies each component of the :ref:`Vector3` by the **int**. .. rst-class:: classref-item-separator @@ -368,7 +368,7 @@ Multiplies each component of the :ref:`Vector3` by the given **in :ref:`Vector3i` **operator *** **(** :ref:`Vector3i` right **)** -Multiplies each component of the :ref:`Vector3i` by the given **int**. +Multiplies each component of the :ref:`Vector3i` by the **int**. .. rst-class:: classref-item-separator @@ -380,7 +380,7 @@ Multiplies each component of the :ref:`Vector3i` by the given ** :ref:`Vector4` **operator *** **(** :ref:`Vector4` right **)** -Multiplies each component of the :ref:`Vector4` by the given **int**. +Multiplies each component of the :ref:`Vector4` by the **int**. .. rst-class:: classref-item-separator @@ -392,7 +392,7 @@ Multiplies each component of the :ref:`Vector4` by the given **in :ref:`Vector4i` **operator *** **(** :ref:`Vector4i` right **)** -Multiplies each component of the :ref:`Vector4i` by the given **int**. +Multiplies each component of the :ref:`Vector4i` by the **int**. .. rst-class:: classref-item-separator @@ -404,7 +404,7 @@ Multiplies each component of the :ref:`Vector4i` by the given ** :ref:`float` **operator *** **(** :ref:`float` right **)** -Multiplies an **int** and a :ref:`float`. The result is a :ref:`float`. +Multiplies the :ref:`float` by the **int**. The result is a :ref:`float`. .. rst-class:: classref-item-separator @@ -416,7 +416,7 @@ Multiplies an **int** and a :ref:`float`. The result is a :ref:`flo :ref:`int` **operator *** **(** :ref:`int` right **)** -Multiplies two **int**\ s. +Multiplies the two **int**\ s. .. rst-class:: classref-item-separator @@ -432,7 +432,7 @@ Raises an **int** to a power of a :ref:`float`. The result is a :re :: - print(8**0.25) # 1.68179283050743 + print(2 ** 0.5) # Prints 1.4142135623731 .. rst-class:: classref-item-separator @@ -444,11 +444,11 @@ Raises an **int** to a power of a :ref:`float`. The result is a :re :ref:`int` **operator **** **(** :ref:`int` right **)** -Raises an **int** to a power of a **int**. +Raises the left **int** to a power of the right **int**. :: - print(5**5) # 3125 + print(3 ** 4) # Prints 81 .. rst-class:: classref-item-separator @@ -460,7 +460,7 @@ Raises an **int** to a power of a **int**. :ref:`float` **operator +** **(** :ref:`float` right **)** -Adds an **int** and a :ref:`float`. The result is a :ref:`float`. +Adds the **int** and the :ref:`float`. The result is a :ref:`float`. .. rst-class:: classref-item-separator @@ -472,7 +472,7 @@ Adds an **int** and a :ref:`float`. The result is a :ref:`float` **operator +** **(** :ref:`int` right **)** -Adds two integers. +Adds the two **int**\ s. .. rst-class:: classref-item-separator @@ -484,7 +484,7 @@ Adds two integers. :ref:`float` **operator -** **(** :ref:`float` right **)** -Subtracts a :ref:`float` from an **int**. The result is a :ref:`float`. +Subtracts the :ref:`float` from the **int**. The result is a :ref:`float`. .. rst-class:: classref-item-separator @@ -496,7 +496,7 @@ Subtracts a :ref:`float` from an **int**. The result is a :ref:`flo :ref:`int` **operator -** **(** :ref:`int` right **)** -Subtracts two integers. +Subtracts the two **int**\ s. .. rst-class:: classref-item-separator @@ -508,11 +508,11 @@ Subtracts two integers. :ref:`float` **operator /** **(** :ref:`float` right **)** -Divides an **int** by a :ref:`float`. The result is a :ref:`float`. +Divides the **int** by the :ref:`float`. The result is a :ref:`float`. :: - print(10 / 3.0) # 3.333... + print(10 / 3.0) # Prints 3.33333333333333 .. rst-class:: classref-item-separator @@ -524,12 +524,12 @@ Divides an **int** by a :ref:`float`. The result is a :ref:`float` **operator /** **(** :ref:`int` right **)** -Divides two integers. The decimal part of the result is discarded (truncated). +Divides the two **int**\ s. The result is an **int**. This will truncate the :ref:`float`, discarding anything after the floating point. :: - print(10 / 2) # 5 - print(10 / 3) # 3 + print(6 / 2) # Prints 3 + print(5 / 3) # Prints 1 .. rst-class:: classref-item-separator @@ -541,7 +541,7 @@ Divides two integers. The decimal part of the result is discarded (truncated). :ref:`bool` **operator <** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is less than the given :ref:`float`. +Returns ``true`` if the **int** is less than the :ref:`float`. .. rst-class:: classref-item-separator @@ -553,7 +553,7 @@ Returns ``true`` if this **int** is less than the given :ref:`float :ref:`bool` **operator <** **(** :ref:`int` right **)** -Returns ``true`` if the left integer is less than the right one. +Returns ``true`` if the left **int** is less than the right **int**. .. rst-class:: classref-item-separator @@ -565,12 +565,12 @@ Returns ``true`` if the left integer is less than the right one. :ref:`int` **operator <<** **(** :ref:`int` right **)** -Performs bitwise shift left operation on the integer. Effectively the same as multiplying by a power of 2. +Performs the bitwise shift left operation. Effectively the same as multiplying by a power of 2. :: - print(10 << 1) # 20 - print(10 << 4) # 160 + print(0b1010 << 1) # Prints 20 (binary 10100) + print(0b1010 << 3) # Prints 80 (binary 1010000) .. rst-class:: classref-item-separator @@ -582,7 +582,7 @@ Performs bitwise shift left operation on the integer. Effectively the same as mu :ref:`bool` **operator <=** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is less than or equal to the given :ref:`float`. +Returns ``true`` if the **int** is less than or equal to the :ref:`float`. .. rst-class:: classref-item-separator @@ -594,7 +594,7 @@ Returns ``true`` if this **int** is less than or equal to the given :ref:`float< :ref:`bool` **operator <=** **(** :ref:`int` right **)** -Returns ``true`` if the left integer is less than or equal to the right one. +Returns ``true`` if the left **int** is less than or equal to the right **int**. .. rst-class:: classref-item-separator @@ -606,7 +606,7 @@ Returns ``true`` if the left integer is less than or equal to the right one. :ref:`bool` **operator ==** **(** :ref:`float` right **)** -Returns ``true`` if the integer is equal to the given :ref:`float`. +Returns ``true`` if the **int** is equal to the :ref:`float`. .. rst-class:: classref-item-separator @@ -618,7 +618,7 @@ Returns ``true`` if the integer is equal to the given :ref:`float`. :ref:`bool` **operator ==** **(** :ref:`int` right **)** -Returns ``true`` if both integers are equal. +Returns ``true`` if the two **int**\ s are equal. .. rst-class:: classref-item-separator @@ -630,7 +630,7 @@ Returns ``true`` if both integers are equal. :ref:`bool` **operator >** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is greater than the given :ref:`float`. +Returns ``true`` if the **int** is greater than the :ref:`float`. .. rst-class:: classref-item-separator @@ -642,7 +642,7 @@ Returns ``true`` if this **int** is greater than the given :ref:`float` **operator >** **(** :ref:`int` right **)** -Returns ``true`` if the left integer is greater than the right one. +Returns ``true`` if the left **int** is greater than the right **int**. .. rst-class:: classref-item-separator @@ -654,7 +654,7 @@ Returns ``true`` if the left integer is greater than the right one. :ref:`bool` **operator >=** **(** :ref:`float` right **)** -Returns ``true`` if this **int** is greater than or equal to the given :ref:`float`. +Returns ``true`` if the **int** is greater than or equal to the :ref:`float`. .. rst-class:: classref-item-separator @@ -666,7 +666,7 @@ Returns ``true`` if this **int** is greater than or equal to the given :ref:`flo :ref:`bool` **operator >=** **(** :ref:`int` right **)** -Returns ``true`` if the left integer is greater than or equal to the right one. +Returns ``true`` if the left **int** is greater than or equal to the right **int**. .. rst-class:: classref-item-separator @@ -678,12 +678,12 @@ Returns ``true`` if the left integer is greater than or equal to the right one. :ref:`int` **operator >>** **(** :ref:`int` right **)** -Performs bitwise shift right operation on the integer. Effectively the same as dividing by a power of 2. +Performs the bitwise shift right operation. Effectively the same as dividing by a power of 2. :: - print(10 >> 1) # 5 - print(10 >> 2) # 2 + print(0b1010 >> 1) # Prints 5 (binary 101) + print(0b1010 >> 2) # Prints 2 (binary 10) .. rst-class:: classref-item-separator @@ -695,12 +695,11 @@ Performs bitwise shift right operation on the integer. Effectively the same as d :ref:`int` **operator ^** **(** :ref:`int` right **)** -Returns the result of bitwise ``XOR`` operation for two integers. +Performs the bitwise ``XOR`` operation. :: - print(5 ^ 1) # 4 - print(4 ^ 7) # 3 + print(0b1100 ^ 0b1010) # Prints 6 (binary 110) .. rst-class:: classref-item-separator @@ -736,21 +735,18 @@ Returns the negated value of the **int**. If positive, turns the number negative :ref:`int` **operator |** **(** :ref:`int` right **)** -Returns the result of bitwise ``OR`` operation for two integers. +Performs the bitwise ``OR`` operation. :: - print(2 | 4) # 6 - print(1 | 3) # 3 + print(0b1100 | 0b1010) # Prints 14 (binary 1110) -It's useful to store binary flags in a variable. +This is useful for storing binary flags in a variable. :: var flags = 0 - # Turn first and third bit on. - flags |= 1 - flags |= 4 + flags |= 0b101 # Turn the first and third bits on. .. rst-class:: classref-item-separator @@ -762,12 +758,12 @@ It's useful to store binary flags in a variable. :ref:`int` **operator ~** **(** **)** -Returns the result of bitwise ``NOT`` operation for the integer. It's effectively equal to ``-int + 1``. +Performs the bitwise ``NOT`` operation on the **int**. Due to `2's complement `__, it's effectively equal to ``-(int + 1)``. :: - print(~4) # -3 - print(~7) # -6 + print(~4) # Prints -5 + print(~(-7)) # Prints 6 .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 0d5263dc8ed..6d2de4853b4 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -176,6 +176,8 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_color` | ``Color(0.65, 0.65, 0.65, 1)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_hovered_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | @@ -202,6 +204,8 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`StyleBox` | :ref:`focus` | | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`hovered` | | + +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`StyleBox` | :ref:`panel` | | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`StyleBox` | :ref:`selected` | | @@ -1127,6 +1131,18 @@ Default text :ref:`Color` of the item. ---- +.. _class_ItemList_theme_color_font_hovered_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` + +Text :ref:`Color` used when the item is hovered and not selected yet. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_theme_color_font_outline_color: .. rst-class:: classref-themeproperty @@ -1285,6 +1301,18 @@ The focused style for the **ItemList**, drawn on top of the background, but belo ---- +.. _class_ItemList_theme_style_hovered: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hovered** + +:ref:`StyleBox` for the hovered, but not selected items. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_theme_style_panel: .. rst-class:: classref-themeproperty diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 2691cedd5bc..5606ee041bc 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -158,6 +158,8 @@ Methods +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_scroll_offset` **(** **)** |const| | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_text` **(** **)** | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_selection_from_column` **(** **)** |const| | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_selection_to_column` **(** **)** |const| | @@ -640,7 +642,7 @@ Text alignment as defined in the :ref:`HorizontalAlignment` value **)** - :ref:`bool` **is_caret_blink_enabled** **(** **)** -If ``true``, the caret (text cursor) blinks. +If ``true``, makes the caret blink. .. rst-class:: classref-item-separator @@ -657,7 +659,7 @@ If ``true``, the caret (text cursor) blinks. - void **set_caret_blink_interval** **(** :ref:`float` value **)** - :ref:`float` **get_caret_blink_interval** **(** **)** -Duration (in seconds) of a caret's blinking cycle. +The interval at which the caret blinks (in seconds). .. rst-class:: classref-item-separator @@ -1264,6 +1266,18 @@ Returns the scroll offset due to :ref:`caret_column` **get_selected_text** **(** **)** + +Returns the text inside the selection. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_method_get_selection_from_column: .. rst-class:: classref-method diff --git a/classes/class_meshconvexdecompositionsettings.rst b/classes/class_meshconvexdecompositionsettings.rst new file mode 100644 index 00000000000..e599c209dc3 --- /dev/null +++ b/classes/class_meshconvexdecompositionsettings.rst @@ -0,0 +1,322 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/MeshConvexDecompositionSettings.xml. + +.. _class_MeshConvexDecompositionSettings: + +MeshConvexDecompositionSettings +=============================== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Parameters to be used with a :ref:`Mesh` convex decomposition operation. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Parameters to be used with a :ref:`Mesh` convex decomposition operation. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`convex_hull_approximation` | ``true`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`convex_hull_downsampling` | ``4`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`max_concavity` | ``1.0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`max_convex_hulls` | ``1`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`max_num_vertices_per_convex_hull` | ``32`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`min_volume_per_convex_hull` | ``0.0001`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`Mode` | :ref:`mode` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`normalize_mesh` | ``false`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`plane_downsampling` | ``4`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`project_hull_vertices` | ``true`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`resolution` | ``10000`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`revolution_axes_clipping_bias` | ``0.05`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`symmetry_planes_clipping_bias` | ``0.05`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_MeshConvexDecompositionSettings_Mode: + +.. rst-class:: classref-enumeration + +enum **Mode**: + +.. _class_MeshConvexDecompositionSettings_constant_CONVEX_DECOMPOSITION_MODE_VOXEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **CONVEX_DECOMPOSITION_MODE_VOXEL** = ``0`` + +Constant for voxel-based approximate convex decomposition. + +.. _class_MeshConvexDecompositionSettings_constant_CONVEX_DECOMPOSITION_MODE_TETRAHEDRON: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode` **CONVEX_DECOMPOSITION_MODE_TETRAHEDRON** = ``1`` + +Constant for tetrahedron-based approximate convex decomposition. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_MeshConvexDecompositionSettings_property_convex_hull_approximation: + +.. rst-class:: classref-property + +:ref:`bool` **convex_hull_approximation** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_convex_hull_approximation** **(** :ref:`bool` value **)** +- :ref:`bool` **get_convex_hull_approximation** **(** **)** + +If enabled uses approximation for computing convex hulls. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_convex_hull_downsampling: + +.. rst-class:: classref-property + +:ref:`int` **convex_hull_downsampling** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_convex_hull_downsampling** **(** :ref:`int` value **)** +- :ref:`int` **get_convex_hull_downsampling** **(** **)** + +Controls the precision of the convex-hull generation process during the clipping plane selection stage. Ranges from ``1`` to ``16``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_max_concavity: + +.. rst-class:: classref-property + +:ref:`float` **max_concavity** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_max_concavity** **(** :ref:`float` value **)** +- :ref:`float` **get_max_concavity** **(** **)** + +Maximum concavity. Ranges from ``0.0`` to ``1.0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_max_convex_hulls: + +.. rst-class:: classref-property + +:ref:`int` **max_convex_hulls** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_max_convex_hulls** **(** :ref:`int` value **)** +- :ref:`int` **get_max_convex_hulls** **(** **)** + +The maximum number of convex hulls to produce from the merge operation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_max_num_vertices_per_convex_hull: + +.. rst-class:: classref-property + +:ref:`int` **max_num_vertices_per_convex_hull** = ``32`` + +.. rst-class:: classref-property-setget + +- void **set_max_num_vertices_per_convex_hull** **(** :ref:`int` value **)** +- :ref:`int` **get_max_num_vertices_per_convex_hull** **(** **)** + +Controls the maximum number of triangles per convex-hull. Ranges from ``4`` to ``1024``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_min_volume_per_convex_hull: + +.. rst-class:: classref-property + +:ref:`float` **min_volume_per_convex_hull** = ``0.0001`` + +.. rst-class:: classref-property-setget + +- void **set_min_volume_per_convex_hull** **(** :ref:`float` value **)** +- :ref:`float` **get_min_volume_per_convex_hull** **(** **)** + +Controls the adaptive sampling of the generated convex-hulls. Ranges from ``0.0`` to ``0.01``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_mode: + +.. rst-class:: classref-property + +:ref:`Mode` **mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_mode** **(** :ref:`Mode` value **)** +- :ref:`Mode` **get_mode** **(** **)** + +Mode for the approximate convex decomposition. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_normalize_mesh: + +.. rst-class:: classref-property + +:ref:`bool` **normalize_mesh** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_normalize_mesh** **(** :ref:`bool` value **)** +- :ref:`bool` **get_normalize_mesh** **(** **)** + +If enabled normalizes the mesh before applying the convex decomposition. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_plane_downsampling: + +.. rst-class:: classref-property + +:ref:`int` **plane_downsampling** = ``4`` + +.. rst-class:: classref-property-setget + +- void **set_plane_downsampling** **(** :ref:`int` value **)** +- :ref:`int` **get_plane_downsampling** **(** **)** + +Controls the granularity of the search for the "best" clipping plane. Ranges from ``1`` to ``16``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_project_hull_vertices: + +.. rst-class:: classref-property + +:ref:`bool` **project_hull_vertices** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_project_hull_vertices** **(** :ref:`bool` value **)** +- :ref:`bool` **get_project_hull_vertices** **(** **)** + +If enabled projects output convex hull vertices onto original source mesh to increase floating point accuracy of the results. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_resolution: + +.. rst-class:: classref-property + +:ref:`int` **resolution** = ``10000`` + +.. rst-class:: classref-property-setget + +- void **set_resolution** **(** :ref:`int` value **)** +- :ref:`int` **get_resolution** **(** **)** + +Maximum number of voxels generated during the voxelization stage. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_revolution_axes_clipping_bias: + +.. rst-class:: classref-property + +:ref:`float` **revolution_axes_clipping_bias** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_revolution_axes_clipping_bias** **(** :ref:`float` value **)** +- :ref:`float` **get_revolution_axes_clipping_bias** **(** **)** + +Controls the bias toward clipping along revolution axes. Ranges from ``0.0`` to ``1.0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshConvexDecompositionSettings_property_symmetry_planes_clipping_bias: + +.. rst-class:: classref-property + +:ref:`float` **symmetry_planes_clipping_bias** = ``0.05`` + +.. rst-class:: classref-property-setget + +- void **set_symmetry_planes_clipping_bias** **(** :ref:`float` value **)** +- :ref:`float` **get_symmetry_planes_clipping_bias** **(** **)** + +Controls the bias toward clipping along symmetry planes. Ranges from ``0.0`` to ``1.0``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_meshinstance3d.rst b/classes/class_meshinstance3d.rst index 2d674074498..58d503f1f88 100644 --- a/classes/class_meshinstance3d.rst +++ b/classes/class_meshinstance3d.rst @@ -60,31 +60,31 @@ Methods .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_convex_collision` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_debug_tangents` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_multiple_convex_collisions` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_trimesh_collision` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`find_blend_shape_by_name` **(** :ref:`StringName` name **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material` | :ref:`get_active_material` **(** :ref:`int` surface **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_blend_shape_count` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_blend_shape_value` **(** :ref:`int` blend_shape_idx **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material` | :ref:`get_surface_override_material` **(** :ref:`int` surface **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_surface_override_material_count` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_shape_value` **(** :ref:`int` blend_shape_idx, :ref:`float` value **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_surface_override_material` **(** :ref:`int` surface, :ref:`Material` material **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_convex_collision` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_debug_tangents` **(** **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_multiple_convex_collisions` **(** :ref:`MeshConvexDecompositionSettings` settings=null **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_trimesh_collision` **(** **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_blend_shape_by_name` **(** :ref:`StringName` name **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_active_material` **(** :ref:`int` surface **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_blend_shape_count` **(** **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_blend_shape_value` **(** :ref:`int` blend_shape_idx **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`get_surface_override_material` **(** :ref:`int` surface **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_surface_override_material_count` **(** **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_blend_shape_value` **(** :ref:`int` blend_shape_idx, :ref:`float` value **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_surface_override_material` **(** :ref:`int` surface, :ref:`Material` material **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -183,9 +183,9 @@ This helper creates a **MeshInstance3D** child node with gizmos at every vertex .. rst-class:: classref-method -void **create_multiple_convex_collisions** **(** **)** +void **create_multiple_convex_collisions** **(** :ref:`MeshConvexDecompositionSettings` settings=null **)** -This helper creates a :ref:`StaticBody3D` child node with multiple :ref:`ConvexPolygonShape3D` collision shapes calculated from the mesh geometry via convex decomposition. It's mainly used for testing. +This helper creates a :ref:`StaticBody3D` child node with multiple :ref:`ConvexPolygonShape3D` collision shapes calculated from the mesh geometry via convex decomposition. The convex decomposition operation can be controlled with parameters from the optional ``settings``. .. rst-class:: classref-item-separator diff --git a/classes/class_multiplayerpeerextension.rst b/classes/class_multiplayerpeerextension.rst index 8da8e70399e..9aa48ea6f95 100644 --- a/classes/class_multiplayerpeerextension.rst +++ b/classes/class_multiplayerpeerextension.rst @@ -42,6 +42,10 @@ Methods +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_packet_channel` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransferMode` | :ref:`_get_packet_mode` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_packet_peer` **(** **)** |virtual| |const| | +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`_get_packet_script` **(** **)** |virtual| | @@ -56,6 +60,8 @@ Methods +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_server` **(** **)** |virtual| |const| | +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_server_relay_supported` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_poll` **(** **)** |virtual| | +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | @@ -152,6 +158,30 @@ Called when a packet needs to be received by the :ref:`MultiplayerAPI` **_get_packet_channel** **(** **)** |virtual| |const| + +Called to get the channel over which the next available packet was received. See :ref:`MultiplayerPeer.get_packet_channel`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MultiplayerPeerExtension_method__get_packet_mode: + +.. rst-class:: classref-method + +:ref:`TransferMode` **_get_packet_mode** **(** **)** |virtual| |const| + +Called to get the :ref:`TransferMode` the remote peer used to send the next available packet. See :ref:`MultiplayerPeer.get_packet_mode`. + +.. rst-class:: classref-item-separator + +---- + .. _class_MultiplayerPeerExtension_method__get_packet_peer: .. rst-class:: classref-method @@ -206,7 +236,7 @@ Called when the transfer mode to use is read on this :ref:`MultiplayerPeer` **_get_unique_id** **(** **)** |virtual| |const| -Called when the unique ID of this :ref:`MultiplayerPeer` is requested (see :ref:`MultiplayerPeer.get_unique_id`). +Called when the unique ID of this :ref:`MultiplayerPeer` is requested (see :ref:`MultiplayerPeer.get_unique_id`). The value must be between ``1`` and ``2147483647``. .. rst-class:: classref-item-separator @@ -236,6 +266,18 @@ Called when the "is server" status is requested on the :ref:`MultiplayerAPI` **_is_server_relay_supported** **(** **)** |virtual| |const| + +Called to check if the server can act as a relay in the current configuration. See :ref:`MultiplayerPeer.is_server_relay_supported`. + +.. rst-class:: classref-item-separator + +---- + .. _class_MultiplayerPeerExtension_method__poll: .. rst-class:: classref-method diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index 738501d32a1..eb5bc498b88 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -38,41 +38,45 @@ Properties .. table:: :widths: auto - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`debug_enabled` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`debug_path_custom_color` | ``Color(1, 1, 1, 1)`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`debug_path_custom_line_width` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`debug_path_custom_point_size` | ``4.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`debug_use_custom` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`max_neighbors` | ``10`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`max_speed` | ``100.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`navigation_layers` | ``1`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`neighbor_distance` | ``500.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`path_desired_distance` | ``20.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`path_max_distance` | ``100.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`radius` | ``10.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`target_desired_distance` | ``10.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 0)`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`time_horizon` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`debug_enabled` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`debug_path_custom_color` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`debug_path_custom_line_width` | ``-1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`debug_path_custom_point_size` | ``4.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`debug_use_custom` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`max_neighbors` | ``10`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`max_speed` | ``100.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`neighbor_distance` | ``500.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`path_desired_distance` | ``20.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`path_max_distance` | ``100.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`radius` | ``10.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`target_desired_distance` | ``10.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`target_position` | ``Vector2(0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`time_horizon` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group @@ -191,7 +195,7 @@ Notifies when the player-defined :ref:`target_position` safe_velocity **)** -Notifies when the collision avoidance velocity is calculated. Emitted by :ref:`set_velocity`. Only emitted when :ref:`avoidance_enabled` is true. +Notifies when the collision avoidance velocity is calculated. Emitted at the end of the physics frame in which :ref:`set_velocity` is called. Only emitted when :ref:`avoidance_enabled` is true. .. rst-class:: classref-item-separator @@ -279,7 +283,7 @@ If :ref:`debug_use_custom` is .. rst-class:: classref-property -:ref:`float` **debug_path_custom_line_width** = ``1.0`` +:ref:`float` **debug_path_custom_line_width** = ``-1.0`` .. rst-class:: classref-property-setget @@ -445,6 +449,40 @@ Additional information to return with the navigation path. ---- +.. _class_NavigationAgent2D_property_path_postprocessing: + +.. rst-class:: classref-property + +:ref:`PathPostProcessing` **path_postprocessing** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_path_postprocessing** **(** :ref:`PathPostProcessing` value **)** +- :ref:`PathPostProcessing` **get_path_postprocessing** **(** **)** + +The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_property_pathfinding_algorithm: + +.. rst-class:: classref-property + +:ref:`PathfindingAlgorithm` **pathfinding_algorithm** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm` value **)** +- :ref:`PathfindingAlgorithm` **get_pathfinding_algorithm** **(** **)** + +The pathfinding algorithm used in the path query. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent2D_property_radius: .. rst-class:: classref-property diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index 2487aa999ae..7e1166bcdc9 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -38,43 +38,47 @@ Properties .. table:: :widths: auto - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`agent_height_offset` | ``0.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`debug_enabled` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`debug_path_custom_color` | ``Color(1, 1, 1, 1)`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`debug_path_custom_point_size` | ``4.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`debug_use_custom` | ``false`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`ignore_y` | ``true`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`max_neighbors` | ``10`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`max_speed` | ``10.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`navigation_layers` | ``1`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`neighbor_distance` | ``50.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`path_max_distance` | ``5.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`radius` | ``0.5`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, 0, 0)`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`time_horizon` | ``1.0`` | - +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`agent_height_offset` | ``0.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`debug_enabled` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`debug_path_custom_color` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`debug_path_custom_point_size` | ``4.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`debug_use_custom` | ``false`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`ignore_y` | ``true`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`max_neighbors` | ``10`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`max_speed` | ``10.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`neighbor_distance` | ``50.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`path_max_distance` | ``5.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PathfindingAlgorithm` | :ref:`pathfinding_algorithm` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector3` | :ref:`target_position` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`time_horizon` | ``1.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group @@ -193,7 +197,7 @@ Notifies when the player-defined :ref:`target_position` safe_velocity **)** -Notifies when the collision avoidance velocity is calculated. Emitted by :ref:`set_velocity`. Only emitted when :ref:`avoidance_enabled` is true. +Notifies when the collision avoidance velocity is calculated. Emitted at the end of the physics frame in which :ref:`set_velocity` is called. Only emitted when :ref:`avoidance_enabled` is true. .. rst-class:: classref-item-separator @@ -390,7 +394,7 @@ The maximum speed that an agent can move. - void **set_navigation_layers** **(** :ref:`int` value **)** - :ref:`int` **get_navigation_layers** **(** **)** -A bitfield determining what navigation layers of navigation regions this NavigationAgent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers. +A bitfield determining what navigation layers of navigation regions this agent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers. .. rst-class:: classref-item-separator @@ -464,6 +468,40 @@ Additional information to return with the navigation path. ---- +.. _class_NavigationAgent3D_property_path_postprocessing: + +.. rst-class:: classref-property + +:ref:`PathPostProcessing` **path_postprocessing** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_path_postprocessing** **(** :ref:`PathPostProcessing` value **)** +- :ref:`PathPostProcessing` **get_path_postprocessing** **(** **)** + +The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_pathfinding_algorithm: + +.. rst-class:: classref-property + +:ref:`PathfindingAlgorithm` **pathfinding_algorithm** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm` value **)** +- :ref:`PathfindingAlgorithm` **get_pathfinding_algorithm** **(** **)** + +The pathfinding algorithm used in the path query. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_property_radius: .. rst-class:: classref-property diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index 2e22c032938..1d34eecbc6a 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -31,7 +31,7 @@ You may assign navigation layers to regions with :ref:`region_set_navigation_lay To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. -\ **Note:** The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. +\ **Note:** The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing an agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. diff --git a/classes/class_node.rst b/classes/class_node.rst index c024c1912b4..157d2b0e723 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -12,7 +12,7 @@ Node **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AnimationPlayer`, :ref:`AnimationTree`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorInterface`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MissingNode`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`NavigationObstacle2D`, :ref:`NavigationObstacle3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`SkeletonIK3D`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` +**Inherited By:** :ref:`AnimationPlayer`, :ref:`AnimationTree`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MissingNode`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`NavigationObstacle2D`, :ref:`NavigationObstacle3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`SkeletonIK3D`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` Base class for all *scene* objects. @@ -291,6 +291,18 @@ When this signal is received, the child ``node`` is still in the tree and valid. ---- +.. _class_Node_signal_child_order_changed: + +.. rst-class:: classref-signal + +**child_order_changed** **(** **)** + +Emitted when the list of children is changed. This happens when child nodes are added, moved or removed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_signal_ready: .. rst-class:: classref-signal @@ -519,7 +531,7 @@ This notification is emitted *after* the related :ref:`tree_exiting` instead. .. _class_Node_constant_NOTIFICATION_READY: @@ -617,6 +629,14 @@ Use :ref:`Viewport.gui_is_drag_successful` when the warnings need to be updated for this node. +:: + + @export var energy = 0: + set(value): + energy = value + update_configuration_warnings() + + func _get_configuration_warnings(): + if energy < 0: + return ["Energy must be 0 or greater."] + else: + return [] + .. rst-class:: classref-item-separator ---- @@ -1212,7 +1245,7 @@ Adds a child ``node``. Nodes can have any number of children, but every child mu If ``force_readable_name`` is ``true``, improves the readability of the added ``node``. If not named, the ``node`` is renamed to its type, and if it shares :ref:`name` with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to ``false``, which assigns a dummy name featuring ``@`` in both situations. -If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED`, the child will be added as internal node. Such nodes are ignored by methods like :ref:`get_children`, unless their parameter ``include_internal`` is ``true``.The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. :ref:`ColorPicker`. See :ref:`InternalMode` for available modes. +If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED`, the child will be added as internal node. Such nodes are ignored by methods like :ref:`get_children`, unless their parameter ``include_internal`` is ``true``. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. :ref:`ColorPicker`. See :ref:`InternalMode` for available modes. \ **Note:** If the child node already has a parent, the function will fail. Use :ref:`remove_child` first to remove the node from its current parent. For example: @@ -1312,6 +1345,8 @@ Creates a new :ref:`Tween` and binds it to this node. This is equiv +The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode`). + .. rst-class:: classref-item-separator ---- @@ -1338,7 +1373,7 @@ You can fine-tune the behavior using the ``flags`` (see :ref:`DuplicateFlags` **find_child** **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| -Finds the first descendant of this node whose name matches ``pattern`` as in :ref:`String.match`. +Finds the first descendant of this node whose name matches ``pattern`` as in :ref:`String.match`. Internal children are also searched over (see ``internal`` parameter in :ref:`add_child`). \ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). @@ -1362,7 +1397,7 @@ Returns ``null`` if no matching **Node** is found. :ref:`Node[]` **find_children** **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| -Finds descendants of this node whose name matches ``pattern`` as in :ref:`String.match`, and/or type matches ``type`` as in :ref:`Object.is_class`. +Finds descendants of this node whose name matches ``pattern`` as in :ref:`String.match`, and/or type matches ``type`` as in :ref:`Object.is_class`. Internal children are also searched over (see ``internal`` parameter in :ref:`add_child`). \ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). diff --git a/classes/class_node3d.rst b/classes/class_node3d.rst index cc0b8426d85..af9606c3be2 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -198,7 +198,7 @@ enum **RotationEditMode**: :ref:`RotationEditMode` **ROTATION_EDIT_MODE_EULER** = ``0`` - +The rotation is edited using :ref:`Vector3` Euler angles. .. _class_Node3D_constant_ROTATION_EDIT_MODE_QUATERNION: @@ -206,7 +206,7 @@ enum **RotationEditMode**: :ref:`RotationEditMode` **ROTATION_EDIT_MODE_QUATERNION** = ``1`` - +The rotation is edited using a :ref:`Quaternion`. .. _class_Node3D_constant_ROTATION_EDIT_MODE_BASIS: @@ -214,7 +214,7 @@ enum **RotationEditMode**: :ref:`RotationEditMode` **ROTATION_EDIT_MODE_BASIS** = ``2`` - +The rotation is edited using a :ref:`Basis`. In this mode, :ref:`scale` can't be edited separately. .. rst-class:: classref-section-separator diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index 8238fd1b696..65d9e7fee7b 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -297,7 +297,7 @@ For example, ``"Path2D/PathFollow2D/Sprite2D"`` has 3 names. :ref:`StringName` **get_subname** **(** :ref:`int` idx **)** |const| -Gets the resource or property name indicated by ``idx`` (0 to :ref:`get_subname_count`). +Gets the resource or property name indicated by ``idx`` (0 to :ref:`get_subname_count` - 1). .. tabs:: diff --git a/classes/class_object.rst b/classes/class_object.rst index 54ff310e4ff..ddcb18806bd 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -10,7 +10,7 @@ Object ====== -**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorUndoRedoManager`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer2DManager`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DManager`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`WorkerThreadPool`, :ref:`XRServer` +**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorInterface`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorUndoRedoManager`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer2DManager`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DManager`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`WorkerThreadPool`, :ref:`XRServer` Base class for all other classes in the engine. @@ -1200,7 +1200,7 @@ Returns ``true`` if a metadata entry is found with the given ``name``. See also :ref:`bool` **has_method** **(** :ref:`StringName` method **)** |const| -Returns ``true`` if the the given ``method`` name exists in the object. +Returns ``true`` if the given ``method`` name exists in the object. \ **Note:** In C#, ``method`` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the ``MethodName`` class to avoid allocating a new :ref:`StringName` on each call. diff --git a/classes/class_openxraction.rst b/classes/class_openxraction.rst index 88caa6fa895..54ad62752c4 100644 --- a/classes/class_openxraction.rst +++ b/classes/class_openxraction.rst @@ -80,7 +80,7 @@ This action provides a float value between ``0.0`` and ``1.0`` for any analog in :ref:`ActionType` **OPENXR_ACTION_VECTOR2** = ``2`` -This action provides a vector2 value and can be bound to embedded trackpads and joysticks +This action provides a :ref:`Vector2` value and can be bound to embedded trackpads and joysticks. .. _class_OpenXRAction_constant_OPENXR_ACTION_POSE: diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index d8baf219065..b8178cf599d 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -38,9 +38,11 @@ Properties .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`display_refresh_rate` | ``0.0`` | - +---------------------------+----------------------------------------------------------------------------------+---------+ + +---------------------------+----------------------------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`display_refresh_rate` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`render_target_size_multiplier` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+---------+ .. rst-class:: classref-reftable-group @@ -147,6 +149,23 @@ Property Descriptions The display refresh rate for the current HMD. Only functional if this feature is supported by the OpenXR runtime and after the interface has been initialized. +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_property_render_target_size_multiplier: + +.. rst-class:: classref-property + +:ref:`float` **render_target_size_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_render_target_size_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_render_target_size_multiplier** **(** **)** + +The render size multiplier for the current HMD. Must be set before the interface has been initialized. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 98804436afa..d2c5516ccfc 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -38,6 +38,8 @@ Properties +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment` | alignment | ``0`` (overrides :ref:`Button`) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`allow_reselect` | ``false`` | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`fit_to_longest_item` | ``true`` | +-------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`int` | :ref:`item_count` | ``0`` | @@ -194,6 +196,8 @@ Emitted when the user navigates to an item using the :ref:`ProjectSettings.input Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. +\ :ref:`allow_reselect` must be enabled to reselect an item. + .. rst-class:: classref-section-separator ---- @@ -203,6 +207,23 @@ Emitted when the current item has been changed by the user. The index of the ite Property Descriptions --------------------- +.. _class_OptionButton_property_allow_reselect: + +.. rst-class:: classref-property + +:ref:`bool` **allow_reselect** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_allow_reselect** **(** :ref:`bool` value **)** +- :ref:`bool` **get_allow_reselect** **(** **)** + +If ``true``, the currently selected item can be selected again. + +.. rst-class:: classref-item-separator + +---- + .. _class_OptionButton_property_fit_to_longest_item: .. rst-class:: classref-property diff --git a/classes/class_os.rst b/classes/class_os.rst index e22b276da04..ae61ad01457 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -19,7 +19,7 @@ Operating System functions. Description ----------- -Operating System functions. **OS** wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc. +Operating System functions. **OS** wraps the most common functionality to communicate with the host operating system, such as the video driver, delays, environment variables, execution of binaries, command line, etc. \ **Note:** In Godot 4, **OS** functions related to window management were moved to the :ref:`DisplayServer` singleton. @@ -1141,6 +1141,8 @@ Returns ``true`` if the feature for the given feature tag is supported in the cu \ **Note:** Tag names are case-sensitive. +\ **Note:** On the web platform, one of the following additional tags is defined to indicate host platform: ``web_android``, ``web_ios``, ``web_linuxbsd``, ``web_macos``, or ``web_windows``. + .. rst-class:: classref-item-separator ---- @@ -1398,6 +1400,8 @@ Requests the OS to open a resource with the most appropriate program. For exampl Use :ref:`ProjectSettings.globalize_path` to convert a ``res://`` or ``user://`` path into a system path for use with this method. +\ **Note:** Use :ref:`String.uri_encode` to encode characters within URLs in a URL-safe, portable way. This is especially required for line breaks. Otherwise, :ref:`shell_open` may not work correctly in a project exported to the Web platform. + \ **Note:** This method is implemented on Android, iOS, Web, Linux, macOS and Windows. .. rst-class:: classref-item-separator diff --git a/classes/class_packedbytearray.rst b/classes/class_packedbytearray.rst index 003c260869d..6ef8c173d4b 100644 --- a/classes/class_packedbytearray.rst +++ b/classes/class_packedbytearray.rst @@ -126,6 +126,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_utf8` **(** **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_string_from_wchar` **(** **)** |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_encoded_var` **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| | @@ -713,6 +715,18 @@ Converts UTF-8 encoded array to :ref:`String`. Slower than :ref:`g ---- +.. _class_PackedByteArray_method_get_string_from_wchar: + +.. rst-class:: classref-method + +:ref:`String` **get_string_from_wchar** **(** **)** |const| + +Converts wide character (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded array to :ref:`String`. Returns empty string if source array is not valid wide string. + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedByteArray_method_has: .. rst-class:: classref-method diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index 0f97d6d05c8..f2035033c1b 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -246,7 +246,7 @@ Waits for a packet to arrive on the bound address. See :ref:`bind` param, :ref:`float` value **)** - :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| -Minimum turbulence influence on each particle. +Maximum turbulence influence on each particle. - The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. +The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. .. rst-class:: classref-item-separator @@ -1791,7 +1791,7 @@ Minimum turbulence influence on each particle. - void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** - :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| -Maximum turbulence influence on each particle. +Minimum turbulence influence on each particle. The actual amount of turbulence influence on each particle is calculated as a random value between :ref:`turbulence_influence_min` and :ref:`turbulence_influence_max` and multiplied by the amount of turbulence influence from :ref:`turbulence_influence_over_life`. diff --git a/classes/class_physicsdirectbodystate2d.rst b/classes/class_physicsdirectbodystate2d.rst index 5836d976eaa..105cb9f7cff 100644 --- a/classes/class_physicsdirectbodystate2d.rst +++ b/classes/class_physicsdirectbodystate2d.rst @@ -119,6 +119,8 @@ Methods +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** |const| | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PhysicsDirectSpaceState2D` | :ref:`get_space_state` **(** **)** | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_velocity_at_local_position` **(** :ref:`Vector2` local_position **)** |const| | @@ -564,7 +566,7 @@ Returns the collider's shape index. :ref:`Vector2` **get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| -Returns the linear velocity vector at the collider's contact point. +Returns the velocity vector at the collider's contact point. .. rst-class:: classref-item-separator @@ -632,6 +634,18 @@ Returns the local shape index of the collision. ---- +.. _class_PhysicsDirectBodyState2D_method_get_contact_local_velocity_at_position: + +.. rst-class:: classref-method + +:ref:`Vector2` **get_contact_local_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| + +Returns the velocity vector at the body's contact point. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsDirectBodyState2D_method_get_space_state: .. rst-class:: classref-method diff --git a/classes/class_physicsdirectbodystate2dextension.rst b/classes/class_physicsdirectbodystate2dextension.rst index 0c041a6a71c..40f8571a580 100644 --- a/classes/class_physicsdirectbodystate2dextension.rst +++ b/classes/class_physicsdirectbodystate2dextension.rst @@ -75,6 +75,8 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | @@ -471,6 +473,20 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi ---- +.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_velocity_at_position: + +.. rst-class:: classref-method + +:ref:`Vector2` **_get_contact_local_velocity_at_position** **(** :ref:`int` contact_idx **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsDirectBodyState2DExtension_method__get_inverse_inertia: .. rst-class:: classref-method diff --git a/classes/class_physicsdirectbodystate3d.rst b/classes/class_physicsdirectbodystate3d.rst index f35d9394406..14e8b0b7bd2 100644 --- a/classes/class_physicsdirectbodystate3d.rst +++ b/classes/class_physicsdirectbodystate3d.rst @@ -123,6 +123,8 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PhysicsDirectSpaceState3D` | :ref:`get_space_state` **(** **)** | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_velocity_at_local_position` **(** :ref:`Vector3` local_position **)** |const| | @@ -670,6 +672,18 @@ Returns the local shape index of the collision. ---- +.. _class_PhysicsDirectBodyState3D_method_get_contact_local_velocity_at_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_contact_local_velocity_at_position** **(** :ref:`int` contact_idx **)** |const| + +Returns the linear velocity vector at the body's contact point. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsDirectBodyState3D_method_get_space_state: .. rst-class:: classref-method diff --git a/classes/class_physicsdirectbodystate3dextension.rst b/classes/class_physicsdirectbodystate3dextension.rst index 203a98af66f..3f79037ea7c 100644 --- a/classes/class_physicsdirectbodystate3dextension.rst +++ b/classes/class_physicsdirectbodystate3dextension.rst @@ -75,6 +75,8 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`_get_inverse_inertia_tensor` **(** **)** |virtual| |const| | @@ -475,6 +477,20 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** ---- +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_velocity_at_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **_get_contact_local_velocity_at_position** **(** :ref:`int` contact_idx **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia: .. rst-class:: classref-method diff --git a/classes/class_physicsdirectspacestate2d.rst b/classes/class_physicsdirectspacestate2d.rst index 9eb74269c57..06900c82ab7 100644 --- a/classes/class_physicsdirectspacestate2d.rst +++ b/classes/class_physicsdirectspacestate2d.rst @@ -40,19 +40,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters2D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters2D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,7 +83,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m .. rst-class:: classref-method -:ref:`PackedVector2Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** +:ref:`Vector2[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters2D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape`, the number of returned results can be limited to save processing time. diff --git a/classes/class_physicsdirectspacestate3d.rst b/classes/class_physicsdirectspacestate3d.rst index add7f8194dc..4b52ab791e4 100644 --- a/classes/class_physicsdirectspacestate3d.rst +++ b/classes/class_physicsdirectspacestate3d.rst @@ -40,19 +40,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3[]` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters3D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_point` **(** :ref:`PhysicsPointQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,7 +83,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m .. rst-class:: classref-method -:ref:`PackedVector3Array[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** +:ref:`Vector3[]` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters3D` parameters, :ref:`int` max_results=32 **)** Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape`, the number of returned results can be limited to save processing time. diff --git a/classes/class_physicsdirectspacestate3dextension.rst b/classes/class_physicsdirectspacestate3dextension.rst index 6c2c4cab66a..edb1614d425 100644 --- a/classes/class_physicsdirectspacestate3dextension.rst +++ b/classes/class_physicsdirectspacestate3dextension.rst @@ -33,7 +33,7 @@ Methods +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| | + | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, :ref:`bool` pick_ray, PhysicsServer3DExtensionRayResult* result **)** |virtual| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -111,7 +111,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **_intersect_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| +:ref:`bool` **_intersect_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, :ref:`bool` pick_ray, PhysicsServer3DExtensionRayResult* result **)** |virtual| .. container:: contribute diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index 579a08a3354..9e0f5141c87 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -1799,9 +1799,19 @@ Removes a shape from an area. It does not delete the shape, so it can be reassig void **area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** -.. container:: contribute +Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters: - There is currently no description for this method. Please help us by :ref:`contributing one `! +1. an integer ``status``: either :ref:`AREA_BODY_ADDED` or :ref:`AREA_BODY_REMOVED` depending on whether the other area's shape entered or exited the area, + +2. an :ref:`RID` ``area_rid``: the :ref:`RID` of the other area that entered or exited the area, + +3. an integer ``instance_id``: the ``ObjectID`` attached to the other area, + +4. an integer ``area_shape_idx``: the index of the shape of the other area that entered or exited the area, + +5. an integer ``self_shape_idx``: the index of the shape of the area where the other area entered or exited. + +By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time. .. rst-class:: classref-item-separator @@ -1837,17 +1847,19 @@ Sets which physics layers the area will monitor. void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** -Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: +Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters: + +1. an integer ``status``: either :ref:`AREA_BODY_ADDED` or :ref:`AREA_BODY_REMOVED` depending on whether the other body shape entered or exited the area, -1: :ref:`AREA_BODY_ADDED` or :ref:`AREA_BODY_REMOVED`, depending on whether the object entered or exited the area. +2. an :ref:`RID` ``body_rid``: the :ref:`RID` of the body that entered or exited the area, -2: :ref:`RID` of the object that entered/exited the area. +3. an integer ``instance_id``: the ``ObjectID`` attached to the body, -3: Instance ID of the object that entered/exited the area. +4. an integer ``body_shape_idx``: the index of the shape of the body that entered or exited the area, -4: The shape index of the object that entered/exited the area. +5. an integer ``self_shape_idx``: the index of the shape of the area where the body entered or exited. -5: The shape index of the area where the object entered/exited. +By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time. .. rst-class:: classref-item-separator diff --git a/classes/class_physicsserver3dextension.rst b/classes/class_physicsserver3dextension.rst index a27eba3685c..c0fb05fa286 100644 --- a/classes/class_physicsserver3dextension.rst +++ b/classes/class_physicsserver3dextension.rst @@ -24,387 +24,387 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectBodyState3D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_user_flags` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_user_flags` **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_box_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_custom_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_cylinder_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_sync` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finish` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_flush_queries` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_heightmap_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_hinge_simple` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_pin_joint_get_local_a` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_pin_joint_get_local_b` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shape_get_margin` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_margin` **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_soft_body_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`_soft_body_get_bounds` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`_soft_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_soft_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_soft_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_damping_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_drag_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_linear_stiffness` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_soft_body_get_point_global_position` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_pressure_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_soft_body_get_simulation_precision` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_soft_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_soft_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_total_mass` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_soft_body_is_point_pinned` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_move_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_pin_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_remove_all_pinned_points` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_damping_coefficient` **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_drag_coefficient` **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_linear_stiffness` **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_mesh` **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_pressure_coefficient` **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_simulation_precision` **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_total_mass` **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_transform` **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_update_rendering_server` **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState3D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_sphere_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_sync` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`body_test_motion_is_excluding_body` **(** :ref:`RID` body **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`body_test_motion_is_excluding_object` **(** :ref:`int` object **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState3D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_user_flags` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_user_flags` **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_box_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_custom_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_cylinder_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finish` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_flush_queries` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_heightmap_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_hinge_simple` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_pin_joint_get_local_a` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_pin_joint_get_local_b` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_margin` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_margin` **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_soft_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`_soft_body_get_bounds` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_soft_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_damping_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_drag_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_linear_stiffness` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_soft_body_get_point_global_position` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_pressure_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_simulation_precision` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_soft_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_soft_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_total_mass` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_soft_body_is_point_pinned` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_move_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_pin_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_remove_all_pinned_points` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_damping_coefficient` **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_drag_coefficient` **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_linear_stiffness` **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_mesh` **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_pressure_coefficient` **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_simulation_precision` **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_total_mass` **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_transform` **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_update_rendering_server` **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_sphere_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion_is_excluding_body` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion_is_excluding_object` **(** :ref:`int` object **)** |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -1623,7 +1623,7 @@ void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int` **_body_test_motion** **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| +:ref:`bool` **_body_test_motion** **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| .. container:: contribute diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 2035a93fc6e..1a6ad715ff7 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -121,9 +121,7 @@ If ``true``, polygon edges will be anti-aliased. :ref:`Array` **bones** = ``[]`` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Internal list of :ref:`Bone2D` nodes used by the assigned :ref:`skeleton`. Edited using the Polygon2D editor ("UV" button on the top toolbar). .. rst-class:: classref-item-separator @@ -157,9 +155,7 @@ The polygon's fill color. If ``texture`` is defined, it will be multiplied by th - void **set_internal_vertex_count** **(** :ref:`int` value **)** - :ref:`int` **get_internal_vertex_count** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Number of internal vertices, used for UV mapping. .. rst-class:: classref-item-separator @@ -263,9 +259,7 @@ The list of polygons, in case more than one is being represented. Every individu - void **set_skeleton** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_skeleton** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Path to a :ref:`Skeleton2D` node used for skeleton-based deformations of this polygon. If empty or invalid, skeletal deformations will not be used. .. rst-class:: classref-item-separator diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 503a0d9c85d..41517d7e161 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -98,6 +98,8 @@ Methods +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_item_icon` **(** :ref:`int` index **)** |const| | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_icon_max_width` **(** :ref:`int` index **)** |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_item_id` **(** :ref:`int` index **)** |const| | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_item_indent` **(** :ref:`int` index **)** |const| | @@ -150,6 +152,8 @@ Methods +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_icon` **(** :ref:`int` index, :ref:`Texture2D` icon **)** | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_icon_max_width` **(** :ref:`int` index, :ref:`int` width **)** | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_id` **(** :ref:`int` index, :ref:`int` id **)** | +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_indent` **(** :ref:`int` index, :ref:`int` indent **)** | @@ -202,6 +206,8 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`indent` | ``10`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`item_end_padding` | ``2`` | @@ -678,7 +684,7 @@ Returns the index of the currently focused item. Returns ``-1`` if no item is fo :ref:`Key` **get_item_accelerator** **(** :ref:`int` index **)** |const| -Returns the accelerator of the item at the given ``index``. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The return value is an integer which is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). If no accelerator is defined for the specified ``index``, :ref:`get_item_accelerator` returns ``0`` (corresponding to :ref:`@GlobalScope.KEY_NONE`). +Returns the accelerator of the item at the given ``index``. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The return value is an integer which is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). If no accelerator is defined for the specified ``index``, :ref:`get_item_accelerator` returns ``0`` (corresponding to :ref:`@GlobalScope.KEY_NONE`). .. rst-class:: classref-item-separator @@ -696,6 +702,18 @@ Returns the icon of the item at the given ``index``. ---- +.. _class_PopupMenu_method_get_item_icon_max_width: + +.. rst-class:: classref-method + +:ref:`int` **get_item_icon_max_width** **(** :ref:`int` index **)** |const| + +Returns the maximum allowed width of the icon for the item at the given ``index``. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_get_item_id: .. rst-class:: classref-method @@ -940,7 +958,7 @@ Passing ``-1`` as the index makes so that no item is focused. void **set_item_accelerator** **(** :ref:`int` index, :ref:`Key` accel **)** -Sets the accelerator of the item at the given ``index``. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. ``accel`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using boolean OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). +Sets the accelerator of the item at the given ``index``. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. ``accel`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). .. rst-class:: classref-item-separator @@ -1020,6 +1038,18 @@ Replaces the :ref:`Texture2D` icon of the item at the given ``i ---- +.. _class_PopupMenu_method_set_item_icon_max_width: + +.. rst-class:: classref-method + +void **set_item_icon_max_width** **(** :ref:`int` index, :ref:`int` width **)** + +Sets the maximum allowed width of the icon for the item at the given ``index``. This limit is applied on top of the default size of the icon and on top of :ref:`icon_max_width`. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_set_item_id: .. rst-class:: classref-method @@ -1279,6 +1309,18 @@ The horizontal space between the item's elements. ---- +.. _class_PopupMenu_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +The maximum allowed width of the item's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`set_item_icon_max_width`. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_theme_constant_indent: .. rst-class:: classref-themeproperty diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 27445c016c9..7f4b3e00a25 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -59,12 +59,12 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/boot_splash/use_filter` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/config/auto_accept_quit` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/custom_user_dir_name` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/description` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`application/config/features` | | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/icon` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/macos_native_icon` | ``""`` | @@ -75,6 +75,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/project_settings_override` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/config/quit_on_go_back` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/config/use_custom_user_dir` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/config/use_hidden_project_data_directory` | ``true`` | @@ -95,6 +97,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`application/run/low_processor_mode_sleep_usec` | ``6900`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/run/main_loop_type` | ``"SceneTree"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/run/main_scene` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`application/run/max_fps` | ``0`` | @@ -339,12 +343,26 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/size/window_width_override` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`display/window/stretch/aspect` | ``"keep"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`display/window/stretch/mode` | ``"disabled"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`display/window/stretch/scale` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/subwindows/embed_subwindows` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/vsync/vsync_mode` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`dotnet/project/assembly_name` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`dotnet/project/solution_directory` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editor/export/convert_text_resources_to_binary` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editor/import/reimport_missing_imported_files` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editor/import/use_multiple_threads` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editor/movie_writer/disable_vsync` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editor/movie_writer/fps` | ``60`` | @@ -365,12 +383,18 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editor/naming/node_name_num_separator` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editor/naming/scene_name_casing` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`editor/run/main_run_args` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`editor/script/search_in_file_extensions` | ``PackedStringArray("gd", "gdshader")`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`editor/script/templates_search_path` | ``"res://script_templates"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editor/version_control/autoload_on_startup` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`editor/version_control/plugin_name` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`filesystem/import/blender/enabled` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`filesystem/import/blender/enabled.android` | ``false`` | @@ -385,10 +409,14 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gui/common/default_scroll_deadzone` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui/common/snap_controls_to_pixels` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gui/common/swap_cancel_ok` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gui/common/text_edit_undo_stack_max_size` | ``1024`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui/fonts/dynamic_fonts/use_oversampling` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`gui/theme/custom` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`gui/theme/custom_font` | ``""`` | @@ -583,10 +611,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`internationalization/locale/test` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`internationalization/locale/translation_remaps` | | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`internationalization/locale/translations` | | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`internationalization/pseudolocalization/double_vowels` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`internationalization/pseudolocalization/expansion_ratio` | ``0.0`` | @@ -607,6 +631,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`internationalization/rendering/force_right_to_left_layout_direction` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`internationalization/rendering/root_node_layout_direction` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`internationalization/rendering/text_driver` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/2d_navigation/layer_1` | ``""`` | @@ -945,7 +971,7 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`layer_names/3d_render/layer_9` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`memory/limits/message_queue/max_size_kb` | ``4096`` | + | :ref:`int` | :ref:`memory/limits/message_queue/max_size_mb` | ``32`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`memory/limits/multithreaded_server/rid_pool_prealloc` | ``60`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1307,6 +1333,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/shading/overrides/force_vertex_shading.mobile` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/textures/canvas_textures/default_texture_filter` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/textures/canvas_textures/default_texture_repeat` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/textures/decals/filter` | ``3`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/textures/default_filters/anisotropic_filtering_level` | ``2`` | @@ -1347,6 +1377,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr/openxr/reference_space` | ``"1"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/startup_alert` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`xr/openxr/submit_depth_buffer` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr/openxr/view_configuration` | ``"1"`` | @@ -1479,39 +1511,39 @@ If ``true``, applies linear filtering when scaling the image (recommended for hi ---- -.. _class_ProjectSettings_property_application/config/custom_user_dir_name: +.. _class_ProjectSettings_property_application/config/auto_accept_quit: .. rst-class:: classref-property -:ref:`String` **application/config/custom_user_dir_name** = ``""`` - -This user directory is used for storing persistent data (``user://`` filesystem). If a custom directory name is defined, this name will be appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in :ref:`OS.get_user_data_dir`). +:ref:`bool` **application/config/auto_accept_quit** = ``true`` -The :ref:`application/config/use_custom_user_dir` setting must be enabled for this to take effect. +If ``true``, the application automatically accepts quitting requests. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_application/config/description: +.. _class_ProjectSettings_property_application/config/custom_user_dir_name: .. rst-class:: classref-property -:ref:`String` **application/config/description** = ``""`` +:ref:`String` **application/config/custom_user_dir_name** = ``""`` -The project's description, displayed as a tooltip in the Project Manager when hovering the project. +This user directory is used for storing persistent data (``user://`` filesystem). If a custom directory name is defined, this name will be appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in :ref:`OS.get_user_data_dir`). + +The :ref:`application/config/use_custom_user_dir` setting must be enabled for this to take effect. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_application/config/features: +.. _class_ProjectSettings_property_application/config/description: .. rst-class:: classref-property -:ref:`PackedStringArray` **application/config/features** +:ref:`String` **application/config/description** = ``""`` -List of internal features associated with the project, like ``Double Precision`` or ``C#``. Not to be confused with feature tags. +The project's description, displayed as a tooltip in the Project Manager when hovering the project. .. rst-class:: classref-item-separator @@ -1581,6 +1613,18 @@ Specifies a file to override project settings. For example: ``user://custom_sett ---- +.. _class_ProjectSettings_property_application/config/quit_on_go_back: + +.. rst-class:: classref-property + +:ref:`bool` **application/config/quit_on_go_back** = ``true`` + +If ``true``, the application quits automatically when navigating back (e.g. using the system "Back" button on Android). + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/config/use_custom_user_dir: .. rst-class:: classref-property @@ -1721,6 +1765,18 @@ Amount of sleeping between frames when the low-processor usage mode is enabled ( ---- +.. _class_ProjectSettings_property_application/run/main_loop_type: + +.. rst-class:: classref-property + +:ref:`String` **application/run/main_loop_type** = ``"SceneTree"`` + +The name of the type implementing the engine's main loop. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/run/main_scene: .. rst-class:: classref-property @@ -3239,6 +3295,60 @@ On desktop platforms, overrides the game's initial window width. See also :ref:` ---- +.. _class_ProjectSettings_property_display/window/stretch/aspect: + +.. rst-class:: classref-property + +:ref:`String` **display/window/stretch/aspect** = ``"keep"`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/window/stretch/mode: + +.. rst-class:: classref-property + +:ref:`String` **display/window/stretch/mode** = ``"disabled"`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/window/stretch/scale: + +.. rst-class:: classref-property + +:ref:`float` **display/window/stretch/scale** = ``1.0`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/window/subwindows/embed_subwindows: + +.. rst-class:: classref-property + +:ref:`bool` **display/window/subwindows/embed_subwindows** = ``true`` + +If ``true`` subwindows are embedded in the main window. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_display/window/vsync/vsync_mode: .. rst-class:: classref-property @@ -3285,6 +3395,44 @@ Changing this value allows setting up a multi-project scenario where there are m ---- +.. _class_ProjectSettings_property_editor/export/convert_text_resources_to_binary: + +.. rst-class:: classref-property + +:ref:`bool` **editor/export/convert_text_resources_to_binary** = ``true`` + +If ``true`` text resources are converted to binary format on export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/import/reimport_missing_imported_files: + +.. rst-class:: classref-property + +:ref:`bool` **editor/import/reimport_missing_imported_files** = ``true`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/import/use_multiple_threads: + +.. rst-class:: classref-property + +:ref:`bool` **editor/import/use_multiple_threads** = ``true`` + +If ``true`` importing of resources is run on multiple threads. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_editor/movie_writer/disable_vsync: .. rst-class:: classref-property @@ -3421,6 +3569,18 @@ What to use to separate node name from number. This is mostly an editor setting. ---- +.. _class_ProjectSettings_property_editor/naming/scene_name_casing: + +.. rst-class:: classref-property + +:ref:`int` **editor/naming/scene_name_casing** = ``2`` + +When generating file names from scene root node, set the type of casing in this project. This is mostly an editor setting. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_editor/run/main_run_args: .. rst-class:: classref-property @@ -3465,6 +3625,34 @@ Search path for project-specific script templates. Godot will search for script ---- +.. _class_ProjectSettings_property_editor/version_control/autoload_on_startup: + +.. rst-class:: classref-property + +:ref:`bool` **editor/version_control/autoload_on_startup** = ``false`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/version_control/plugin_name: + +.. rst-class:: classref-property + +:ref:`String` **editor/version_control/plugin_name** = ``""`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_filesystem/import/blender/enabled: .. rst-class:: classref-property @@ -3553,6 +3741,20 @@ Default value for :ref:`ScrollContainer.scroll_deadzone` **gui/common/snap_controls_to_pixels** = ``true`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_gui/common/swap_cancel_ok: .. rst-class:: classref-property @@ -3579,6 +3781,20 @@ Maximum undo/redo history size for :ref:`TextEdit` fields. ---- +.. _class_ProjectSettings_property_gui/fonts/dynamic_fonts/use_oversampling: + +.. rst-class:: classref-property + +:ref:`bool` **gui/fonts/dynamic_fonts/use_oversampling** = ``true`` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_gui/theme/custom: .. rst-class:: classref-property @@ -4205,7 +4421,7 @@ macOS specific override for the shortcut to add a caret below every caret. :ref:`Dictionary` **input/ui_text_caret_document_end** -Default :ref:`InputEventAction` to move the text cursor the the end of the text. +Default :ref:`InputEventAction` to move the text cursor to the end of the text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. @@ -4889,30 +5105,6 @@ If non-empty, this locale will be used when running the project from the editor. ---- -.. _class_ProjectSettings_property_internationalization/locale/translation_remaps: - -.. rst-class:: classref-property - -:ref:`PackedStringArray` **internationalization/locale/translation_remaps** - -Locale-dependent resource remaps. Edit them in the "Localization" tab of Project Settings editor. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ProjectSettings_property_internationalization/locale/translations: - -.. rst-class:: classref-property - -:ref:`PackedStringArray` **internationalization/locale/translations** - -List of translation files available in the project. Edit them in the "Localization" tab of Project Settings editor. - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_internationalization/pseudolocalization/double_vowels: .. rst-class:: classref-property @@ -5029,7 +5221,19 @@ If ``true``, enables pseudolocalization for the project. This can be used to spo :ref:`bool` **internationalization/rendering/force_right_to_left_layout_direction** = ``false`` -Force layout direction and text writing direction to RTL for all locales. +Force layout direction and text writing direction to RTL for all controls. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_internationalization/rendering/root_node_layout_direction: + +.. rst-class:: classref-property + +:ref:`int` **internationalization/rendering/root_node_layout_direction** = ``0`` + +Root node default layout direction. .. rst-class:: classref-item-separator @@ -7069,11 +7273,11 @@ Optional name for the 3D render layer 9. If left empty, the layer will display a ---- -.. _class_ProjectSettings_property_memory/limits/message_queue/max_size_kb: +.. _class_ProjectSettings_property_memory/limits/message_queue/max_size_mb: .. rst-class:: classref-property -:ref:`int` **memory/limits/message_queue/max_size_kb** = ``4096`` +:ref:`int` **memory/limits/message_queue/max_size_mb** = ``32`` Godot uses a message queue to defer some function calls. If you run out of space on it (you will see an error), you can increase the size here. @@ -7827,9 +8031,7 @@ The number of fixed iterations per second. This controls how often physics simul :ref:`bool` **rendering/2d/snap/snap_2d_transforms_to_pixel** = ``false`` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, :ref:`CanvasItem` nodes will internally snap to full pixels. Their position can still be sub-pixel, but the decimals will not have effect. .. rst-class:: classref-item-separator @@ -7841,9 +8043,7 @@ The number of fixed iterations per second. This controls how often physics simul :ref:`bool` **rendering/2d/snap/snap_2d_vertices_to_pixel** = ``false`` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, vertices of :ref:`CanvasItem` nodes will snap to full pixels. Only affects the final vertex positions, not the transforms. .. rst-class:: classref-item-separator @@ -9445,6 +9645,30 @@ Lower-end override for :ref:`rendering/shading/overrides/force_vertex_shading` **rendering/textures/canvas_textures/default_texture_filter** = ``1`` + +The default texture filtering mode to use on :ref:`CanvasItem`\ s. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/textures/canvas_textures/default_texture_repeat: + +.. rst-class:: classref-property + +:ref:`int` **rendering/textures/canvas_textures/default_texture_repeat** = ``0`` + +The default texture repeating mode to use on :ref:`CanvasItem`\ s. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/textures/decals/filter: .. rst-class:: classref-property @@ -9551,7 +9775,7 @@ If ``true``, the texture importer will import VRAM-compressed textures using the :ref:`bool` **rendering/textures/vram_compression/import_s3tc_bptc** -If ``true``, the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm (DXT1-5) for lower quality textures and the the BPTC algorithm (BC6H and BC7) for high quality textures. This algorithm is only supported on PC desktop platforms and consoles. +If ``true``, the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm (DXT1-5) for lower quality textures and the BPTC algorithm (BC6H and BC7) for high quality textures. This algorithm is only supported on PC desktop platforms and consoles. \ **Note:** Changing this setting does *not* impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the ``.godot/imported/`` folder located inside the project folder then restart the editor (see :ref:`application/config/use_hidden_project_data_directory`). @@ -9654,9 +9878,7 @@ The texture *must* use a lossless compression format so that colors can be match :ref:`int` **threading/worker_pool/max_threads** = ``-1`` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Maximum number of threads to be used by :ref:`WorkerThreadPool`. Value of ``-1`` means no limit. .. rst-class:: classref-item-separator @@ -9724,6 +9946,18 @@ Specify the default reference space. ---- +.. _class_ProjectSettings_property_xr/openxr/startup_alert: + +.. rst-class:: classref-property + +:ref:`bool` **xr/openxr/startup_alert** = ``true`` + +If ``true``, Godot will display an alert modal when OpenXR initialization fails on startup. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_xr/openxr/submit_depth_buffer: .. rst-class:: classref-property diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index 6666ffb05b8..b865cd7ce3d 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -10,18 +10,18 @@ Quaternion ========== -Quaternion. +A unit quaternion used for representing 3D rotations. .. rst-class:: classref-introduction-group Description ----------- -A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation. +Quaternions are similar to :ref:`Basis`, which implements the matrix representation of rotations. Unlike :ref:`Basis`, which stores rotation, scale, and shearing, quaternions only store rotation. -It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quaternion only stores rotation. +Quaternions can be parametrized using both an axis-angle pair or Euler angles. Due to their compactness and the way they are stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. -Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. +\ **Note:** Quaternions need to be normalized before being used for rotation. .. rst-class:: classref-introduction-group @@ -269,9 +269,7 @@ Constructs a **Quaternion** as a copy of the given **Quaternion**. :ref:`Quaternion` **Quaternion** **(** :ref:`Vector3` arc_from, :ref:`Vector3` arc_to **)** -.. container:: contribute - - There is currently no description for this constructor. Please help us by :ref:`contributing one `! +Constructs a quaternion representing the shortest arc between two points on the surface of a sphere with a radius of ``1.0``. .. rst-class:: classref-item-separator diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index 1f9a9232c9f..5af01fc8c0b 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -12,7 +12,7 @@ RefCounted **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AESContext`, :ref:`AnimationTrackEditPlugin`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` +**Inherited By:** :ref:`AESContext`, :ref:`AnimationTrackEditPlugin`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` Base class for reference-counted objects. diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index f326a0eb8d0..fce8b5aabf7 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -64,7 +64,7 @@ Methods +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`compute_pipeline_create` **(** :ref:`RID` shader, :ref:`RDPipelineSpecializationConstant[]` specialization_constants=[] **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`compute_pipeline_is_valid` **(** :ref:`RID` compute_pieline **)** | + | :ref:`bool` | :ref:`compute_pipeline_is_valid` **(** :ref:`RID` compute_pipeline **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RenderingDevice` | :ref:`create_local_device` **(** **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -4468,7 +4468,7 @@ void **compute_list_set_push_constant** **(** :ref:`int` compute_list .. rst-class:: classref-method -:ref:`bool` **compute_pipeline_is_valid** **(** :ref:`RID` compute_pieline **)** +:ref:`bool` **compute_pipeline_is_valid** **(** :ref:`RID` compute_pipeline **)** .. container:: contribute diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 0d8dd6d9073..c1ec5b53a71 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -633,7 +633,7 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_collision_set_attractor_directionality` **(** :ref:`RID` particles_collision, :ref:`float` amount **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_attractor_strength` **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** | + | void | :ref:`particles_collision_set_attractor_strength` **(** :ref:`RID` particles_collision, :ref:`float` strength **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_collision_set_box_extents` **(** :ref:`RID` particles_collision, :ref:`Vector3` extents **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -2672,7 +2672,7 @@ enum **ViewportScaling3DMode**: :ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_BILINEAR** = ``0`` -Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. +Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less than ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. .. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_FSR: @@ -2680,7 +2680,7 @@ Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be :ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_FSR** = ``1`` -Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. +Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less than ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. .. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_MAX: @@ -5312,6 +5312,8 @@ Creates a camera attributes object and adds it to the RenderingServer. It can be Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +This is the internal equivalent of the :ref:`CameraAttributes` resource. + .. rst-class:: classref-item-separator ---- @@ -5400,6 +5402,8 @@ Creates a camera and adds it to the RenderingServer. It can be accessed with the Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +This is the internal equivalent of the :ref:`Camera3D` node. + .. rst-class:: classref-item-separator ---- @@ -5510,6 +5514,8 @@ Creates a canvas and returns the assigned :ref:`RID`. It can be acces Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +Canvas has no :ref:`Resource` or :ref:`Node` equivalent. + .. rst-class:: classref-item-separator ---- @@ -5700,9 +5706,7 @@ Sets a :ref:`Transform2D` that will be used to transform subs void **canvas_item_add_texture_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Draws a 2D textured rectangle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_texture_rect` and :ref:`Texture2D.draw_rect`. .. rst-class:: classref-item-separator @@ -5714,9 +5718,7 @@ void **canvas_item_add_texture_rect** **(** :ref:`RID` item, :ref:`Re void **canvas_item_add_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Draws the specified region of a 2D textured rectangle on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. See also :ref:`CanvasItem.draw_texture_rect_region` and :ref:`Texture2D.draw_rect_region`. .. rst-class:: classref-item-separator @@ -5754,7 +5756,11 @@ Clears the :ref:`CanvasItem` and removes all commands in it. :ref:`RID` **canvas_item_create** **(** **)** -Creates a new :ref:`CanvasItem` instance and returns its :ref:`RID`. +Creates a canvas item and returns the assigned :ref:`RID`. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_item_*`` RenderingServer functions. + +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. + +This is the internal equivalent of the :ref:`CanvasItem` node. .. rst-class:: classref-item-separator @@ -5914,9 +5920,7 @@ Sets a new material to the :ref:`CanvasItem`. void **canvas_item_set_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets a color modulation to the :ref:`CanvasItem`. This also affects child canvas items. .. rst-class:: classref-item-separator @@ -5928,9 +5932,7 @@ void **canvas_item_set_modulate** **(** :ref:`RID` item, :ref:`Color< void **canvas_item_set_parent** **(** :ref:`RID` item, :ref:`RID` parent **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets a parent :ref:`CanvasItem` to the :ref:`CanvasItem`. The item will inherit transform, modulation and visibility from its parent, like :ref:`CanvasItem` nodes in the scene tree. .. rst-class:: classref-item-separator @@ -5942,9 +5944,7 @@ void **canvas_item_set_parent** **(** :ref:`RID` item, :ref:`RID` item, :ref:`Color` color **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets a color self-modulation to the :ref:`CanvasItem`. It does not affect the child canvas items. .. rst-class:: classref-item-separator @@ -5956,9 +5956,7 @@ void **canvas_item_set_self_modulate** **(** :ref:`RID` item, :ref:`C void **canvas_item_set_sort_children_by_y** **(** :ref:`RID` item, :ref:`bool` enabled **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Enables or disables Y-sorting of a :ref:`CanvasItem`. .. rst-class:: classref-item-separator @@ -5970,9 +5968,7 @@ void **canvas_item_set_sort_children_by_y** **(** :ref:`RID` item, :r void **canvas_item_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the transform of the :ref:`CanvasItem`. It affects where and how the item will be drawn. Child canvas items' transforms are multiplied by their parent's transform. .. rst-class:: classref-item-separator @@ -6008,9 +6004,9 @@ Sets the rendering visibility layer associated with this :ref:`CanvasItem` item, :ref:`bool` enable, :ref:`Rect2` area, :ref:`Callable` enter_callable, :ref:`Callable` exit_callable **)** -.. container:: contribute +Sets the given :ref:`CanvasItem` as visibility notifier. ``area`` defines the area of detecting visibility. ``enter_callable`` is called when the :ref:`CanvasItem` enters the screen, ``exit_callable`` is called when the :ref:`CanvasItem` exits the screen. If ``enable`` is ``false``, the item will no longer function as notifier. - There is currently no description for this method. Please help us by :ref:`contributing one `! +This method can be used to manually mimic :ref:`VisibleOnScreenNotifier2D`. .. rst-class:: classref-item-separator @@ -6022,9 +6018,7 @@ void **canvas_item_set_visibility_notifier** **(** :ref:`RID` item, : void **canvas_item_set_visible** **(** :ref:`RID` item, :ref:`bool` visible **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the visibility of the :ref:`CanvasItem`. .. rst-class:: classref-item-separator @@ -6098,7 +6092,7 @@ Attaches a light occluder to the canvas. Removes it from its previous canvas. :ref:`RID` **canvas_light_occluder_create** **(** **)** -Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_light_ocluder_*`` RenderingServer functions. +Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_light_occluder_*`` RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. @@ -6480,9 +6474,11 @@ void **canvas_set_shadow_texture_size** **(** :ref:`int` size **)** :ref:`RID` **canvas_texture_create** **(** **)** -.. container:: contribute +Creates a canvas texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_texture_*`` RenderingServer functions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. + +This is the internal equivalent of the :ref:`CanvasTexture` resource. .. rst-class:: classref-item-separator @@ -6522,9 +6518,7 @@ void **canvas_texture_set_shading_parameters** **(** :ref:`RID` canva void **canvas_texture_set_texture_filter** **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureFilter` filter **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the texture filter used by the :ref:`CanvasTexture`. .. rst-class:: classref-item-separator @@ -6536,9 +6530,7 @@ void **canvas_texture_set_texture_filter** **(** :ref:`RID` canvas_te void **canvas_texture_set_texture_repeat** **(** :ref:`RID` canvas_texture, :ref:`CanvasItemTextureRepeat` repeat **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the texture repeat used by the :ref:`CanvasTexture`. .. rst-class:: classref-item-separator @@ -6564,9 +6556,11 @@ Creates a RenderingDevice that can be used to do draw and compute operations on :ref:`RID` **decal_create** **(** **)** -.. container:: contribute +Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``decal_*`` RenderingServer functions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. + +This is the internal equivalent of the :ref:`Decal` node. .. rst-class:: classref-item-separator @@ -6648,9 +6642,7 @@ void **decal_set_fade** **(** :ref:`RID` decal, :ref:`float` decal, :ref:`Color` color **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the color modulation of the :ref:`Decal`. .. rst-class:: classref-item-separator @@ -6676,9 +6668,7 @@ void **decal_set_normal_fade** **(** :ref:`RID` decal, :ref:`float` decal, :ref:`Vector3` size **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the size of the :ref:`Decal`. .. rst-class:: classref-item-separator @@ -6690,9 +6680,7 @@ void **decal_set_size** **(** :ref:`RID` decal, :ref:`Vector3` decal, :ref:`DecalTexture` type, :ref:`RID` texture **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Sets the texture of the :ref:`Decal`. .. rst-class:: classref-item-separator @@ -6724,6 +6712,8 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach this directional light to an instance using :ref:`instance_set_base` using the returned RID. +This is the internal equivalent of the :ref:`DirectionalLight3D` node. + .. rst-class:: classref-item-separator ---- @@ -6780,6 +6770,8 @@ Creates an environment and adds it to the RenderingServer. It can be accessed wi Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +This is the internal equivalent of the :ref:`Environment` resource. + .. rst-class:: classref-item-separator ---- @@ -7110,7 +7102,11 @@ Sets the resolution of the volumetric fog's froxel buffer. ``size`` is modified :ref:`RID` **fog_volume_create** **(** **)** -Creates a new fog volume and allocates an RID. +Creates a fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``fog_volume_*`` RenderingServer functions. + +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. + +This is the internal equivalent of the :ref:`FogVolume` node. .. rst-class:: classref-item-separator @@ -7532,6 +7528,8 @@ Once finished with your RID, you will want to free the RID using the RenderingSe An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using :ref:`instance_set_base`. +This is the internal equivalent of the :ref:`VisualInstance3D` node. + .. rst-class:: classref-item-separator ---- @@ -8092,7 +8090,11 @@ If ``true``, light will cast shadows. Equivalent to :ref:`Light3D.shadow_enabled :ref:`RID` **lightmap_create** **(** **)** -Creates a new :ref:`LightmapGI` instance. +Creates a lightmap GI and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``lightmap_*`` RenderingServer functions. + +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. + +This is the internal equivalent of the :ref:`LightmapGI` node. .. rst-class:: classref-item-separator @@ -8258,6 +8260,8 @@ Creates an empty material and adds it to the RenderingServer. It can be accessed Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` static method. +This is the internal equivalent of the :ref:`Material` resource. + .. rst-class:: classref-item-separator ---- @@ -8374,6 +8378,8 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach this mesh to an instance using :ref:`instance_set_base` using the returned RID. +This is the internal equivalent of the :ref:`Mesh` resource. + .. rst-class:: classref-item-separator ---- @@ -8664,6 +8670,8 @@ Once finished with your RID, you will want to free the RID using the RenderingSe To place in a scene, attach this multimesh to an instance using :ref:`instance_set_base` using the returned RID. +This is the internal equivalent of the :ref:`MultiMesh` resource. + .. rst-class:: classref-item-separator ---- @@ -8968,7 +8976,7 @@ void **particles_collision_set_attractor_directionality** **(** :ref:`RID` particles_collision, :ref:`float` setrngth **)** +void **particles_collision_set_attractor_strength** **(** :ref:`RID` particles_collision, :ref:`float` strength **)** .. container:: contribute diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 79eb8a8f9b0..4e835f057ff 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -193,7 +193,7 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_italics` **(** **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize **)** | + | void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize, :ref:`String` bullet="•" **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_meta` **(** :ref:`Variant` data **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1444,7 +1444,7 @@ Adds a ``[font]`` tag with a italics font to the tag stack. This is the same as .. rst-class:: classref-method -void **push_list** **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize **)** +void **push_list** **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize, :ref:`String` bullet="•" **)** Adds ``[ol]`` or ``[ul]`` tag to the tag stack. Multiplies ``level`` by current :ref:`tab_size` to determine new margin length. diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 9e4188aa52c..d8e733fdb28 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -288,7 +288,7 @@ Property Descriptions - void **set_auto_accept_quit** **(** :ref:`bool` value **)** - :ref:`bool` **is_auto_accept_quit** **(** **)** -If ``true``, the application automatically accepts quitting. +If ``true``, the application automatically accepts quitting requests. For mobile platforms, see :ref:`quit_on_go_back`. @@ -438,7 +438,7 @@ If ``true``, the **SceneTree** is paused. Doing so will have the following behav - void **set_quit_on_go_back** **(** :ref:`bool` value **)** - :ref:`bool` **is_quit_on_go_back** **(** **)** -If ``true``, the application quits automatically on going back (e.g. on Android). +If ``true``, the application quits automatically when navigating back (e.g. using the system "Back" button on Android). To handle 'Go Back' button when this option is disabled, use :ref:`DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST`. @@ -581,7 +581,7 @@ The timer will be automatically freed after its time elapses. :ref:`Tween` **create_tween** **(** **)** -Creates and returns a new :ref:`Tween`. +Creates and returns a new :ref:`Tween`. The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode`). .. rst-class:: classref-item-separator diff --git a/classes/class_scriptlanguageextension.rst b/classes/class_scriptlanguageextension.rst index 8cf5669e1da..95626832068 100644 --- a/classes/class_scriptlanguageextension.rst +++ b/classes/class_scriptlanguageextension.rst @@ -253,7 +253,7 @@ The option is local to the location of the code completion query - e.g. a local :ref:`CodeCompletionLocation` **LOCATION_PARENT_MASK** = ``256`` -The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in a the class or a parent class. +The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in the class or a parent class. .. _class_ScriptLanguageExtension_constant_LOCATION_OTHER_USER_CODE: diff --git a/classes/class_shape3d.rst b/classes/class_shape3d.rst index 8d17e3895dd..3caa0b82ed3 100644 --- a/classes/class_shape3d.rst +++ b/classes/class_shape3d.rst @@ -95,7 +95,7 @@ When set to ``0``, the default value from :ref:`ProjectSettings.physics/3d/solve - void **set_margin** **(** :ref:`float` value **)** - :ref:`float` **get_margin** **(** **)** -The collision margin for the shape. Used in Bullet Physics only. +The collision margin for the shape. This is not used in Godot Physics. Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp. diff --git a/classes/class_shapecast2d.rst b/classes/class_shapecast2d.rst index d8d92203d01..fb89a2f2fba 100644 --- a/classes/class_shapecast2d.rst +++ b/classes/class_shapecast2d.rst @@ -21,7 +21,7 @@ Description Shape casting allows to detect collision objects by sweeping the :ref:`shape` along the cast direction determined by :ref:`target_position` (useful for things like beam weapons). -Immediate collision overlaps can be done with the :ref:`target_position` set to ``Vector2(0, 0)`` and by calling :ref:`force_shapecast_update` within the same **physics_frame**. This also helps to overcome some limitations of :ref:`Area2D` when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to :ref:`Area2D` nodes, and when using the signals creates unnecessary complexity. +Immediate collision overlaps can be done with the :ref:`target_position` set to ``Vector2(0, 0)`` and by calling :ref:`force_shapecast_update` within the same **physics frame**. This also helps to overcome some limitations of :ref:`Area2D` when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to :ref:`Area2D` nodes, and when using the signals creates unnecessary complexity. The node can detect multiple collision objects, but it's usually used to detect the first collision. diff --git a/classes/class_shapecast3d.rst b/classes/class_shapecast3d.rst index 18fad24083d..f1627d9f108 100644 --- a/classes/class_shapecast3d.rst +++ b/classes/class_shapecast3d.rst @@ -21,7 +21,7 @@ Description Shape casting allows to detect collision objects by sweeping the :ref:`shape` along the cast direction determined by :ref:`target_position` (useful for things like beam weapons). -Immediate collision overlaps can be done with the :ref:`target_position` set to ``Vector3(0, 0, 0)`` and by calling :ref:`force_shapecast_update` within the same **physics_frame**. This also helps to overcome some limitations of :ref:`Area3D` when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to :ref:`Area3D` nodes, and when using the signals creates unnecessary complexity. +Immediate collision overlaps can be done with the :ref:`target_position` set to ``Vector3(0, 0, 0)`` and by calling :ref:`force_shapecast_update` within the same **physics frame**. This also helps to overcome some limitations of :ref:`Area3D` when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to :ref:`Area3D` nodes, and when using the signals creates unnecessary complexity. The node can detect multiple collision objects, but it's usually used to detect the first collision. diff --git a/classes/class_skeletonmodification2dfabrik.rst b/classes/class_skeletonmodification2dfabrik.rst index 70bb66fa52b..fc253a2e2e0 100644 --- a/classes/class_skeletonmodification2dfabrik.rst +++ b/classes/class_skeletonmodification2dfabrik.rst @@ -21,7 +21,7 @@ Description This :ref:`SkeletonModification2D` uses an algorithm called Forward And Backward Reaching Inverse Kinematics, or FABRIK, to rotate a bone chain so that it reaches a target. -FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other. +FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. Then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other. Because of how FABRIK works, it often gives more natural results than those seen in :ref:`SkeletonModification2DCCDIK`. FABRIK also supports angle constraints, which are fully taken into account when solving. diff --git a/classes/class_skeletonmodification2dlookat.rst b/classes/class_skeletonmodification2dlookat.rst index 3f1fb091900..7bc27093555 100644 --- a/classes/class_skeletonmodification2dlookat.rst +++ b/classes/class_skeletonmodification2dlookat.rst @@ -104,7 +104,7 @@ The :ref:`Bone2D` node that the modification will operate on. - void **set_bone_index** **(** :ref:`int` value **)** - :ref:`int` **get_bone_index** **(** **)** -The index of the :ref:`Bone2D` node that the modification will oeprate on. +The index of the :ref:`Bone2D` node that the modification will operate on. .. rst-class:: classref-item-separator diff --git a/classes/class_skeletonmodification2dphysicalbones.rst b/classes/class_skeletonmodification2dphysicalbones.rst index 9ee32725320..56c2e2138c1 100644 --- a/classes/class_skeletonmodification2dphysicalbones.rst +++ b/classes/class_skeletonmodification2dphysicalbones.rst @@ -92,7 +92,7 @@ Method Descriptions void **fetch_physical_bones** **(** **)** -Empties the list of :ref:`PhysicalBone2D` nodes and populates it will all :ref:`PhysicalBone2D` nodes that are children of the :ref:`Skeleton2D`. +Empties the list of :ref:`PhysicalBone2D` nodes and populates it with all :ref:`PhysicalBone2D` nodes that are children of the :ref:`Skeleton2D`. .. rst-class:: classref-item-separator diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst index b095b6b0631..9aff498a475 100644 --- a/classes/class_staticbody2d.rst +++ b/classes/class_staticbody2d.rst @@ -14,7 +14,7 @@ StaticBody2D **Inherited By:** :ref:`AnimatableBody2D` -Physics body for 2D physics which is static or moves only by script. Useful for floor and walls. +Physics body for 2D physics which is static or moves only by script (without affecting other bodies on its path). Useful for floors and walls. .. rst-class:: classref-introduction-group @@ -27,7 +27,7 @@ A static body is a simple body that doesn't move under physics simulation, i.e. They have extra functionalities to move and affect other bodies: -\ **Static transform change:** Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. +\ **Static transform change:** Static bodies *can* be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. Use :ref:`AnimatableBody2D` instead of **StaticBody2D** if you need a moving static body that affects other bodies on its path. \ **Constant velocity:** When :ref:`constant_linear_velocity` or :ref:`constant_angular_velocity` is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. diff --git a/classes/class_staticbody3d.rst b/classes/class_staticbody3d.rst index 2671396dd45..1ab6d2d11ce 100644 --- a/classes/class_staticbody3d.rst +++ b/classes/class_staticbody3d.rst @@ -14,7 +14,7 @@ StaticBody3D **Inherited By:** :ref:`AnimatableBody3D` -Physics body for 3D physics which is static or moves only by script. Useful for floor and walls. +Physics body for 3D physics which is static or moves only by script (without affecting other bodies on its path). Useful for floors and walls. .. rst-class:: classref-introduction-group @@ -27,9 +27,9 @@ A static body is a simple body that doesn't move under physics simulation, i.e. They have extra functionalities to move and affect other bodies: -\ *Static transform change:* Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. +\ **Static transform change:** Static bodies *can* be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. Use :ref:`AnimatableBody3D` instead of **StaticBody3D** if you need a moving static body that affects other bodies on its path. -\ *Constant velocity:* When :ref:`constant_linear_velocity` or :ref:`constant_angular_velocity` is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. +\ **Constant velocity:** When :ref:`constant_linear_velocity` or :ref:`constant_angular_velocity` is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. \ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead. diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index b8296519a57..553c83bec48 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -447,11 +447,11 @@ Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsign .. code-tab:: gdscript - put_data("Hello world".to_ascii()) + put_data("Hello world".to_ascii_buffer()) .. code-tab:: csharp - PutData("Hello World".ToAscii()); + PutData("Hello World".ToAsciiBuffer()); @@ -522,11 +522,11 @@ Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsig .. code-tab:: gdscript - put_data("Hello world".to_utf8()) + put_data("Hello world".to_utf8_buffer()) .. code-tab:: csharp - PutData("Hello World".ToUtf8()); + PutData("Hello World".ToUtf8Buffer()); diff --git a/classes/class_string.rst b/classes/class_string.rst index 14f73c61833..0136601519c 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -105,6 +105,8 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hash` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`hex_decode` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hex_to_int` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`humanize_size` **(** :ref:`int` size **)** |static| | @@ -237,6 +239,8 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_wchar_buffer` **(** **)** |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`trim_prefix` **(** :ref:`String` prefix **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`trim_suffix` **(** :ref:`String` suffix **)** |const| | @@ -779,6 +783,35 @@ Returns the 32-bit hash value representing the string's contents. \ **Note:** Strings with equal hash values are *not* guaranteed to be the same, as a result of hash collisions. On the countrary, strings with different hash values are guaranteed to be different. +.. rst-class:: classref-item-separator + +---- + +.. _class_String_method_hex_decode: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **hex_decode** **(** **)** |const| + +Decodes a hexadecimal string as a :ref:`PackedByteArray`. + + +.. tabs:: + + .. code-tab:: gdscript + + var text = "hello world" + var encoded = text.to_utf8_buffer().hex_encode() # outputs "68656c6c6f20776f726c64" + print(buf.hex_decode().get_string_from_utf8()) + + .. code-tab:: csharp + + var text = "hello world"; + var encoded = text.ToUtf8Buffer().HexEncode(); # outputs "68656c6c6f20776f726c64" + GD.Print(buf.HexDecode().GetStringFromUtf8()); + + + .. rst-class:: classref-item-separator ---- @@ -1826,6 +1859,18 @@ Converts the string to a `UTF-8 `__ encoded ---- +.. _class_String_method_to_wchar_buffer: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_wchar_buffer** **(** **)** |const| + +Converts the string to a `wide character `__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray`. + +.. rst-class:: classref-item-separator + +---- + .. _class_String_method_trim_prefix: .. rst-class:: classref-method @@ -1868,7 +1913,7 @@ Returns the character code at position ``at``. :ref:`String` **uri_decode** **(** **)** |const| -Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. +Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also :ref:`uri_encode`. .. tabs:: @@ -1895,7 +1940,7 @@ Decodes the string from its URL-encoded format. This method is meant to properly :ref:`String` **uri_encode** **(** **)** |const| -Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. +Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also :ref:`uri_decode`. .. tabs:: diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index cf55f2f694d..59cb5702b99 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -98,6 +98,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hash` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`hex_decode` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hex_to_int` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`indent` **(** :ref:`String` prefix **)** |const| | @@ -220,6 +222,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`to_wchar_buffer` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`trim_prefix` **(** :ref:`String` prefix **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`trim_suffix` **(** :ref:`String` suffix **)** |const| | @@ -733,6 +737,35 @@ Returns the 32-bit hash value representing the string's contents. \ **Note:** Strings with equal hash values are *not* guaranteed to be the same, as a result of hash collisions. On the countrary, strings with different hash values are guaranteed to be different. +.. rst-class:: classref-item-separator + +---- + +.. _class_StringName_method_hex_decode: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **hex_decode** **(** **)** |const| + +Decodes a hexadecimal string as a :ref:`PackedByteArray`. + + +.. tabs:: + + .. code-tab:: gdscript + + var text = "hello world" + var encoded = text.to_utf8_buffer().hex_encode() # outputs "68656c6c6f20776f726c64" + print(buf.hex_decode().get_string_from_utf8()) + + .. code-tab:: csharp + + var text = "hello world"; + var encoded = text.ToUtf8Buffer().HexEncode(); # outputs "68656c6c6f20776f726c64" + GD.Print(buf.HexDecode().GetStringFromUtf8()); + + + .. rst-class:: classref-item-separator ---- @@ -1669,6 +1702,18 @@ Converts the string to a `UTF-8 `__ encoded ---- +.. _class_StringName_method_to_wchar_buffer: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **to_wchar_buffer** **(** **)** |const| + +Converts the string to a `wide character `__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray`. + +.. rst-class:: classref-item-separator + +---- + .. _class_StringName_method_trim_prefix: .. rst-class:: classref-method diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index f20a42c6ec5..3e673688d8e 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -57,7 +57,7 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`bool` | :ref:`anti_aliasing` | ``true`` | +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ - | :ref:`float` | :ref:`anti_aliasing_size` | ``0.625`` | + | :ref:`float` | :ref:`anti_aliasing_size` | ``1.0`` | +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`Color` | :ref:`bg_color` | ``Color(0.6, 0.6, 0.6, 1)`` | +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ @@ -164,14 +164,16 @@ Antialiasing draws a small ring around the edges, which fades to transparency. A .. rst-class:: classref-property -:ref:`float` **anti_aliasing_size** = ``0.625`` +:ref:`float` **anti_aliasing_size** = ``1.0`` .. rst-class:: classref-property-setget - void **set_aa_size** **(** :ref:`float` value **)** - :ref:`float` **get_aa_size** **(** **)** -This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. +This changes the size of the antialiasing effect. ``1.0`` is recommended for an optimal result at 100% scale, identical to how rounded rectangles are rendered in web browsers and most vector drawing software. + +\ **Note:** Higher values may produce a blur effect but can also create undesired artifacts on small boxes with large-radius corners. .. rst-class:: classref-item-separator diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 515fd8c7770..e6aeda1509e 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -611,6 +611,8 @@ void **set_smooth_group** **(** :ref:`int` index **)** Specifies the smooth group to use for the *next* vertex. If this is never called, all vertices will have the default smooth group of ``0`` and will be smoothed with adjacent vertices of the same group. To produce a mesh with flat normals, set the smooth group to ``-1``. +\ **Note:** This function actually takes an ``uint32_t``, so C# users should use ``uint32.MaxValue`` instead of ``-1`` to produce a mesh with flat normals. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_syntaxhighlighter.rst b/classes/class_syntaxhighlighter.rst index 1f356b8be67..0c6c324b7d6 100644 --- a/classes/class_syntaxhighlighter.rst +++ b/classes/class_syntaxhighlighter.rst @@ -46,7 +46,7 @@ Methods +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_line_syntax_highlighting` **(** :ref:`int` line **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextEdit` | :ref:`get_text_edit` **(** **)** | + | :ref:`TextEdit` | :ref:`get_text_edit` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`update_cache` **(** **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -145,7 +145,7 @@ This will color columns 0-4 red, and columns 5-eol in green. .. rst-class:: classref-method -:ref:`TextEdit` **get_text_edit** **(** **)** +:ref:`TextEdit` **get_text_edit** **(** **)** |const| Returns the associated :ref:`TextEdit` node. diff --git a/classes/class_tabbar.rst b/classes/class_tabbar.rst index b60d0d07b48..b2a19db5a40 100644 --- a/classes/class_tabbar.rst +++ b/classes/class_tabbar.rst @@ -76,6 +76,8 @@ Methods +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tab_icon_max_width` **(** :ref:`int` tab_idx **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_tab_language` **(** :ref:`int` tab_idx **)** |const| | @@ -104,6 +106,8 @@ Methods +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_tab_icon_max_width` **(** :ref:`int` tab_idx, :ref:`int` width **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_language` **(** :ref:`int` tab_idx, :ref:`String` language **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_text_direction` **(** :ref:`int` tab_idx, :ref:`TextDirection` direction **)** | @@ -132,6 +136,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Font` | :ref:`font` | | @@ -454,7 +460,7 @@ Sets the maximum width which all tabs should be limited to. Unlimited if set to - void **set_scroll_to_selected** **(** :ref:`bool` value **)** - :ref:`bool` **get_scroll_to_selected** **(** **)** -If ``true``, the tab offset will be changed to keep the the currently selected tab visible. +If ``true``, the tab offset will be changed to keep the currently selected tab visible. .. rst-class:: classref-item-separator @@ -635,7 +641,7 @@ Returns the previously active tab index. :ref:`Texture2D` **get_tab_button_icon** **(** :ref:`int` tab_idx **)** |const| -Returns the :ref:`Texture2D` for the right button of the tab at index ``tab_idx`` or ``null`` if the button has no :ref:`Texture2D`. +Returns the icon for the right button of the tab at index ``tab_idx`` or ``null`` if the right button has no icon. .. rst-class:: classref-item-separator @@ -647,7 +653,19 @@ Returns the :ref:`Texture2D` for the right button of the tab at :ref:`Texture2D` **get_tab_icon** **(** :ref:`int` tab_idx **)** |const| -Returns the :ref:`Texture2D` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture2D`. +Returns the icon for the tab at index ``tab_idx`` or ``null`` if the tab has no icon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabBar_method_get_tab_icon_max_width: + +.. rst-class:: classref-method + +:ref:`int` **get_tab_icon_max_width** **(** :ref:`int` tab_idx **)** |const| + +Returns the maximum allowed width of the icon for the tab at index ``tab_idx``. .. rst-class:: classref-item-separator @@ -821,6 +839,18 @@ Sets an ``icon`` for the tab at index ``tab_idx``. ---- +.. _class_TabBar_method_set_tab_icon_max_width: + +.. rst-class:: classref-method + +void **set_tab_icon_max_width** **(** :ref:`int` tab_idx, :ref:`int` width **)** + +Sets the maximum allowed width of the icon for the tab at index ``tab_idx``. This limit is applied on top of the default size of the icon and on top of :ref:`icon_max_width`. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_method_set_tab_language: .. rst-class:: classref-method @@ -934,6 +964,18 @@ The horizontal separation between the elements inside tabs. ---- +.. _class_TabBar_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`set_tab_icon_max_width`. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_theme_constant_outline_size: .. rst-class:: classref-themeproperty diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index d1c9bafa9cd..1a6a9e17a64 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -123,6 +123,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_unselected_color` | ``Color(0.7, 0.7, 0.7, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`icon_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | @@ -646,6 +648,18 @@ Font color of the other, unselected tabs. ---- +.. _class_TabContainer_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TabBar.set_tab_icon_max_width`. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_theme_constant_icon_separation: .. rst-class:: classref-themeproperty diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 369492eaaf7..00187d1d026 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -40,6 +40,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`caret_blink_interval` | ``0.65`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`caret_draw_when_editable_disabled` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`caret_mid_grapheme` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`caret_move_on_right_click` | ``true`` | @@ -959,7 +961,7 @@ Select whole words as if the user double clicked. :ref:`SelectionMode` **SELECTION_MODE_LINE** = ``4`` -Select whole lines as if the user tripped clicked. +Select whole lines as if the user triple clicked. .. rst-class:: classref-item-separator @@ -1041,7 +1043,7 @@ Property Descriptions - void **set_caret_blink_enabled** **(** :ref:`bool` value **)** - :ref:`bool` **is_caret_blink_enabled** **(** **)** -Sets if the caret should blink. +If ``true``, makes the caret blink. .. rst-class:: classref-item-separator @@ -1058,7 +1060,24 @@ Sets if the caret should blink. - void **set_caret_blink_interval** **(** :ref:`float` value **)** - :ref:`float` **get_caret_blink_interval** **(** **)** -Duration (in seconds) of a caret's blinking cycle. +The interval at which the caret blinks (in seconds). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextEdit_property_caret_draw_when_editable_disabled: + +.. rst-class:: classref-property + +:ref:`bool` **caret_draw_when_editable_disabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_draw_caret_when_editable_disabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drawing_caret_when_editable_disabled** **(** **)** + +If ``true``, caret will be visible when :ref:`editable` is disabled. .. rst-class:: classref-item-separator @@ -2453,7 +2472,7 @@ Returns the scroll position for ``wrap_index`` of ``line``. :ref:`String` **get_selected_text** **(** :ref:`int` caret_index=-1 **)** -Returns the text inside the selection. +Returns the text inside the selection of a caret, or all the carets if ``caret_index`` is its default value ``-1``. .. rst-class:: classref-item-separator diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 49479dba4a9..49c39146c02 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -54,6 +54,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_char_from_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_embolden` **(** :ref:`RID` font_rid **)** |const| | @@ -1006,6 +1008,14 @@ Grapheme is connected to the previous grapheme. Breaking line before this graphe It is safe to insert a U+0640 before this grapheme for elongation. +.. _class_TextServer_constant_GRAPHEME_IS_EMBEDDED_OBJECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag` **GRAPHEME_IS_EMBEDDED_OBJECT** = ``4096`` + +Grapheme is an object replacement character for the embedded object. + .. rst-class:: classref-item-separator ---- @@ -1579,6 +1589,18 @@ Returns the font ascent (number of pixels above the baseline). ---- +.. _class_TextServer_method_font_get_char_from_glyph_index: + +.. rst-class:: classref-method + +:ref:`int` **font_get_char_from_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |const| + +Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`font_get_glyph_index`. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_descent: .. rst-class:: classref-method @@ -1701,7 +1723,7 @@ Returns outline contours of the glyph as a ``Dictionary`` with the following con :ref:`int` **font_get_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| -Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. +Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. See :ref:`font_get_char_from_glyph_index`. .. rst-class:: classref-item-separator @@ -2929,7 +2951,7 @@ Returns ``true`` if locale is right-to-left. :ref:`bool` **is_valid_identifier** **(** :ref:`String` string **)** |const| -Returns ``true`` is ``string`` is a valid identifier. +Returns ``true`` if ``string`` is a valid identifier. If the text server supports the :ref:`FEATURE_UNICODE_IDENTIFIERS` feature, a valid identifier must: @@ -3129,7 +3151,7 @@ Draw the outline of the shaped text into a canvas item at a given position, with :ref:`float` **shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags=3 **)** -Adjusts text with to fit to specified width, returns new text width. +Adjusts text width to fit to specified width, returns new text width. .. rst-class:: classref-item-separator diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index a7f0a026c25..747df3fb640 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -56,6 +56,8 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_char_from_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |virtual| |const| | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_embolden` **(** :ref:`RID` font_rid **)** |virtual| |const| | @@ -598,6 +600,20 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI ---- +.. _class_TextServerExtension_method__font_get_char_from_glyph_index: + +.. rst-class:: classref-method + +:ref:`int` **_font_get_char_from_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_method__font_get_descent: .. rst-class:: classref-method diff --git a/classes/class_texturelayered.rst b/classes/class_texturelayered.rst index 4f0db755a3e..4ee057d8bb6 100644 --- a/classes/class_texturelayered.rst +++ b/classes/class_texturelayered.rst @@ -21,7 +21,7 @@ Base class for texture types which contain the data of multiple :ref:`Image`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also :ref:`Texture3D`. +Base class for :ref:`ImageTextureLayered` and :ref:`CompressedTextureLayered`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also :ref:`Texture3D`. Data is set on a per-layer basis. For :ref:`Texture2DArray`\ s, the layer specifies the array layer. @@ -135,7 +135,7 @@ Called when the **TextureLayered**'s format is queried. :ref:`int` **_get_height** **(** **)** |virtual| |const| -Called when the the **TextureLayered**'s height is queried. +Called when the **TextureLayered**'s height is queried. .. rst-class:: classref-item-separator diff --git a/classes/class_theme.rst b/classes/class_theme.rst index e67084ecf20..0e6182e14d8 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -704,7 +704,7 @@ Returns a list of all unique theme type names for :ref:`StyleBox Returns the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists. -Returns the engine fallback icon value if the property doesn't exist (see :ref:`ThemeDB`). Use :ref:`has_theme_item` to check for existence. +Returns the engine fallback value if the property doesn't exist (see :ref:`ThemeDB`). Use :ref:`has_theme_item` to check for existence. \ **Note:** This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic. diff --git a/classes/class_thread.rst b/classes/class_thread.rst index da9c11b6c67..8c01342da07 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -108,7 +108,7 @@ Method Descriptions :ref:`String` **get_id** **(** **)** |const| -Returns the current **Thread**'s ID, uniquely identifying it among all threads. If the **Thread** is not running this returns an empty string. +Returns the current **Thread**'s ID, uniquely identifying it among all threads. If the **Thread** has not started running or if :ref:`wait_to_finish` has been called, this returns an empty string. .. rst-class:: classref-item-separator @@ -120,7 +120,7 @@ Returns the current **Thread**'s ID, uniquely identifying it among all threads. :ref:`bool` **is_alive** **(** **)** |const| -Returns ``true`` if this **Thread** is currently running. This is useful for determining if :ref:`wait_to_finish` can be called without blocking the calling thread. +Returns ``true`` if this **Thread** is currently running the provided function. This is useful for determining if :ref:`wait_to_finish` can be called without blocking the calling thread. To check if a **Thread** is joinable, use :ref:`is_started`. diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index bb41686c5a3..4c23f8f9d6b 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -712,7 +712,7 @@ Physics layers allow assigning collision polygons to atlas tiles. Adds a :ref:`TileSetSource` to the TileSet. If ``atlas_source_id_override`` is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. -The function returns the added source source ID or -1 if the source could not be added. +The function returns the added source ID or -1 if the source could not be added. .. rst-class:: classref-item-separator @@ -860,7 +860,7 @@ Returns whether or not the specified navigation layer of the TileSet navigation :ref:`int` **get_navigation_layer_layers** **(** :ref:`int` layer_index **)** |const| -Returns the navigation layers (as in the Navigation server) of the gives TileSet navigation layer. +Returns the navigation layers (as in the Navigation server) of the given TileSet navigation layer. .. rst-class:: classref-item-separator @@ -1450,7 +1450,7 @@ Based on ``value``, enables or disables the specified navigation layer of the Ti void **set_navigation_layer_layers** **(** :ref:`int` layer_index, :ref:`int` layers **)** -Sets the navigation layers (as in the navigation server) for navigation regions is the given TileSet navigation layer. +Sets the navigation layers (as in the navigation server) for navigation regions in the given TileSet navigation layer. .. rst-class:: classref-item-separator @@ -1474,7 +1474,7 @@ Sets the occlusion layer (as in the rendering server) for occluders in the given void **set_occlusion_layer_sdf_collision** **(** :ref:`int` layer_index, :ref:`bool` sdf_collision **)** -Enables or disables sdf collision for occluders in the given TileSet occlusion layer. +Enables or disables SDF collision for occluders in the given TileSet occlusion layer. .. rst-class:: classref-item-separator @@ -1534,7 +1534,7 @@ Changes a source's ID. void **set_source_level_tile_proxy** **(** :ref:`int` source_from, :ref:`int` source_to **)** -Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlac coordinates ID and the alternative tile ID are kept the same when using source-level proxies. +Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies. This can be used to replace a source in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target source when one is available. diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 7bcf08e599d..f2777087a99 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -404,7 +404,7 @@ Returns the inverse of the transform, under the assumption that the transformati :ref:`bool` **is_equal_approx** **(** :ref:`Transform2D` xform **)** |const| -Returns ``true`` if this transform and ``transform`` are approximately equal, by calling ``is_equal_approx`` on each component. +Returns ``true`` if this transform and ``xform`` are approximately equal, by calling ``is_equal_approx`` on each component. .. rst-class:: classref-item-separator @@ -428,7 +428,7 @@ Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_f :ref:`Transform2D` **looking_at** **(** :ref:`Vector2` target=Vector2(0, 0) **)** |const| -Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the ``target`` position. +Returns a copy of the transform rotated such that the rotated X-axis points towards the ``target`` position. Operations take place in global space. @@ -456,9 +456,7 @@ Returns the transform with the basis orthogonal (90 degrees), and normalized axi Returns a copy of the transform rotated by the given ``angle`` (in radians). -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``. This can be seen as transforming with respect to the global/parent frame. @@ -474,9 +472,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform rotated by the given ``angle`` (in radians). -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. This can be seen as transforming with respect to the local frame. @@ -492,9 +488,7 @@ This can be seen as transforming with respect to the local frame. Returns a copy of the transform scaled by the given ``scale`` factor. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. This can be seen as transforming with respect to the global/parent frame. @@ -510,9 +504,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform scaled by the given ``scale`` factor. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. This can be seen as transforming with respect to the local frame. @@ -528,9 +520,7 @@ This can be seen as transforming with respect to the local frame. Returns a copy of the transform translated by the given ``offset``. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. This can be seen as transforming with respect to the global/parent frame. @@ -546,9 +536,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform translated by the given ``offset``. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. This can be seen as transforming with respect to the local frame. diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index b2f377d1be5..b4087924258 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -314,7 +314,7 @@ Returns the inverse of the transform, under the assumption that the transformati :ref:`bool` **is_equal_approx** **(** :ref:`Transform3D` xform **)** |const| -Returns ``true`` if this transform and ``transform`` are approximately equal, by calling ``is_equal_approx`` on each component. +Returns ``true`` if this transform and ``xform`` are approximately equal, by calling ``is_equal_approx`` on each component. .. rst-class:: classref-item-separator @@ -368,9 +368,7 @@ Returns a copy of the transform rotated around the given ``axis`` by the given ` The ``axis`` must be a normalized vector. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``. This can be seen as transforming with respect to the global/parent frame. @@ -388,9 +386,7 @@ Returns a copy of the transform rotated around the given ``axis`` by the given ` The ``axis`` must be a normalized vector. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``. This can be seen as transforming with respect to the local frame. @@ -406,9 +402,7 @@ This can be seen as transforming with respect to the local frame. Returns a copy of the transform scaled by the given ``scale`` factor. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. This can be seen as transforming with respect to the global/parent frame. @@ -424,9 +418,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform scaled by the given ``scale`` factor. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. This can be seen as transforming with respect to the local frame. @@ -442,9 +434,7 @@ This can be seen as transforming with respect to the local frame. Returns a copy of the transform translated by the given ``offset``. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. This can be seen as transforming with respect to the global/parent frame. @@ -460,9 +450,7 @@ This can be seen as transforming with respect to the global/parent frame. Returns a copy of the transform translated by the given ``offset``. -This method is an optimized version of multiplying the given transform ``X``\ - -with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. +This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. This can be seen as transforming with respect to the local frame. diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index 6353bac2a72..dda17a771d4 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -379,7 +379,7 @@ Returns the current locale's translation for the given message (key) and context :ref:`StringName` **translate_plural** **(** :ref:`StringName` message, :ref:`StringName` plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| -Returns the current locale's translation for the given message (key), plural_message and context. +Returns the current locale's translation for the given message (key), plural message and context. The number ``n`` is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 87fecaee187..230a3b1e167 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -100,77 +100,81 @@ Methods .. table:: :widths: auto - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=null, :ref:`int` index=-1 **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect_all` **(** **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`edit_selected` **(** **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`ensure_cursor_is_visible` **(** **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_button_id_at_position` **(** :ref:`Vector2` position **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_column_at_position` **(** :ref:`Vector2` position **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_column_expand_ratio` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_column_title` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextDirection` | :ref:`get_column_title_direction` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_column_title_language` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_column_width` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_custom_popup_rect` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_drop_section_at_position` **(** :ref:`Vector2` position **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_edited` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_edited_column` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_item_at_position` **(** :ref:`Vector2` position **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_next_selected` **(** :ref:`TreeItem` from **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_pressed_button` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_root` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_scroll` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem` | :ref:`get_selected` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selected_column` **(** **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_column_clipping_content` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_column_expanding` **(** :ref:`int` column **)** |const| | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_item` **(** :ref:`TreeItem` item, :ref:`bool` center_on_item=false **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_clip_content` **(** :ref:`int` column, :ref:`bool` enable **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_custom_minimum_width` **(** :ref:`int` column, :ref:`int` min_width **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_expand` **(** :ref:`int` column, :ref:`bool` expand **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_expand_ratio` **(** :ref:`int` column, :ref:`int` ratio **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title` **(** :ref:`int` column, :ref:`String` title **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title_language` **(** :ref:`int` column, :ref:`String` language **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_selected` **(** :ref:`TreeItem` item, :ref:`int` column **)** | - +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=null, :ref:`int` index=-1 **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect_all` **(** **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`edit_selected` **(** **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`ensure_cursor_is_visible` **(** **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_button_id_at_position` **(** :ref:`Vector2` position **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_column_at_position` **(** :ref:`Vector2` position **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_column_expand_ratio` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_column_title` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | :ref:`get_column_title_alignment` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`get_column_title_direction` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_column_title_language` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_column_width` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_custom_popup_rect` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_drop_section_at_position` **(** :ref:`Vector2` position **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_edited` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_edited_column` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_item_at_position` **(** :ref:`Vector2` position **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_next_selected` **(** :ref:`TreeItem` from **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_pressed_button` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_root` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_scroll` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem` | :ref:`get_selected` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selected_column` **(** **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_column_clipping_content` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_column_expanding` **(** :ref:`int` column **)** |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_item` **(** :ref:`TreeItem` item, :ref:`bool` center_on_item=false **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_clip_content` **(** :ref:`int` column, :ref:`bool` enable **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_custom_minimum_width` **(** :ref:`int` column, :ref:`int` min_width **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_expand` **(** :ref:`int` column, :ref:`bool` expand **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_expand_ratio` **(** :ref:`int` column, :ref:`int` ratio **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title` **(** :ref:`int` column, :ref:`String` title **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title_alignment` **(** :ref:`int` column, :ref:`HorizontalAlignment` title_alignment **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title_direction` **(** :ref:`int` column, :ref:`TextDirection` direction **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_column_title_language` **(** :ref:`int` column, :ref:`String` language **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_selected` **(** :ref:`TreeItem` item, :ref:`int` column **)** | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -211,6 +215,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`item_margin` | ``16`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | @@ -225,6 +231,18 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`scroll_speed` | ``12`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_h_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_bottom` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_left` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_right` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_top` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`scrollbar_v_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`v_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Font` | :ref:`font` | | @@ -865,6 +883,18 @@ Returns the column's title. ---- +.. _class_Tree_method_get_column_title_alignment: + +.. rst-class:: classref-method + +:ref:`HorizontalAlignment` **get_column_title_alignment** **(** :ref:`int` column **)** |const| + +Returns the column title alignment. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_method_get_column_title_direction: .. rst-class:: classref-method @@ -1180,6 +1210,18 @@ Sets the title of a column. ---- +.. _class_Tree_method_set_column_title_alignment: + +.. rst-class:: classref-method + +void **set_column_title_alignment** **(** :ref:`int` column, :ref:`HorizontalAlignment` title_alignment **)** + +Sets the column title alignment. Note that :ref:`@GlobalScope.HORIZONTAL_ALIGNMENT_FILL` is not supported for column titles. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_method_set_column_title_direction: .. rst-class:: classref-method @@ -1401,6 +1443,18 @@ The horizontal space between item cells. This is also used as the margin at the ---- +.. _class_Tree_theme_constant_icon_max_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **icon_max_width** = ``0`` + +The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TreeItem.set_icon_max_width`. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_theme_constant_item_margin: .. rst-class:: classref-themeproperty @@ -1487,6 +1541,78 @@ The speed of border scrolling. ---- +.. _class_Tree_theme_constant_scrollbar_h_separation: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_h_separation** = ``4`` + +The horizontal separation of tree content and scrollbar. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_margin_bottom: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_margin_bottom** = ``-1`` + +The bottom margin of the scrollbars. When negative, uses :ref:`panel` bottom margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_margin_left: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_margin_left** = ``-1`` + +The left margin of the horizontal scrollbar. When negative, uses :ref:`panel` left margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_margin_right: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_margin_right** = ``-1`` + +The right margin of the scrollbars. When negative, uses :ref:`panel` right margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_margin_top: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_margin_top** = ``-1`` + +The right margin of the vertical scrollbar. When negative, uses :ref:`panel` top margin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_constant_scrollbar_v_separation: + +.. rst-class:: classref-themeproperty + +:ref:`int` **scrollbar_v_separation** = ``4`` + +The vertical separation of tree content and scrollbar. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_theme_constant_v_separation: .. rst-class:: classref-themeproperty diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index 70745b6752b..c43c8ff85a5 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -654,7 +654,7 @@ Returns the given column's icon :ref:`Texture2D`. Error if no i :ref:`int` **get_icon_max_width** **(** :ref:`int` column **)** |const| -Returns the column's icon's maximum width. +Returns the maximum allowed width of the icon in the given ``column``. .. rst-class:: classref-item-separator @@ -1262,7 +1262,7 @@ Sets the given column's icon :ref:`Texture2D`. void **set_icon_max_width** **(** :ref:`int` column, :ref:`int` width **)** -Sets the given column's icon's maximum width. +Sets the maximum allowed width of the icon in the given ``column``. This limit is applied on top of the default size of the icon and on top of :ref:`Tree.icon_max_width`. The height is adjusted according to the icon's ratio. .. rst-class:: classref-item-separator diff --git a/classes/class_tween.rst b/classes/class_tween.rst index cc7d2259b0c..00129301fa3 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -141,9 +141,9 @@ Some :ref:`Tweener`\ s use transitions and eases. The first accep \ `Tween easing and transition types cheatsheet `__\ -\ **Note:** All **Tween**\ s will automatically start by default. To prevent a **Tween** from autostarting, you can call :ref:`stop` immediately after it is created. +\ **Note:** Tweens are not designed to be re-used and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating. -\ **Note:** **Tween**\ s are processing after all of nodes in the current frame, i.e. after :ref:`Node._process` or :ref:`Node._physics_process` (depending on :ref:`TweenProcessMode`). +\ **Note:** Tweens are processing after all of nodes in the current frame, i.e. after :ref:`Node._process` or :ref:`Node._physics_process` (depending on :ref:`TweenProcessMode`). .. rst-class:: classref-reftable-group @@ -160,6 +160,8 @@ Methods +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`custom_step` **(** :ref:`float` delta **)** | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_loops_left` **(** **)** |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_total_elapsed_time` **(** **)** |const| | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`interpolate_value` **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** |static| | @@ -218,8 +220,6 @@ Signals Emitted when the **Tween** has finished all tweening. Never emitted when the **Tween** is set to infinite looping (see :ref:`set_loops`). -\ **Note:** The **Tween** is removed (invalidated) in the next processing frame after this signal is emitted. Calling :ref:`stop` inside the signal callback will prevent the **Tween** from being removed. - .. rst-class:: classref-item-separator ---- @@ -513,7 +513,17 @@ Processes the **Tween** by the given ``delta`` value, in seconds. This is mostly Returns ``true`` if the **Tween** still has :ref:`Tweener`\ s that haven't finished. -\ **Note:** The **Tween** will become invalid in the next processing frame after its animation finishes. Calling :ref:`stop` after performing :ref:`custom_step` instead keeps and resets the **Tween**. +.. rst-class:: classref-item-separator + +---- + +.. _class_Tween_method_get_loops_left: + +.. rst-class:: classref-method + +:ref:`int` **get_loops_left** **(** **)** |const| + +Returns the number of remaining loops for this **Tween** (see :ref:`set_loops`). A return value of ``-1`` indicates an infinitely looping **Tween**, and a return value of ``0`` indicates that the **Tween** has already finished. .. rst-class:: classref-item-separator diff --git a/classes/class_udpserver.rst b/classes/class_udpserver.rst index 17eadf9f752..459cf35bbba 100644 --- a/classes/class_udpserver.rst +++ b/classes/class_udpserver.rst @@ -43,7 +43,7 @@ Below a small example of how it can be used: func _process(delta): server.poll() # Important! if server.is_connection_available(): - var peer : PacketPeerUDP = server.take_connection() + var peer: PacketPeerUDP = server.take_connection() var packet = peer.get_packet() print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()]) print("Received data: %s" % [packet.get_string_from_utf8()]) @@ -112,7 +112,7 @@ Below a small example of how it can be used: func _process(delta): if !connected: # Try to contact server - udp.put_packet("The answer is... 42!".to_utf8()) + udp.put_packet("The answer is... 42!".to_utf8_buffer()) if udp.get_available_packet_count() > 0: print("Connected: %s" % udp.get_packet().get_string_from_utf8()) connected = true @@ -137,7 +137,7 @@ Below a small example of how it can be used: if (!_connected) { // Try to contact server - _udp.PutPacket("The Answer Is..42!".ToUtf8()); + _udp.PutPacket("The Answer Is..42!".ToUtf8Buffer()); } if (_udp.GetAvailablePacketCount() > 0) { diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst index e9e64bad8ee..36dd14b8e0d 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -12,25 +12,25 @@ UndoRedo **Inherits:** :ref:`Object` -Helper to manage undo/redo operations in the editor or custom tools. +General-purpose helper to manage undo/redo operations. .. rst-class:: classref-introduction-group Description ----------- -Helper to manage undo/redo operations in the editor or custom tools. It works by registering methods and property changes inside "actions". +UndoRedo works by registering methods and property changes inside "actions". Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action. -Here's an example on how to add an action to the Godot editor's own **UndoRedo**, from a plugin: +Here's an example on how to add an UndoRedo action: .. tabs:: .. code-tab:: gdscript - var undo_redo = get_undo_redo() # Method of EditorPlugin. + var undo_redo = UndoRedo.new() func do_something(): pass # Put your code here. @@ -41,8 +41,8 @@ Here's an example on how to add an action to the Godot editor's own **UndoRedo** func _on_my_button_pressed(): var node = get_node("MyNode2D") undo_redo.create_action("Move the node") - undo_redo.add_do_method(self, "do_something") - undo_redo.add_undo_method(self, "undo_something") + undo_redo.add_do_method(do_something) + undo_redo.add_undo_method(undo_something) undo_redo.add_do_property(node, "position", Vector2(100,100)) undo_redo.add_undo_property(node, "position", node.position) undo_redo.commit_action() @@ -53,7 +53,7 @@ Here's an example on how to add an action to the Godot editor's own **UndoRedo** public override void _Ready() { - _undoRedo = GetUndoRedo(); // Method of EditorPlugin. + _undoRedo = new UndoRedo(); } public void DoSomething() @@ -83,6 +83,8 @@ Here's an example on how to add an action to the Godot editor's own **UndoRedo** If you don't need to register a method, you can leave :ref:`add_do_method` and :ref:`add_undo_method` out; the same goes for properties. You can also register more than one method/property. +If you are making an :ref:`EditorPlugin` and want to integrate into the editor's undo history, use :ref:`EditorUndoRedoManager` instead. + .. rst-class:: classref-reftable-group Methods @@ -232,6 +234,15 @@ void **add_do_reference** **(** :ref:`Object` object **)** Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. +:: + + var node = Node2D.new() + undo_redo.create_action("Add node") + undo_redo.add_do_method(add_child.bind(node)) + undo_redo.add_do_reference(node) + undo_redo.add_undo_method(remove_child.bind(node)) + undo_redo.commit_action() + .. rst-class:: classref-item-separator ---- @@ -268,6 +279,15 @@ void **add_undo_reference** **(** :ref:`Object` object **)** Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). +:: + + var node = $Node2D + undo_redo.create_action("Remove node") + undo_redo.add_do_method(remove_child.bind(node)) + undo_redo.add_undo_method(add_child.bind(node)) + undo_redo.add_undo_reference(node) + undo_redo.commit_action() + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index f9318884da8..b501d9c4b35 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -534,7 +534,7 @@ This is the signed area of the parallelogram formed by the two vectors. If the s :ref:`Vector2` **cubic_interpolate** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight **)** |const| -Cubically interpolates between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. +Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. .. rst-class:: classref-item-separator @@ -546,7 +546,7 @@ Cubically interpolates between this vector and ``b`` using ``pre_a`` and ``post_ :ref:`Vector2` **cubic_interpolate_in_time** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` weight, :ref:`float` b_t, :ref:`float` pre_a_t, :ref:`float` post_b_t **)** |const| -Cubically interpolates between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. +Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. @@ -646,7 +646,7 @@ Creates a unit **Vector2** rotated to the given ``angle`` in radians. This is eq :ref:`bool` **is_equal_approx** **(** :ref:`Vector2` to **)** |const| -Returns ``true`` if this vector and ``v`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. .. rst-class:: classref-item-separator @@ -670,7 +670,7 @@ Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_fini :ref:`bool` **is_normalized** **(** **)** |const| -Returns ``true`` if the vector is normalized, ``false`` otherwise. +Returns ``true`` if the vector is normalized, i.e. its length is approximately equal to 1. .. rst-class:: classref-item-separator @@ -722,7 +722,7 @@ This method runs faster than :ref:`length`, so pref :ref:`Vector2` **lerp** **(** :ref:`Vector2` to, :ref:`float` weight **)** |const| -Returns the result of the linear interpolation between this vector and ``to`` by amount ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. +Returns the result of the linear interpolation between this vector and ``to`` by amount ``weight``. ``weight`` is on the range of ``0.0`` to ``1.0``, representing the amount of interpolation. .. rst-class:: classref-item-separator @@ -782,7 +782,9 @@ Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not :ref:`Vector2` **normalized** **(** **)** |const| -Returns a new vector scaled to unit length. Equivalent to ``v / v.length()``. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized`. + +\ **Note:** This function may return incorrect values if the input vector length is near zero. .. rst-class:: classref-item-separator diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index 0d0fcf28b7c..8808d0408a6 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -279,7 +279,7 @@ Constructs a **Vector2i** as a copy of the given **Vector2i**. :ref:`Vector2i` **Vector2i** **(** :ref:`Vector2` from **)** -Constructs a new **Vector2i** from :ref:`Vector2`. The floating point coordinates will be truncated. +Constructs a new **Vector2i** from the given :ref:`Vector2` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector2.ceil`, :ref:`Vector2.floor` or :ref:`Vector2.round` to this constructor instead. .. rst-class:: classref-item-separator @@ -449,7 +449,7 @@ Gets the remainder of each component of the **Vector2i** with the components of :ref:`Vector2i` **operator %** **(** :ref:`int` right **)** -Gets the remainder of each component of the **Vector2i** with the the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Gets the remainder of each component of the **Vector2i** with the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. :: diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index 597dc8eeff7..6ff2f4fbac1 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -654,7 +654,7 @@ Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_fini :ref:`bool` **is_normalized** **(** **)** |const| -Returns ``true`` if the vector is :ref:`normalized`, ``false`` otherwise. +Returns ``true`` if the vector is normalized, i.e. its length is approximately equal to 1. .. rst-class:: classref-item-separator @@ -706,7 +706,7 @@ This method runs faster than :ref:`length`, so pref :ref:`Vector3` **lerp** **(** :ref:`Vector3` to, :ref:`float` weight **)** |const| -Returns the result of the linear interpolation between this vector and ``to`` by amount ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. +Returns the result of the linear interpolation between this vector and ``to`` by amount ``weight``. ``weight`` is on the range of ``0.0`` to ``1.0``, representing the amount of interpolation. .. rst-class:: classref-item-separator @@ -766,7 +766,9 @@ Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not :ref:`Vector3` **normalized** **(** **)** |const| -Returns the vector scaled to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized`. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized`. + +\ **Note:** This function may return incorrect values if the input vector length is near zero. .. rst-class:: classref-item-separator diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index 15bb14d6552..8b346677ba1 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -315,7 +315,7 @@ Constructs a **Vector3i** as a copy of the given **Vector3i**. :ref:`Vector3i` **Vector3i** **(** :ref:`Vector3` from **)** -Constructs a new **Vector3i** from :ref:`Vector3`. The floating point coordinates will be truncated. +Constructs a new **Vector3i** from the given :ref:`Vector3` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector3.ceil`, :ref:`Vector3.floor` or :ref:`Vector3.round` to this constructor instead. .. rst-class:: classref-item-separator @@ -473,7 +473,7 @@ Gets the remainder of each component of the **Vector3i** with the components of :ref:`Vector3i` **operator %** **(** :ref:`int` right **)** -Gets the remainder of each component of the **Vector3i** with the the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Gets the remainder of each component of the **Vector3i** with the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. :: diff --git a/classes/class_vector4.rst b/classes/class_vector4.rst index fe4bae2e1ed..e3d2ba106c0 100644 --- a/classes/class_vector4.rst +++ b/classes/class_vector4.rst @@ -92,7 +92,7 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector4` | :ref:`inverse` **(** **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector4` with **)** |const| | + | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Vector4` to **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -483,9 +483,9 @@ Returns the inverse of the vector. This is the same as ``Vector4(1.0 / v.x, 1.0 .. rst-class:: classref-method -:ref:`bool` **is_equal_approx** **(** :ref:`Vector4` with **)** |const| +:ref:`bool` **is_equal_approx** **(** :ref:`Vector4` to **)** |const| -Returns ``true`` if this vector and ``with`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. .. rst-class:: classref-item-separator @@ -509,7 +509,7 @@ Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_fini :ref:`bool` **is_normalized** **(** **)** |const| -Returns ``true`` if the vector is normalized, i.e. its length is equal to 1. +Returns ``true`` if the vector is normalized, i.e. its length is approximately equal to 1. .. rst-class:: classref-item-separator @@ -547,7 +547,9 @@ Returns the length (magnitude) of this vector. :ref:`float` **length_squared** **(** **)** |const| -Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`. +Returns the squared length (squared magnitude) of this vector. + +This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator @@ -595,7 +597,9 @@ Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all :ref:`Vector4` **normalized** **(** **)** |const| -Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized`. + +\ **Note:** This function may return incorrect values if the input vector length is near zero. .. rst-class:: classref-item-separator @@ -607,7 +611,7 @@ Returns the result of scaling the vector to unit length. Equivalent to ``v / v.l :ref:`Vector4` **posmod** **(** :ref:`float` mod **)** |const| -Returns a new vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. +Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``mod``. .. rst-class:: classref-item-separator @@ -619,7 +623,7 @@ Returns a new vector composed of the :ref:`@GlobalScope.fposmod` **posmodv** **(** :ref:`Vector4` modv **)** |const| -Returns a new vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. +Returns a vector composed of the :ref:`@GlobalScope.fposmod` of this vector's components and ``modv``'s components. .. rst-class:: classref-item-separator diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index e21d5f01c0f..0ee3718498c 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -276,7 +276,7 @@ Constructs a **Vector4i** as a copy of the given **Vector4i**. :ref:`Vector4i` **Vector4i** **(** :ref:`Vector4` from **)** -Constructs a new **Vector4i** from the given :ref:`Vector4`. +Constructs a new **Vector4i** from the given :ref:`Vector4` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector4.ceil`, :ref:`Vector4.floor` or :ref:`Vector4.round` to this constructor instead. .. rst-class:: classref-item-separator @@ -339,7 +339,9 @@ Returns the length (magnitude) of this vector. :ref:`int` **length_squared** **(** **)** |const| -Returns the squared length (squared magnitude) of this vector. This method runs faster than :ref:`length`. +Returns the squared length (squared magnitude) of this vector. + +This method runs faster than :ref:`length`, so prefer it if you need to compare vectors or need the squared distance for some formula. .. rst-class:: classref-item-separator diff --git a/classes/class_vehiclewheel3d.rst b/classes/class_vehiclewheel3d.rst index 01ffe2053dd..149963048b0 100644 --- a/classes/class_vehiclewheel3d.rst +++ b/classes/class_vehiclewheel3d.rst @@ -53,7 +53,7 @@ Properties +---------------------------+---------------------------------------------------------------------------------+------------+ | :ref:`float` | :ref:`suspension_stiffness` | ``5.88`` | +---------------------------+---------------------------------------------------------------------------------+------------+ - | :ref:`float` | :ref:`suspension_travel` | ``5.0`` | + | :ref:`float` | :ref:`suspension_travel` | ``0.2`` | +---------------------------+---------------------------------------------------------------------------------+------------+ | :ref:`bool` | :ref:`use_as_steering` | ``false`` | +---------------------------+---------------------------------------------------------------------------------+------------+ @@ -222,7 +222,7 @@ This value defines the stiffness of the suspension. Use a value lower than 50 fo .. rst-class:: classref-property -:ref:`float` **suspension_travel** = ``5.0`` +:ref:`float` **suspension_travel** = ``0.2`` .. rst-class:: classref-property-setget diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index f25fc29e902..461a5c727d9 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -334,7 +334,7 @@ enum **Scaling3DMode**: :ref:`Scaling3DMode` **SCALING_3D_MODE_BILINEAR** = ``0`` -Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. +Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less than ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. .. _class_Viewport_constant_SCALING_3D_MODE_FSR: @@ -342,7 +342,7 @@ Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be :ref:`Scaling3DMode` **SCALING_3D_MODE_FSR** = ``1`` -Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. +Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less than ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. .. _class_Viewport_constant_SCALING_3D_MODE_MAX: @@ -1199,7 +1199,7 @@ If ``true``, the GUI controls on the viewport will lay pixel perfectly. - void **set_handle_input_locally** **(** :ref:`bool` value **)** - :ref:`bool` **is_handling_input_locally** **(** **)** -If ``true``, this viewport will mark incoming input events as handled by itself. If ``false``, this is instead done by the the first parent viewport that is set to handle input locally. +If ``true``, this viewport will mark incoming input events as handled by itself. If ``false``, this is instead done by the first parent viewport that is set to handle input locally. A :ref:`SubViewportContainer` will automatically set this property to ``false`` for the **Viewport** contained inside of it. @@ -1860,9 +1860,7 @@ Returns the :ref:`PositionalShadowAtlasQuadrantSubdiv` **get_render_info** **(** :ref:`RenderInfoType` type, :ref:`RenderInfo` info **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns rendering statistics of the given type. See :ref:`RenderInfoType` and :ref:`RenderInfo` for options. .. rst-class:: classref-item-separator @@ -2032,9 +2030,7 @@ If an earlier method marks the input as handled via :ref:`set_input_as_handled` text **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Helper method which calls the ``set_text()`` method on the currently focused :ref:`Control`, provided that it is defined (e.g. if the focused Control is :ref:`Button` or :ref:`LineEdit`). .. rst-class:: classref-item-separator diff --git a/classes/class_visualinstance3d.rst b/classes/class_visualinstance3d.rst index ee90f213e24..ef104aa9312 100644 --- a/classes/class_visualinstance3d.rst +++ b/classes/class_visualinstance3d.rst @@ -85,7 +85,7 @@ Property Descriptions The render layer(s) this **VisualInstance3D** is drawn on. -This object will only be visible for :ref:`Camera3D`\ s whose cull mask includes the render object this **VisualInstance3D** is set to. +This object will only be visible for :ref:`Camera3D`\ s whose cull mask includes any of the render layers this **VisualInstance3D** is set to. For :ref:`Light3D`\ s, this can be used to control which **VisualInstance3D**\ s are affected by a specific light. For :ref:`GPUParticles3D`, this can be used to control which particles are effected by a specific attractor. For :ref:`Decal`\ s, this can be used to control which **VisualInstance3D**\ s are affected by a specific decal. diff --git a/classes/class_visualshadernodetextureparameter.rst b/classes/class_visualshadernodetextureparameter.rst index f146ef8fd4d..eef8bbedb52 100644 --- a/classes/class_visualshadernodetextureparameter.rst +++ b/classes/class_visualshadernodetextureparameter.rst @@ -381,7 +381,7 @@ Sets the texture repeating mode. See :ref:`TextureRepeat` value **)** - :ref:`TextureSource` **get_texture_source** **(** **)** -Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. see :ref:`TextureSource` for options. +Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. See :ref:`TextureSource` for options. .. rst-class:: classref-item-separator diff --git a/classes/class_websocketmultiplayerpeer.rst b/classes/class_websocketmultiplayerpeer.rst index a406303890e..e02089dc637 100644 --- a/classes/class_websocketmultiplayerpeer.rst +++ b/classes/class_websocketmultiplayerpeer.rst @@ -201,7 +201,7 @@ Starts a new multiplayer client connecting to the given ``url``. TLS certificate :ref:`Error` **create_server** **(** :ref:`int` port, :ref:`String` bind_address="*", :ref:`TLSOptions` tls_server_options=null **)** -Starts a new multiplayer server listening on the given ``port``. You can optionally specify a ``bind_address``, and provide valiid ``tls_server_options`` to use TLS. See :ref:`TLSOptions.server`. +Starts a new multiplayer server listening on the given ``port``. You can optionally specify a ``bind_address``, and provide valid ``tls_server_options`` to use TLS. See :ref:`TLSOptions.server`. .. rst-class:: classref-item-separator diff --git a/classes/class_webxrinterface.rst b/classes/class_webxrinterface.rst index 0aef1bbb046..70607330578 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -150,6 +150,10 @@ Methods .. table:: :widths: auto + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_available_display_refresh_rates` **(** **)** |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_display_refresh_rate` **(** **)** |const| | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TargetRayMode` | :ref:`get_input_source_target_ray_mode` **(** :ref:`int` input_source_id **)** |const| | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -159,6 +163,8 @@ Methods +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`is_session_supported` **(** :ref:`String` session_mode **)** | +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_display_refresh_rate` **(** :ref:`float` refresh_rate **)** | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -169,6 +175,18 @@ Methods Signals ------- +.. _class_WebXRInterface_signal_display_refresh_rate_changed: + +.. rst-class:: classref-signal + +**display_refresh_rate_changed** **(** **)** + +Emitted after the display's refresh rate has changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_WebXRInterface_signal_reference_space_reset: .. rst-class:: classref-signal @@ -518,6 +536,30 @@ Possible values come from `WebXR's XRVisibilityState ` **get_available_display_refresh_rates** **(** **)** |const| + +Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the web browser and after the interface has been initialized. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WebXRInterface_method_get_display_refresh_rate: + +.. rst-class:: classref-method + +:ref:`float` **get_display_refresh_rate** **(** **)** |const| + +Returns the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It may not report an accurate value until after using :ref:`set_display_refresh_rate`. + +.. rst-class:: classref-item-separator + +---- + .. _class_WebXRInterface_method_get_input_source_target_ray_mode: .. rst-class:: classref-method @@ -584,6 +626,18 @@ Possible values come from `WebXR's XRSessionMode ` signal with the result. +.. rst-class:: classref-item-separator + +---- + +.. _class_WebXRInterface_method_set_display_refresh_rate: + +.. rst-class:: classref-method + +void **set_display_refresh_rate** **(** :ref:`float` refresh_rate **)** + +Sets the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It won't take effect right away until after :ref:`display_refresh_rate_changed` is emitted. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_window.rst b/classes/class_window.rst index a4ce2bfe04b..0ce6b483e6c 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -557,7 +557,7 @@ The window can't be focused. No-focus window will ignore all input, except mouse :ref:`Flags` **FLAG_POPUP** = ``5`` -Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have ``transient parent`` set (see :ref:`transient`). +Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see :ref:`transient`). .. _class_Window_constant_FLAG_EXTEND_TO_TITLE: @@ -667,7 +667,7 @@ The content can be expanded horizontally. Scaling vertically will result in keep :ref:`ContentScaleAspect` **CONTENT_SCALE_ASPECT_EXPAND** = ``4`` -The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the to-left corner and add an extra visible area in the stretched space. +The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the top-left corner and add an extra visible area in the stretched space. .. rst-class:: classref-item-separator @@ -735,7 +735,7 @@ Initial window position is determined by :ref:`position` **WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN** = ``1`` -Initial window position is a center of the primary screen. +Initial window position is the center of the primary screen. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN: @@ -743,7 +743,7 @@ Initial window position is a center of the primary screen. :ref:`WindowInitialPosition` **WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN** = ``2`` -Initial window position is a center of the main window screen. +Initial window position is the center of the main window screen. .. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN: @@ -751,7 +751,23 @@ Initial window position is a center of the main window screen. :ref:`WindowInitialPosition` **WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN** = ``3`` -Initial window position is a center of :ref:`current_screen` screen. +Initial window position is the center of :ref:`current_screen` screen. + +.. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowInitialPosition` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS** = ``4`` + +Initial window position is the center of the screen containing the mouse pointer. + +.. _class_Window_constant_WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowInitialPosition` **WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS** = ``5`` + +Initial window position is the center of the screen containing the window with the keyboard focus. .. rst-class:: classref-section-separator @@ -1054,7 +1070,7 @@ Set's the window's current mode. - void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** - :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| -If ``true``, all mouse event as passed to the underlying window of the same application. See also :ref:`mouse_passthrough_polygon`. +If ``true``, all mouse events will be passed to the underlying window of the same application. See also :ref:`mouse_passthrough_polygon`. \ **Note:** This property is implemented on Linux (X11), macOS and Windows. @@ -1229,7 +1245,7 @@ The window's title. If the **Window** is non-embedded, title styles set in :ref: - void **set_transient** **(** :ref:`bool` value **)** - :ref:`bool` **is_transient** **(** **)** -If ``true``, the **Window** is transient, i.e. it's considered a child of another **Window**. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. +If ``true``, the **Window** is transient, i.e. it's considered a child of another **Window**. The transient window will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. Note that behavior might be different depending on the platform. diff --git a/classes/class_xrinterface.rst b/classes/class_xrinterface.rst index 51e0ba98a83..585c73f5560 100644 --- a/classes/class_xrinterface.rst +++ b/classes/class_xrinterface.rst @@ -71,6 +71,8 @@ Methods +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_supported_environment_blend_modes` **(** **)** | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_system_info` **(** **)** | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TrackingStatus` | :ref:`get_tracking_status` **(** **)** |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`get_transform_for_view` **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** | @@ -286,7 +288,7 @@ Player is free to move around, full positional tracking. :ref:`PlayAreaMode` **XR_PLAY_AREA_STAGE** = ``4`` -Same as roomscale but origin point is fixed to the center of the physical space, XRServer.center_on_hmd disabled. +Same as :ref:`XR_PLAY_AREA_ROOMSCALE` but origin point is fixed to the center of the physical space, :ref:`XRServer.center_on_hmd` disabled. .. rst-class:: classref-item-separator @@ -471,6 +473,20 @@ Returns the an array of supported environment blend modes, see :ref:`Environment ---- +.. _class_XRInterface_method_get_system_info: + +.. rst-class:: classref-method + +:ref:`Dictionary` **get_system_info** **(** **)** + +Returns a :ref:`Dictionary` with extra system info. Interfaces are expected to return ``XRRuntimeName`` and ``XRRuntimeVersion`` providing info about the used XR runtime. Additional entries may be provided specific to an interface. + +\ **Note:**\ This information may only be available after :ref:`initialize` was successfully called. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRInterface_method_get_tracking_status: .. rst-class:: classref-method @@ -493,7 +509,7 @@ Returns the transform for a view/eye. \ ``view`` is the view/eye index. -\ ``cam_transform`` is the transform that maps device coordinates to scene coordinates, typically the global_transform of the current XROrigin3D. +\ ``cam_transform`` is the transform that maps device coordinates to scene coordinates, typically the :ref:`Node3D.global_transform` of the current XROrigin3D. .. rst-class:: classref-item-separator @@ -582,9 +598,9 @@ Sets the active environment blend mode. :: func _ready(): - var xr_interface : XRInterface = XRServer.find_interface("OpenXR") + var xr_interface: XRInterface = XRServer.find_interface("OpenXR") if xr_interface and xr_interface.is_initialized(): - var vp : Viewport = get_viewport() + var vp: Viewport = get_viewport() vp.use_xr = true var acceptable_modes = [ XRInterface.XR_ENV_BLEND_MODE_OPAQUE, XRInterface.XR_ENV_BLEND_MODE_ADDITIVE ] var modes = xr_interface.get_supported_environment_blend_modes() diff --git a/classes/class_xrinterfaceextension.rst b/classes/class_xrinterfaceextension.rst index d2e120554e2..4561b5aa30f 100644 --- a/classes/class_xrinterfaceextension.rst +++ b/classes/class_xrinterfaceextension.rst @@ -58,6 +58,8 @@ Methods +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_suggested_tracker_names` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_system_info` **(** **)** |virtual| |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TrackingStatus` | :ref:`_get_tracking_status` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`_get_transform_for_view` **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| | @@ -278,6 +280,18 @@ Returns a :ref:`PackedStringArray` with tracker names c ---- +.. _class_XRInterfaceExtension_method__get_system_info: + +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_system_info** **(** **)** |virtual| |const| + +Returns a :ref:`Dictionary` with system informationr elated to this interface. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRInterfaceExtension_method__get_tracking_status: .. rst-class:: classref-method @@ -394,7 +408,7 @@ Called if this is our primary **XRInterfaceExtension** before we start processin void **_pre_render** **(** **)** |virtual| -Called if this **XRInterfaceExtension** is active before rendering starts, most XR interfaces will sync tracking at this point in time. +Called if this **XRInterfaceExtension** is active before rendering starts. Most XR interfaces will sync tracking at this point in time. .. rst-class:: classref-item-separator @@ -406,7 +420,7 @@ Called if this **XRInterfaceExtension** is active before rendering starts, most void **_process** **(** **)** |virtual| -Called if this **XRInterfaceExtension** is active before our physics and game process is called. most XR interfaces will update its :ref:`XRPositionalTracker`\ s at this point in time. +Called if this **XRInterfaceExtension** is active before our physics and game process is called. Most XR interfaces will update its :ref:`XRPositionalTracker`\ s at this point in time. .. rst-class:: classref-item-separator diff --git a/classes/class_xrserver.rst b/classes/class_xrserver.rst index b0fabe6d579..ce89a78e0fb 100644 --- a/classes/class_xrserver.rst +++ b/classes/class_xrserver.rst @@ -36,11 +36,13 @@ Properties .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------+---------+ - | :ref:`XRInterface` | :ref:`primary_interface` | | - +---------------------------------------+---------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`world_scale` | ``1.0`` | - +---------------------------------------+---------------------------------------------------------------------+---------+ + +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`XRInterface` | :ref:`primary_interface` | | + +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D` | :ref:`world_origin` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float` | :ref:`world_scale` | ``1.0`` | + +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -274,6 +276,25 @@ The primary :ref:`XRInterface` currently bound to the **XRSer ---- +.. _class_XRServer_property_world_origin: + +.. rst-class:: classref-property + +:ref:`Transform3D` **world_origin** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_world_origin** **(** :ref:`Transform3D` value **)** +- :ref:`Transform3D` **get_world_origin** **(** **)** + +The current origin of our tracking space in the virtual world. This is used by the renderer to properly position the camera with new tracking data. + +\ **Note:** This property is managed by the current :ref:`XROrigin3D` node. It is exposed for access from GDExtensions. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRServer_property_world_scale: .. rst-class:: classref-property diff --git a/classes/index.rst b/classes/index.rst index f59f1761fd0..8efcc30fd2a 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -92,7 +92,6 @@ Nodes class_editorfiledialog class_editorfilesystem class_editorinspector - class_editorinterface class_editorplugin class_editorproperty class_editorresourcepicker @@ -681,12 +680,14 @@ Other objects class_editordebuggerplugin class_editordebuggersession class_editorexportplatform + class_editorexportplatformpc class_editorexportplugin class_editorfeatureprofile class_editorfilesystemdirectory class_editorfilesystemimportformatsupportquery class_editorimportplugin class_editorinspectorplugin + class_editorinterface class_editornode3dgizmo class_editorpaths class_editorresourceconversionplugin @@ -736,6 +737,7 @@ Other objects class_lightmapperrd class_mainloop class_marshalls + class_meshconvexdecompositionsettings class_meshdatatool class_methodtweener class_mobilevrinterface