Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/class_audioserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Name of the current device for audio output (see :ref:`get_output_device_list<cl
- void **set_playback_speed_scale** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_playback_speed_scale** **(** **)**

Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played at half its speed).
Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played at half its speed). See also :ref:`Engine.time_scale<class_Engine_property_time_scale>` to affect the general simulation speed, which is independent from :ref:`playback_speed_scale<class_AudioServer_property_playback_speed_scale>`.

.. rst-class:: classref-section-separator

Expand Down
4 changes: 4 additions & 0 deletions classes/class_engine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ If ``false``, stops printing error and warning messages to the console and edito

Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. This also affects :ref:`Timer<class_Timer>` and :ref:`SceneTreeTimer<class_SceneTreeTimer>` (see :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>` for how to control this).

\ **Note:** This does not affect audio playback speed. Use :ref:`AudioServer.playback_speed_scale<class_AudioServer_property_playback_speed_scale>` to adjust audio playback speed independently of :ref:`time_scale<class_Engine_property_time_scale>`.

\ **Note:** This does not automatically adjust :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>`, which means that with time scales above 1.0, physics simulation may become less precise (as each physics tick will stretch over a larger period of engine time). If you're using :ref:`time_scale<class_Engine_property_time_scale>` to speed up simulation by a large factor, consider increasing :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` as well to improve physics reliability.

.. rst-class:: classref-section-separator

----
Expand Down
48 changes: 43 additions & 5 deletions classes/class_input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ Properties
.. table::
:widths: auto

+----------------------------------------+--------------------------------------------------------------------------+
| :ref:`MouseMode<enum_Input_MouseMode>` | :ref:`mouse_mode<class_Input_property_mouse_mode>` |
+----------------------------------------+--------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`use_accumulated_input<class_Input_property_use_accumulated_input>` |
+----------------------------------------+--------------------------------------------------------------------------+
+----------------------------------------+--------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`emulate_mouse_from_touch<class_Input_property_emulate_mouse_from_touch>` |
+----------------------------------------+--------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`emulate_touch_from_mouse<class_Input_property_emulate_touch_from_mouse>` |
+----------------------------------------+--------------------------------------------------------------------------------+
| :ref:`MouseMode<enum_Input_MouseMode>` | :ref:`mouse_mode<class_Input_property_mouse_mode>` |
+----------------------------------------+--------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`use_accumulated_input<class_Input_property_use_accumulated_input>` |
+----------------------------------------+--------------------------------------------------------------------------------+

.. rst-class:: classref-reftable-group

Expand Down Expand Up @@ -379,6 +383,40 @@ Help cursor. Usually a question mark.
Property Descriptions
---------------------

.. _class_Input_property_emulate_mouse_from_touch:

.. rst-class:: classref-property

:ref:`bool<class_bool>` **emulate_mouse_from_touch**

.. rst-class:: classref-property-setget

- void **set_emulate_mouse_from_touch** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_emulating_mouse_from_touch** **(** **)**

If ``true``, sends mouse input events when tapping or swiping on the touchscreen. See also :ref:`ProjectSettings.input_devices/pointing/emulate_mouse_from_touch<class_ProjectSettings_property_input_devices/pointing/emulate_mouse_from_touch>`.

.. rst-class:: classref-item-separator

----

.. _class_Input_property_emulate_touch_from_mouse:

.. rst-class:: classref-property

:ref:`bool<class_bool>` **emulate_touch_from_mouse**

.. rst-class:: classref-property-setget

- void **set_emulate_touch_from_mouse** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_emulating_touch_from_mouse** **(** **)**

If ``true``, sends touch input events when clicking or dragging the mouse. See also :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>`.

.. rst-class:: classref-item-separator

----

.. _class_Input_property_mouse_mode:

.. rst-class:: classref-property
Expand Down
19 changes: 19 additions & 0 deletions classes/class_label.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Properties
+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`clip_text<class_Label_property_clip_text>` | ``false`` |
+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`ellipsis_char<class_Label_property_ellipsis_char>` | ``"…"`` |
+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
| :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`horizontal_alignment<class_Label_property_horizontal_alignment>` | ``0`` |
+-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
| |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> | :ref:`justification_flags<class_Label_property_justification_flags>` | ``163`` |
Expand Down Expand Up @@ -173,6 +175,23 @@ If ``true``, the Label only shows the text that fits inside its bounding rectang

----

.. _class_Label_property_ellipsis_char:

.. rst-class:: classref-property

:ref:`String<class_String>` **ellipsis_char** = ``"…"``

.. rst-class:: classref-property-setget

- void **set_ellipsis_char** **(** :ref:`String<class_String>` value **)**
- :ref:`String<class_String>` **get_ellipsis_char** **(** **)**

Ellipsis character used for text clipping.

.. rst-class:: classref-item-separator

----

.. _class_Label_property_horizontal_alignment:

.. rst-class:: classref-property
Expand Down
28 changes: 19 additions & 9 deletions classes/class_navigationagent2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Signals

**link_reached** **(** :ref:`Dictionary<class_Dictionary>` details **)**

Notifies when a navigation link has been reached.
Signals that the agent reached a navigation link. Emitted when the agent moves within :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` of the next position of the path when that position is a navigation link.

The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags<class_NavigationAgent2D_property_path_metadata_flags>`:

Expand All @@ -179,7 +179,9 @@ The details dictionary may contain the following keys depending on the value of

**navigation_finished** **(** **)**

Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with :ref:`get_current_navigation_path_index<class_NavigationAgent2D_method_get_current_navigation_path_index>`.
Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path.

This signal will be emitted just after :ref:`target_reached<class_NavigationAgent2D_signal_target_reached>` when the target is reachable.

.. rst-class:: classref-item-separator

Expand Down Expand Up @@ -209,7 +211,11 @@ Emitted when the agent had to update the loaded path:

**target_reached** **(** **)**

Emitted once per loaded path when the agent's global position is the first time within :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` to the :ref:`target_position<class_NavigationAgent2D_property_target_position>`.
Signals that the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent2D_property_target_position>`. This signal is emitted only once per loaded path.

This signal will be emitted just before :ref:`navigation_finished<class_NavigationAgent2D_signal_navigation_finished>` when the target is reachable.

It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>`.

.. rst-class:: classref-item-separator

Expand All @@ -233,7 +239,7 @@ Notifies when the collision avoidance velocity is calculated. Emitted when :ref:

**waypoint_reached** **(** :ref:`Dictionary<class_Dictionary>` details **)**

Notifies when a waypoint along the path has been reached.
Signals that the agent reached a waypoint. Emitted when the agent moves within :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` of the next position of the path.

The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags<class_NavigationAgent2D_property_path_metadata_flags>`:

Expand Down Expand Up @@ -486,7 +492,7 @@ The distance to search for other agents.
- void **set_path_desired_distance** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_path_desired_distance** **(** **)**

The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update.
The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update.

.. rst-class:: classref-item-separator

Expand Down Expand Up @@ -590,7 +596,11 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake
- void **set_target_desired_distance** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_target_desired_distance** **(** **)**

The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general area. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update.
The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached<class_NavigationAgent2D_signal_target_reached>` is emitted and navigation ends (see :ref:`is_navigation_finished<class_NavigationAgent2D_method_is_navigation_finished>` and :ref:`navigation_finished<class_NavigationAgent2D_signal_navigation_finished>`).

You can make navigation end early by setting this property to a value greater than :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` (navigation will end before reaching the last waypoint).

You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update.

.. rst-class:: classref-item-separator

Expand Down Expand Up @@ -807,9 +817,9 @@ Returns the :ref:`RID<class_RID>` of this agent on the :ref:`NavigationServer2D<

:ref:`bool<class_bool>` **is_navigation_finished** **(** **)**

Returns ``true`` if the end of the currently loaded navigation path has been reached.
Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached.

\ **Note:** While true prefer to stop calling update functions like :ref:`get_next_path_position<class_NavigationAgent2D_method_get_next_path_position>`. This avoids jittering the standing agent due to calling repeated path updates.
\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position<class_NavigationAgent2D_method_get_next_path_position>`. This avoids jittering the standing agent due to calling repeated path updates.

.. rst-class:: classref-item-separator

Expand All @@ -833,7 +843,7 @@ Returns ``true`` if :ref:`get_final_position<class_NavigationAgent2D_method_get_

:ref:`bool<class_bool>` **is_target_reached** **(** **)** |const|

Returns true if :ref:`target_position<class_NavigationAgent2D_property_target_position>` is reached. It may not always be possible to reach the target position. It should always be possible to reach the final position though. See :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>`.
Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent2D_property_target_position>`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>`.

.. rst-class:: classref-item-separator

Expand Down
Loading