mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-03 05:48:42 +03:00
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -14,6 +14,6 @@ assignees: ''
|
||||
|
||||
If you know how to fix the issue you are reporting please
|
||||
consider opening a pull request. We provide a tutorial on
|
||||
using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html,
|
||||
writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html
|
||||
and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html
|
||||
using git here: https://contributing.godotengine.org/en/latest/organization/pull_requests/creating_pull_requests.html,
|
||||
writing documentation at https://contributing.godotengine.org/en/latest/documentation/guidelines/index.html
|
||||
and contributing to the class reference here: https://contributing.godotengine.org/en/latest/documentation/class_reference.html
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -4,5 +4,5 @@ PRs can target other branches (e.g. `3.2`, `3.5`) if the same change was done in
|
||||
PRs must not target `stable`, as that branch is updated manually.
|
||||
|
||||
The type of content accepted into the documentation is explained here:
|
||||
https://docs.godotengine.org/en/latest/community/contributing/content_guidelines.html
|
||||
https://contributing.godotengine.org/en/latest/documentation/guidelines/content_guidelines.html
|
||||
-->
|
||||
|
||||
2
.github/workflows/build_offline_docs.yml
vendored
2
.github/workflows/build_offline_docs.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
ref: ${{ matrix.branch }}
|
||||
|
||||
|
||||
2
.github/workflows/check_urls.yml
vendored
2
.github/workflows/check_urls.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Restore lychee cache
|
||||
uses: actions/cache@v4
|
||||
|
||||
4
.github/workflows/cherrypick.yml
vendored
4
.github/workflows/cherrypick.yml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
|
||||
env:
|
||||
# TODO: Add a way to handle multiple potential cherrypick targets.
|
||||
TARGET_BRANCH: '4.3'
|
||||
TARGET_BRANCH: '4.5'
|
||||
USERNAME: 'Godot Organization'
|
||||
EMAIL: 'noreply@godotengine.org'
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
ref: ${{ env.TARGET_BRANCH }}
|
||||
|
||||
|
||||
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -14,11 +14,15 @@ jobs:
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Style checks via pre-commit
|
||||
uses: pre-commit/action@v3.0.1
|
||||
|
||||
- name: Custom RST checks (check-rst.sh)
|
||||
run: |
|
||||
bash ./_tools/check-rst.sh
|
||||
|
||||
- name: Get Python version
|
||||
id: pythonv
|
||||
run: |
|
||||
|
||||
6
.github/workflows/sync_class_ref.yml
vendored
6
.github/workflows/sync_class_ref.yml
vendored
@@ -17,17 +17,17 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
engine_rev: '4.4'
|
||||
engine_rev: '4.5'
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Checkout the documentation repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Checkout the engine repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
repository: 'godotengine/godot'
|
||||
# Use the appropriate branch for the documentation version.
|
||||
|
||||
@@ -6,7 +6,7 @@ repos:
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: codespell
|
||||
files: ^(about|community|contributing|getting_started|tutorials)/.*\.rst$
|
||||
files: ^(about|community|engine_details|getting_started|tutorials)/.*\.rst$
|
||||
additional_dependencies: [tomli]
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
|
||||
24
404.rst
Normal file
24
404.rst
Normal file
@@ -0,0 +1,24 @@
|
||||
:github_url: hide
|
||||
:allow_comments: False
|
||||
|
||||
Page not found
|
||||
==============
|
||||
|
||||
.. https://github.com/readthedocs/sphinx-notfound-page
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<p>
|
||||
Sorry, we couldn't find that page. It may have been renamed or removed
|
||||
in the version of the documentation you're currently browsing.
|
||||
</p>
|
||||
<p>
|
||||
If you're currently browsing the
|
||||
<em>latest</em> version of the documentation, try browsing the
|
||||
<a href="/en/stable/"><em>stable</em> version of the documentation</a>.
|
||||
</p>
|
||||
<p>
|
||||
Alternatively, use the
|
||||
<a href="#" onclick="$('#rtd-search-form [name=\\'q\\']').focus()">Search docs</a>
|
||||
box on the left or <a href="/">go to the homepage</a>.
|
||||
</p>
|
||||
14
README.md
14
README.md
@@ -33,16 +33,16 @@ add-on.
|
||||
|
||||
All contributors are welcome to help on the Godot documentation.
|
||||
|
||||
To get started, head to the [Contributing section](https://docs.godotengine.org/en/latest/contributing/how_to_contribute.html) of the online manual. There, you will find all the information you need to write and submit changes.
|
||||
To get started, head to the [Contributing documentation](https://contributing.godotengine.org/en/latest/organization/how_to_contribute.html). There, you will find all the information you need to write and submit changes.
|
||||
|
||||
Here are some quick links to the areas you might be interested in:
|
||||
|
||||
1. [Contributing to the online manual](https://docs.godotengine.org/en/latest/contributing/documentation/contributing_to_the_documentation.html)
|
||||
2. [Contributing to the class reference](https://docs.godotengine.org/en/latest/contributing/documentation/updating_the_class_reference.html)
|
||||
3. [Content guidelines](https://docs.godotengine.org/en/latest/contributing/documentation/content_guidelines.html)
|
||||
4. [Writing guidelines](https://docs.godotengine.org/en/latest/contributing/documentation/docs_writing_guidelines.html)
|
||||
5. [Building the manual](https://docs.godotengine.org/en/latest/contributing/documentation/building_the_manual.html)
|
||||
6. [Translating the documentation](https://docs.godotengine.org/en/latest/contributing/documentation/editor_and_docs_localization.html)
|
||||
1. [Contributing to the online manual](https://contributing.godotengine.org/en/latest/documentation/manual/index.html)
|
||||
2. [Contributing to the class reference](https://contributing.godotengine.org/en/latest/documentation/class_reference.html)
|
||||
3. [Content guidelines](https://contributing.godotengine.org/en/latest/documentation/guidelines/content_guidelines.html)
|
||||
4. [Writing guidelines](https://contributing.godotengine.org/en/latest/documentation/guidelines/docs_writing_guidelines.html)
|
||||
5. [Building the manual](https://contributing.godotengine.org/en/latest/documentation/manual/building_the_manual.html)
|
||||
6. [Translating the documentation](https://contributing.godotengine.org/en/latest/documentation/translation/index.html)
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -324,6 +324,7 @@ class GDScriptLexer(RegexLexer):
|
||||
"is_instance_of",
|
||||
"len",
|
||||
"load",
|
||||
"ord",
|
||||
"preload",
|
||||
"print_debug",
|
||||
"print_stack",
|
||||
@@ -396,6 +397,7 @@ class GDScriptLexer(RegexLexer):
|
||||
words(
|
||||
(
|
||||
# modules/gdscript/doc_classes/@GDScript.xml
|
||||
"@abstract",
|
||||
"@export",
|
||||
"@export_category",
|
||||
"@export_color_no_alpha",
|
||||
@@ -404,6 +406,7 @@ class GDScriptLexer(RegexLexer):
|
||||
"@export_enum",
|
||||
"@export_exp_easing",
|
||||
"@export_file",
|
||||
"@export_file_path",
|
||||
"@export_flags",
|
||||
"@export_flags_2d_navigation",
|
||||
"@export_flags_2d_physics",
|
||||
|
||||
@@ -150,6 +150,8 @@
|
||||
--kbd-shadow-color: #b0b7bf;
|
||||
--kbd-text-color: #444d56;
|
||||
|
||||
--role-button-background-color: #d3d7e1;
|
||||
|
||||
--code-example-good-color: #3fb950;
|
||||
--code-example-bad-color: #f85149;
|
||||
|
||||
@@ -279,6 +281,8 @@
|
||||
--kbd-outline-color: #3d4144;
|
||||
--kbd-shadow-color: #1e2023;
|
||||
--kbd-text-color: #e2f2ff;
|
||||
|
||||
--role-button-background-color: #22252d;
|
||||
|
||||
--code-example-good-color: #3fb950;
|
||||
--code-example-bad-color: #f85149;
|
||||
@@ -1844,3 +1848,18 @@ p + .classref-constant {
|
||||
#godot-giscus {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
/* Custom Sphinx roles for editor UI */
|
||||
/* The :ui: and :inspector: roles just render as bold. */
|
||||
.role-ui {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.role-button, .role-menu {
|
||||
font-size: 80%;
|
||||
border-radius: 4px;
|
||||
padding: 2.4px 6px;
|
||||
margin: auto 2px;
|
||||
border: 0px solid #7fbbe3;
|
||||
background: var(--role-button-background-color);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ Lesbarkeit, Klarheit und Benutzbarkeit besonders im Vordergrund stehen.
|
||||
|
||||
Für die Übersetzung selbst ist das Tool
|
||||
[Weblate](https://hosted.weblate.org/projects/godot-engine/) im Einsatz, das in der
|
||||
[offiziellen Dokumentation](https://docs.godotengine.org/de/4.x/contributing/documentation/editor_and_docs_localization.html) näher
|
||||
[offiziellen Dokumentation](https://contributing.godotengine.org/en/latest/documentation/translation/index.html) näher
|
||||
erläutert wird. Die Bedienung von Weblate ist nicht Bestandteil dieses
|
||||
Dokuments.
|
||||
|
||||
@@ -357,8 +357,8 @@ mit übersetzt werden sollten.
|
||||
|
||||
Für Übersetzungen des Editors und der Properties ist es ratsam, diese
|
||||
auch selbst zu testen, indem
|
||||
man [die aktuelle Übersetzung herunterlädt](https://docs.godotengine.org/de/4.x/contributing/documentation/editor_and_docs_localization.html#offline-translation-and-testing)
|
||||
und Godot mit den Änderungen [selbst kompiliert](https://docs.godotengine.org/de/4.x/contributing/development/compiling/compiling_for_windows.html).
|
||||
man [die aktuelle Übersetzung herunterlädt](https://contributing.godotengine.org/en/latest/documentation/translation/index.html#offline-translation-and-testing)
|
||||
und Godot mit den Änderungen [selbst kompiliert](https://docs.godotengine.org/de/4.x/engine_details/development/compiling/compiling_for_windows.html).
|
||||
|
||||
Gerade bei der Anleitung kommt es oft auf den Kontext zwischen benachbarten
|
||||
Textblöcken an, sodass das Lesen eines ganzen Artikels Fehler sichtbar
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<a class="godot-edit-guidelines" href="https://docs.godotengine.org/en/latest/contributing/documentation/index.html#writing-documentation">
|
||||
<a class="godot-edit-guidelines" href="https://contributing.godotengine.org/en/latest/organization/how_to_contribute.html">
|
||||
Learn how to contribute!
|
||||
</a>
|
||||
</li>
|
||||
|
||||
10
_tools/check-rst.sh
Executable file
10
_tools/check-rst.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
output=$(grep -r -P '^(?!\s*\.\.).*\S::$' --include='*.rst' --exclude='docs_writing_guidelines.rst' .)
|
||||
if [[ -n $output ]]; then
|
||||
echo 'The shorthand codeblock syntax (trailing `::`) is not allowed.'
|
||||
echo "$output"
|
||||
exit 1
|
||||
fi
|
||||
@@ -2,22 +2,6 @@ source,destination
|
||||
/about/index.html,/index.html
|
||||
/about/troubleshooting.html,/tutorials/troubleshooting.html
|
||||
/classes/_classes.html,/classes/
|
||||
/community/contributing/best_practices_for_engine_contributors.html,/contributing/development/best_practices_for_engine_contributors.html
|
||||
/community/contributing/bisecting_regressions.html,/contributing/workflow/bisecting_regressions.html
|
||||
/community/contributing/bug_triage_guidelines.html,/contributing/workflow/bug_triage_guidelines.html
|
||||
/community/contributing/building_the_manual.html,/contributing/documentation/building_the_manual.html
|
||||
/community/contributing/class_reference_writing_guidelines.html,/contributing/documentation/class_reference_primer.html
|
||||
/community/contributing/code_style_guidelines.html,/contributing/development/code_style_guidelines.html
|
||||
/community/contributing/content_guidelines.html,/contributing/documentation/content_guidelines.html
|
||||
/community/contributing/contributing_to_the_documentation.html,/contributing/documentation/contributing_to_the_documentation.html
|
||||
/community/contributing/cpp_usage_guidelines.html,/contributing/development/cpp_usage_guidelines.html
|
||||
/community/contributing/docs_writing_guidelines.html,/contributing/documentation/docs_writing_guidelines.html
|
||||
/community/contributing/editor_and_docs_localization.html,/contributing/documentation/editor_and_docs_localization.html
|
||||
/community/contributing/index.html,/contributing/ways_to_contribute.html
|
||||
/community/contributing/pr_workflow.html,/contributing/workflow/pr_workflow.html
|
||||
/community/contributing/testing_pull_requests.html,/contributing/workflow/testing_pull_requests.html
|
||||
/community/contributing/updating_the_class_reference.html,/contributing/documentation/updating_the_class_reference.html
|
||||
/community/contributing/ways_to_contribute.html,/contributing/ways_to_contribute.html
|
||||
/community/tutorials/3d/mesh_generation_with_heightmap_and_shaders.html,/tutorials/3d/mesh_generation_with_heightmap_and_shaders.html
|
||||
/community/tutorials/gdnative/gdnative-c-example.html,/tutorials/plugins/gdnative/gdnative-c-example.html
|
||||
/community/tutorials/gdnative/index.html,/tutorials/plugins/gdnative/index.html
|
||||
@@ -25,61 +9,56 @@ source,destination
|
||||
/community/tutorials/vr/vr_primer.html,/tutorials/vr/vr_primer.html
|
||||
/content/3d/making_trees.html,/tutorials/content/making_trees.html
|
||||
/contributing/_contributing.html,/community/contributing/
|
||||
/contributing/bug_triage_guidelines.html,/community/contributing/bug_triage_guidelines.html
|
||||
/contributing/development/compiling/compiling_with_mono.html,/contributing/development/compiling/compiling_with_dotnet.html
|
||||
/contributing/development/core_and_modules/introduction_to_godot_development.html,/contributing/development/core_and_modules/index.html
|
||||
/contributing/doc_and_l10n_guidelines.html,/community/contributing/doc_and_l10n_guidelines.html
|
||||
/contributing/updating_the_class_reference.html,/community/contributing/updating_the_class_reference.html
|
||||
/contributing/ways_to_contribute.html,/contributing/how_to_contribute.html
|
||||
/development/compiling/compiling_for_android.html,/contributing/development/compiling/compiling_for_android.html
|
||||
/development/compiling/compiling_for_ios.html,/contributing/development/compiling/compiling_for_ios.html
|
||||
/development/compiling/compiling_for_linuxbsd.html,/contributing/development/compiling/compiling_for_linuxbsd.html
|
||||
/development/compiling/compiling_for_macos.html,/contributing/development/compiling/compiling_for_macos.html
|
||||
/development/compiling/compiling_for_uwp.html,/contributing/development/compiling/compiling_for_uwp.html
|
||||
/development/compiling/compiling_for_web.html,/contributing/development/compiling/compiling_for_web.html
|
||||
/development/compiling/compiling_for_windows.html,/contributing/development/compiling/compiling_for_windows.html
|
||||
/development/compiling/compiling_for_x11.html,/contributing/development/compiling/compiling_for_linuxbsd.html
|
||||
/development/compiling/compiling_with_mono.html,/contributing/development/compiling/compiling_with_mono.html
|
||||
/development/compiling/compiling_with_script_encryption_key.html,/contributing/development/compiling/compiling_with_script_encryption_key.html
|
||||
/development/compiling/cross-compiling_for_ios_on_linux.html,/contributing/development/compiling/cross-compiling_for_ios_on_linux.html
|
||||
/development/compiling/getting_source.html,/contributing/development/compiling/getting_source.html
|
||||
/development/compiling/index.html,/contributing/development/compiling/index.html
|
||||
/development/compiling/introduction_to_the_buildsystem.html,/contributing/development/compiling/introduction_to_the_buildsystem.html
|
||||
/development/compiling/optimizing_for_size.html,/contributing/development/compiling/optimizing_for_size.html
|
||||
/contributing/development/compiling/compiling_with_mono.html,/engine_details/development/compiling/compiling_with_dotnet.html
|
||||
/contributing/development/core_and_modules/introduction_to_godot_development.html,/engine_details/development/core_and_modules/index.html
|
||||
/development/compiling/compiling_for_android.html,/engine_details/development/compiling/compiling_for_android.html
|
||||
/development/compiling/compiling_for_ios.html,/engine_details/development/compiling/compiling_for_ios.html
|
||||
/development/compiling/compiling_for_linuxbsd.html,/engine_details/development/compiling/compiling_for_linuxbsd.html
|
||||
/development/compiling/compiling_for_macos.html,/engine_details/development/compiling/compiling_for_macos.html
|
||||
/development/compiling/compiling_for_uwp.html,/engine_details/development/compiling/compiling_for_uwp.html
|
||||
/development/compiling/compiling_for_web.html,/engine_details/development/compiling/compiling_for_web.html
|
||||
/development/compiling/compiling_for_windows.html,/engine_details/development/compiling/compiling_for_windows.html
|
||||
/development/compiling/compiling_for_x11.html,/engine_details/development/compiling/compiling_for_linuxbsd.html
|
||||
/development/compiling/compiling_with_mono.html,/engine_details/development/compiling/compiling_with_mono.html
|
||||
/development/compiling/compiling_with_script_encryption_key.html,/engine_details/development/compiling/compiling_with_script_encryption_key.html
|
||||
/development/compiling/cross-compiling_for_ios_on_linux.html,/engine_details/development/compiling/cross-compiling_for_ios_on_linux.html
|
||||
/development/compiling/getting_source.html,/engine_details/development/compiling/getting_source.html
|
||||
/development/compiling/index.html,/engine_details/development/compiling/index.html
|
||||
/development/compiling/introduction_to_the_buildsystem.html,/engine_details/development/compiling/introduction_to_the_buildsystem.html
|
||||
/development/compiling/optimizing_for_size.html,/engine_details/development/compiling/optimizing_for_size.html
|
||||
/development/consoles/consoles.html,/tutorials/platform/consoles.html
|
||||
/development/cpp/binding_to_external_libraries.html,/contributing/development/core_and_modules/binding_to_external_libraries.html
|
||||
/development/cpp/common_engine_methods_and_macros.html,/contributing/development/core_and_modules/common_engine_methods_and_macros.html
|
||||
/development/cpp/configuring_an_ide/android_studio.html,/contributing/development/configuring_an_ide/android_studio.html
|
||||
/development/cpp/configuring_an_ide/clion.html,/contributing/development/configuring_an_ide/clion.html
|
||||
/development/cpp/configuring_an_ide/code_blocks.html,/contributing/development/configuring_an_ide/code_blocks.html
|
||||
/development/cpp/configuring_an_ide/index.html,/contributing/development/configuring_an_ide/index.html
|
||||
/development/cpp/configuring_an_ide/kdevelop.html,/contributing/development/configuring_an_ide/kdevelop.html
|
||||
/development/cpp/configuring_an_ide/qt_creator.html,/contributing/development/configuring_an_ide/qt_creator.html
|
||||
/development/cpp/configuring_an_ide/visual_studio.html,/contributing/development/configuring_an_ide/visual_studio.html
|
||||
/development/cpp/configuring_an_ide/visual_studio_code.html,/contributing/development/configuring_an_ide/visual_studio_code.html
|
||||
/development/cpp/configuring_an_ide/xcode.html,/contributing/development/configuring_an_ide/xcode.html
|
||||
/development/cpp/core_types.html,/contributing/development/core_and_modules/core_types.html
|
||||
/development/cpp/custom_audiostreams.html,/contributing/development/core_and_modules/custom_audiostreams.html
|
||||
/development/cpp/custom_godot_servers.html,/contributing/development/core_and_modules/custom_godot_servers.html
|
||||
/development/cpp/custom_modules_in_cpp.html,/contributing/development/core_and_modules/custom_modules_in_cpp.html
|
||||
/development/cpp/custom_resource_format_loaders.html,/contributing/development/core_and_modules/custom_resource_format_loaders.html
|
||||
/development/cpp/index.html,/contributing/development/core_and_modules/index.html
|
||||
/development/cpp/inheritance_class_tree.html,/contributing/development/core_and_modules/inheritance_class_tree.html
|
||||
/development/cpp/introduction_to_godot_development.html,/contributing/development/core_and_modules/introduction_to_godot_development.html
|
||||
/development/cpp/macos_debug.html,/contributing/development/debugging/macos_debug.html
|
||||
/development/cpp/object_class.html,/contributing/development/core_and_modules/object_class.html
|
||||
/development/cpp/unit_testing.html,/contributing/development/core_and_modules/unit_testing.html
|
||||
/development/cpp/using_cpp_profilers.html,/contributing/development/debugging/using_cpp_profilers.html
|
||||
/development/cpp/variant_class.html,/contributing/development/core_and_modules/variant_class.html
|
||||
/development/cpp/vulkan/index.html,/contributing/development/debugging/vulkan/index.html
|
||||
/development/cpp/vulkan/vulkan_validation_layers.html,/contributing/development/debugging/vulkan/vulkan_validation_layers.html
|
||||
/development/editor/creating_icons.html,/contributing/development/editor/creating_icons.html
|
||||
/development/editor/editor_style_guide.html,/contributing/development/editor/editor_style_guide.html
|
||||
/development/editor/index.html,/contributing/development/editor/index.html
|
||||
/development/editor/introduction_to_editor_development.html,/contributing/development/editor/introduction_to_editor_development.html
|
||||
/development/file_formats/gdscript_grammar.html,/contributing/development/file_formats/gdscript_grammar.html
|
||||
/development/file_formats/index.html,/contributing/development/file_formats/index.html
|
||||
/development/file_formats/tscn.html,/contributing/development/file_formats/tscn.html
|
||||
/development/cpp/binding_to_external_libraries.html,/engine_details/development/core_and_modules/binding_to_external_libraries.html
|
||||
/development/cpp/common_engine_methods_and_macros.html,/engine_details/development/core_and_modules/common_engine_methods_and_macros.html
|
||||
/development/cpp/configuring_an_ide/android_studio.html,/engine_details/development/configuring_an_ide/android_studio.html
|
||||
/development/cpp/configuring_an_ide/clion.html,/engine_details/development/configuring_an_ide/clion.html
|
||||
/development/cpp/configuring_an_ide/code_blocks.html,/engine_details/development/configuring_an_ide/code_blocks.html
|
||||
/development/cpp/configuring_an_ide/index.html,/engine_details/development/configuring_an_ide/index.html
|
||||
/development/cpp/configuring_an_ide/kdevelop.html,/engine_details/development/configuring_an_ide/kdevelop.html
|
||||
/development/cpp/configuring_an_ide/qt_creator.html,/engine_details/development/configuring_an_ide/qt_creator.html
|
||||
/development/cpp/configuring_an_ide/visual_studio.html,/engine_details/development/configuring_an_ide/visual_studio.html
|
||||
/development/cpp/configuring_an_ide/visual_studio_code.html,/engine_details/development/configuring_an_ide/visual_studio_code.html
|
||||
/development/cpp/configuring_an_ide/xcode.html,/engine_details/development/configuring_an_ide/xcode.html
|
||||
/development/cpp/core_types.html,/engine_details/development/core_and_modules/core_types.html
|
||||
/development/cpp/custom_audiostreams.html,/engine_details/development/core_and_modules/custom_audiostreams.html
|
||||
/development/cpp/custom_godot_servers.html,/engine_details/development/core_and_modules/custom_godot_servers.html
|
||||
/development/cpp/custom_modules_in_cpp.html,/engine_details/development/core_and_modules/custom_modules_in_cpp.html
|
||||
/development/cpp/custom_resource_format_loaders.html,/engine_details/development/core_and_modules/custom_resource_format_loaders.html
|
||||
/development/cpp/index.html,/engine_details/development/core_and_modules/index.html
|
||||
/development/cpp/inheritance_class_tree.html,/engine_details/development/core_and_modules/inheritance_class_tree.html
|
||||
/development/cpp/introduction_to_godot_development.html,/engine_details/development/core_and_modules/introduction_to_godot_development.html
|
||||
/development/cpp/macos_debug.html,/engine_details/development/debugging/macos_debug.html
|
||||
/development/cpp/object_class.html,/engine_details/development/core_and_modules/object_class.html
|
||||
/development/cpp/unit_testing.html,/engine_details/development/core_and_modules/unit_testing.html
|
||||
/development/cpp/using_cpp_profilers.html,/engine_details/development/debugging/using_cpp_profilers.html
|
||||
/development/cpp/variant_class.html,/engine_details/development/core_and_modules/variant_class.html
|
||||
/development/cpp/vulkan/index.html,/engine_details/development/debugging/vulkan/index.html
|
||||
/development/cpp/vulkan/vulkan_validation_layers.html,/engine_details/development/debugging/vulkan/vulkan_validation_layers.html
|
||||
/development/editor/creating_icons.html,/engine_details/editor/creating_icons.html
|
||||
/development/editor/index.html,/engine_details/editor/index.html
|
||||
/development/editor/introduction_to_editor_development.html,/engine_details/editor/introduction_to_editor_development.html
|
||||
/development/file_formats/gdscript_grammar.html,/engine_details/development/file_formats/gdscript_grammar.html
|
||||
/development/file_formats/index.html,/engine_details/development/file_formats/index.html
|
||||
/development/file_formats/tscn.html,/engine_details/development/file_formats/tscn.html
|
||||
/development/plugins/import_plugins.html,/tutorials/plugins/editor/import_plugins.html
|
||||
/development/plugins/index.html,/tutorials/plugins/editor/index.html
|
||||
/development/plugins/making_plugins.html,/tutorials/plugins/editor/making_plugins.html
|
||||
@@ -399,8 +378,9 @@ source,destination
|
||||
/tutorials/plugins/gdnative/gdnative-c-example.html,/tutorials/scripting/gdnative/gdnative_c_example.html
|
||||
/tutorials/plugins/gdnative/gdnative-cpp-example.html,/tutorials/scripting/gdnative/gdnative_cpp_example.html
|
||||
/tutorials/plugins/gdnative/index.html,/tutorials/scripting/gdnative/index.html
|
||||
/tutorials/scripting/gdnative/gdnative_c_example.html,/tutorials/plugins/gdextension/gdextension_cpp_example.html
|
||||
/tutorials/scripting/gdnative/gdnative_cpp_example.html,/tutorials/plugins/gdextension/gdextension_cpp_example.html
|
||||
/tutorials/plugins/gdextension/gdextension_cpp_example.html,/tutorials/plugins/cpp/gdextension_cpp_example.html
|
||||
/tutorials/scripting/gdnative/gdnative_c_example.html,/tutorials/plugins/cpp/gdextension_cpp_example.html
|
||||
/tutorials/scripting/gdnative/gdnative_cpp_example.html,/tutorials/plugins/cpp/gdextension_cpp_example.html
|
||||
/tutorials/scripting/gdnative/index.html,/tutorials/scripting/gdextension/index.html
|
||||
/tutorials/scripting/gdnative/what_is_gdnative.html,/tutorials/scripting/gdnative/what_is_gdextension.html
|
||||
/tutorials/shading/advanced_postprocessing.html,/tutorials/shaders/advanced_postprocessing.html
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
python-dotenv==0.18.0
|
||||
requests==2.32.0
|
||||
requests==2.32.4
|
||||
|
||||
@@ -27,7 +27,7 @@ with the original one.
|
||||
|
||||
This section covers compliance with licenses from a user perspective.
|
||||
If you are interested in licence compliance as a contributor, you can find
|
||||
guidelines :ref:`here <doc_best_practices_for_engine_contributors_license_compliance>`.
|
||||
guidelines `here <https://contributing.godotengine.org/en/latest/engine/guidelines/best_practices.html#don-t-use-complex-canned-solutions-for-simple-problems>`__.
|
||||
|
||||
.. tip::
|
||||
|
||||
@@ -42,7 +42,9 @@ Requirements
|
||||
In the case of the MIT license, the only requirement is to include the license
|
||||
text somewhere in your game or derivative project.
|
||||
|
||||
This text reads as follows::
|
||||
This text reads as follows:
|
||||
|
||||
::
|
||||
|
||||
This game uses Godot Engine, available under the following license:
|
||||
|
||||
|
||||
@@ -78,13 +78,12 @@ Contributing
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- :ref:`doc_handling_compatibility_breakages`
|
||||
- :ref:`doc_ways_to_contribute`
|
||||
|
||||
GDExtension
|
||||
~~~~~~~~~~~
|
||||
|
||||
- :ref:`doc_gdextension_file`
|
||||
- :ref:`doc_gdextension_docs_system`
|
||||
- :ref:`doc_godot_cpp_docs_system`
|
||||
|
||||
Migrating
|
||||
~~~~~~~~~
|
||||
@@ -215,11 +214,6 @@ Shaders
|
||||
|
||||
- :ref:`doc_compute_shaders`
|
||||
|
||||
Workflow
|
||||
~~~~~~~~
|
||||
|
||||
- :ref:`doc_pr_review_guidelines`
|
||||
|
||||
XR
|
||||
~~
|
||||
|
||||
@@ -253,11 +247,6 @@ Editor
|
||||
New pages since version 3.3
|
||||
---------------------------
|
||||
|
||||
C++
|
||||
~~~
|
||||
|
||||
- :ref:`doc_cpp_usage_guidelines`
|
||||
|
||||
GDScript
|
||||
~~~~~~~~
|
||||
|
||||
@@ -283,19 +272,10 @@ Best practices
|
||||
|
||||
- :ref:`doc_version_control_systems`
|
||||
|
||||
Community
|
||||
~~~~~~~~~
|
||||
|
||||
- :ref:`doc_best_practices_for_engine_contributors`
|
||||
- :ref:`doc_bisecting_regressions`
|
||||
- :ref:`doc_editor_and_docs_localization`
|
||||
|
||||
Development
|
||||
~~~~~~~~~~~
|
||||
|
||||
- :ref:`doc_introduction_to_editor_development`
|
||||
- :ref:`doc_editor_style_guide`
|
||||
- :ref:`doc_common_engine_methods_and_macros`
|
||||
- :ref:`doc_common_engine_methods_and_macros_error_macros`
|
||||
- :ref:`doc_vulkan_validation_layers`
|
||||
- :ref:`doc_gdscript_grammar`
|
||||
- Configuring an IDE: :ref:`doc_configuring_an_ide_code_blocks`
|
||||
|
||||
@@ -448,7 +448,7 @@ compile the engine from sources, or how to build the documentation. You also nee
|
||||
get familiar with Git, a version control system that Godot developers use.
|
||||
|
||||
We explain how to work with the engine source, how to edit the documentation, and
|
||||
what other ways to contribute are there in our :ref:`documentation for contributors <doc_ways_to_contribute>`.
|
||||
what other ways to contribute are there in our `documentation for contributors <https://contributing.godotengine.org/en/latest/organization/how_to_contribute.html>`__.
|
||||
|
||||
I have a great idea for Godot. How can I share it?
|
||||
--------------------------------------------------
|
||||
@@ -579,6 +579,8 @@ general-purpose library, but we had special requirements for Godot.
|
||||
* We use our custom String type, as the one provided by STL is too basic and lacks proper
|
||||
internationalization support.
|
||||
|
||||
Check out :ref:`Godot's container types <doc_core_types>` for alternatives.
|
||||
|
||||
Why does Godot not use exceptions?
|
||||
----------------------------------
|
||||
|
||||
@@ -627,7 +629,7 @@ for the rest of the game.
|
||||
How can I support Godot development or contribute?
|
||||
--------------------------------------------------
|
||||
|
||||
See :ref:`doc_ways_to_contribute`.
|
||||
See `How to contribute <https://contributing.godotengine.org/en/latest/organization/how_to_contribute.html>`__.
|
||||
|
||||
Who is working on Godot? How can I contact you?
|
||||
-----------------------------------------------
|
||||
|
||||
@@ -77,11 +77,8 @@ This documentation is organized into several sections:
|
||||
if you're new!**
|
||||
- The **Manual** can be read or referenced as needed,
|
||||
in any order. It contains feature-specific tutorials and documentation.
|
||||
- **Contributing** gives information related to contributing to
|
||||
Godot, whether to the core engine, documentation, demos or other parts.
|
||||
It describes how to report bugs, how contributor workflows are organized, etc.
|
||||
It also contains sections intended for advanced users and contributors,
|
||||
with information on compiling the engine, contributing to the editor,
|
||||
- **Engine details** contains sections intended for advanced users and contributors,
|
||||
with information on compiling the engine, working on the editor,
|
||||
or developing C++ modules.
|
||||
- **Community** is dedicated to the life of Godot's community and contains a list of
|
||||
recommended third-party tutorials and materials outside of this documentation.
|
||||
@@ -100,8 +97,8 @@ About this documentation
|
||||
Members of the Godot Engine community continuously write, correct, edit, and
|
||||
improve this documentation. We are always looking for more help. You can also
|
||||
contribute by opening Github issues or translating the documentation into your language.
|
||||
If you are interested in helping, see :ref:`Ways to contribute <doc_ways_to_contribute>`
|
||||
and :ref:`Writing documentation <doc_contributing_writing_documentation>`,
|
||||
If you are interested in helping, see `How to contribute <https://contributing.godotengine.org/en/latest/organization/how_to_contribute.html>`__
|
||||
and `Writing documentation <https://contributing.godotengine.org/en/latest/documentation/manual/index.html>`__,
|
||||
or get in touch with the `Documentation team <https://godotengine.org/teams/#documentation>`_
|
||||
on `Godot Contributors Chat <https://chat.godotengine.org/>`_.
|
||||
|
||||
|
||||
@@ -36,6 +36,13 @@ Platforms
|
||||
- :ref:`Web browsers <doc_using_the_web_editor>`. Experimental in 4.0,
|
||||
using Godot 3.x is recommended instead when targeting HTML5.
|
||||
|
||||
.. note::
|
||||
|
||||
Linux supports rv64 (RISC-V), ppc64 & ppc32 (PowerPC), and loongarch64. However
|
||||
you must compile the editor for that platform (as well as export templates)
|
||||
yourself, no official downloads are currently provided. RISC-V compiling
|
||||
instructions can be found on the :ref:`doc_compiling_for_linuxbsd` page.
|
||||
|
||||
**Runs exported projects:**
|
||||
|
||||
- iOS.
|
||||
@@ -346,7 +353,7 @@ See :ref:`doc_renderers` for a detailed comparison of the rendering methods.
|
||||
|
||||
**Post-processing:**
|
||||
|
||||
- Tonemapping (Linear, Reinhard, Filmic, ACES).
|
||||
- Tonemapping (Linear, Reinhard, Filmic, ACES, AgX).
|
||||
- Automatic exposure adjustments based on viewport brightness (and manual exposure override).
|
||||
- Near and far depth of field with adjustable bokeh simulation (box, hexagon, circle).
|
||||
- Screen-space ambient occlusion (SSAO) at half or full resolution.
|
||||
@@ -645,6 +652,8 @@ Mobile
|
||||
and :ref:`iOS <doc_plugins_for_ios>`.
|
||||
- Support for advertisements using third-party modules.
|
||||
|
||||
.. _doc_xr_support:
|
||||
|
||||
XR support (AR and VR)
|
||||
----------------------
|
||||
|
||||
@@ -656,6 +665,11 @@ XR support (AR and VR)
|
||||
|
||||
- Including support for popular stand alone headsets like the Meta Quest 1/2/3 and Pro, Pico 4, Magic Leap 2, and Lynx R1.
|
||||
|
||||
- Out of the box limited support for visionOS Apple headsets.
|
||||
|
||||
- Currently only exporting an application for use on a flat plane within the
|
||||
headset is supported. Immersive experiences are not supported.
|
||||
|
||||
- Other devices supported through an XR plugin structure.
|
||||
- Various advanced toolkits are available that implement common features required by XR applications.
|
||||
|
||||
@@ -774,7 +788,7 @@ Miscellaneous
|
||||
|
||||
- Licensed under the permissive MIT license.
|
||||
|
||||
- Open development process with :ref:`contributions welcome <doc_ways_to_contribute>`.
|
||||
- Open development process with `contributions welcome <https://contributing.godotengine.org/en/latest/organization/how_to_contribute.html>`__.
|
||||
|
||||
.. seealso::
|
||||
|
||||
|
||||
@@ -23,25 +23,26 @@ Desktop or laptop PC - Minimum
|
||||
.. which can run up to macOS 10.13.
|
||||
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
| **CPU** | - **Windows:** x86_32 CPU with SSE2 instructions, x86_64 CPU, ARMv8 CPU |
|
||||
| **CPU** | - **Windows:** x86_32 CPU with SSE2 support, x86_64 CPU with SSE4.2 support, ARMv8 CPU |
|
||||
| | |
|
||||
| | - *Example: Intel Core 2 Duo E8200, AMD Athlon XE BE-2300, Snapdragon X Elite* |
|
||||
| | - *Example: Intel Core 2 Duo E8200, AMD FX-4100, Snapdragon X Elite* |
|
||||
| | |
|
||||
| | - **macOS:** x86_64 or ARM CPU (Apple Silicon) |
|
||||
| | |
|
||||
| | - *Example: Intel Core 2 Duo SU9400, Apple M1* |
|
||||
| | |
|
||||
| | - **Linux:** x86_32 CPU with SSE2 instructions, x86_64 CPU, ARMv7 or ARMv8 CPU |
|
||||
| | - **Linux:** x86_32 CPU with SSE2 support, x86_64 CPU with SSE4.2 support, ARMv7 or |
|
||||
| | ARMv8 CPU |
|
||||
| | |
|
||||
| | - *Example: Intel Core 2 Duo E8200, AMD Athlon XE BE-2300, Raspberry Pi 4* |
|
||||
| | - *Example: Intel Core 2 Duo E8200, AMD FX-4100, Raspberry Pi 4* |
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
| **GPU** | - **Forward+ renderer:** Integrated graphics with full Vulkan 1.0 support |
|
||||
| | |
|
||||
| | - *Example: Intel HD Graphics 5500 (Broadwell), AMD Radeon R5 Graphics (Kaveri)* |
|
||||
| | - *Example: Intel HD Graphics 510 (Skylake), AMD Radeon R5 Graphics (Kaveri)* |
|
||||
| | |
|
||||
| | - **Mobile renderer:** Integrated graphics with full Vulkan 1.0 support |
|
||||
| | |
|
||||
| | - *Example: Intel HD Graphics 5500 (Broadwell), AMD Radeon R5 Graphics (Kaveri)* |
|
||||
| | - *Example: Intel HD Graphics 510 (Skylake), AMD Radeon R5 Graphics (Kaveri)* |
|
||||
| | |
|
||||
| | - **Compatibility renderer:** Integrated graphics with full OpenGL 3.3 support |
|
||||
| | |
|
||||
@@ -54,22 +55,22 @@ Desktop or laptop PC - Minimum
|
||||
| | Exporting projects requires downloading export templates separately |
|
||||
| | (1.3 GB after installation). |
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
| **Operating system** | - **Native editor:** Windows 7, macOS 10.13 (Compatibility) or |
|
||||
| | macOS 10.15 (Forward+/Mobile), Linux distribution released after 2016 |
|
||||
| | - **Web editor:** Firefox 79, Chrome 68, Edge 79, Safari 15.2, Opera 64 |
|
||||
| **Operating system** | - **Native editor:** Windows 10, macOS 10.13 (Compatibility) or |
|
||||
| | macOS 10.15 (Forward+/Mobile), Linux distribution released after 2018 |
|
||||
| | - **Web editor:** Recent versions of mainstream browsers: Firefox and derivatives |
|
||||
| | (including ESR), Chrome and Chromium derivatives, Safari and WebKit derivatives. |
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
|
||||
.. note::
|
||||
|
||||
Windows 7/8/8.1 are supported on a best-effort basis. These versions are not
|
||||
regularly tested and some features may be missing (such as colored
|
||||
:ref:`print_rich <class_@GlobalScope_method_print_rich>` console output).
|
||||
Support for Windows 7/8/8.1 may be removed in a
|
||||
:ref:`future Godot 4.x release <doc_release_policy>`.
|
||||
If your x86_64 CPU does not support SSE4.2, you can still run the 32-bit Godot
|
||||
executable which only has a SSE2 requirement (all x86_64 CPUs support SSE2).
|
||||
|
||||
Vulkan drivers for these Windows versions are known to have issues with
|
||||
memory leaks. As a result, it's recommended to stick to the Compatibility
|
||||
renderer when running Godot on a Windows version older than 10.
|
||||
While supported on Linux, we have no official minimum requirements for running on
|
||||
rv64 (RISC-V), ppc64 & ppc32 (PowerPC), and loongarch64. In addition you must
|
||||
compile the editor for that platform (as well as export templates) yourself,
|
||||
no official downloads are currently provided. RISC-V compiling instructions can
|
||||
be found on the :ref:`doc_compiling_for_linuxbsd` page.
|
||||
|
||||
Mobile device (smartphone/tablet) - Minimum
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -101,8 +102,8 @@ Mobile device (smartphone/tablet) - Minimum
|
||||
| | (1.3 GB after installation) |
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
| **Operating system** | - **Native editor:** Android 6.0 (Compatibility) or Android 9.0 (Forward+/Mobile) |
|
||||
| | - **Web editor:** Firefox 79, Chrome 88, Edge 79, Safari 15.2, Opera 64, |
|
||||
| | Samsung Internet 15 |
|
||||
| | - **Web editor:** Recent versions of mainstream browsers: Firefox and derivatives |
|
||||
| | (including ESR), Chrome and Chromium derivatives, Safari and WebKit derivatives. |
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
|
||||
These are the **recommended** specifications to get a smooth experience with the
|
||||
@@ -112,7 +113,7 @@ Desktop or laptop PC - Recommended
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
+----------------------+---------------------------------------------------------------------------------------------+
|
||||
| **CPU** | - **Windows:** x86_64 CPU with SSE4.2 instructions, with 4 physical cores or more, ARMv8 CPU|
|
||||
| **CPU** | - **Windows:** x86_64 CPU with SSE4.2 support, with 4 physical cores or more, ARMv8 CPU |
|
||||
| | |
|
||||
| | - *Example: Intel Core i5-6600K, AMD Ryzen 5 1600, Snapdragon X Elite* |
|
||||
| | |
|
||||
@@ -120,7 +121,7 @@ Desktop or laptop PC - Recommended
|
||||
| | |
|
||||
| | - *Example: Intel Core i5-8500, Apple M1* |
|
||||
| | |
|
||||
| | - **Linux:** x86_32 CPU with SSE2 instructions, x86_64 CPU, ARMv7 or ARMv8 CPU |
|
||||
| | - **Linux:** x86_64 CPU with SSE4.2 support, ARMv7 or ARMv8 CPU |
|
||||
| | |
|
||||
| | - *Example: Intel Core i5-6600K, AMD Ryzen 5 1600, Raspberry Pi 5 with overclocking* |
|
||||
+----------------------+---------------------------------------------------------------------------------------------+
|
||||
@@ -207,27 +208,29 @@ Desktop or laptop PC - Minimum
|
||||
.. which can run up to macOS 10.13.
|
||||
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
| **CPU** | - **Windows:** x86_32 CPU with SSE2 instructions, any x86_64 CPU, ARMv8 CPU |
|
||||
| **CPU** | - **Windows:** x86_32 CPU with SSE2 support, x86_64 CPU with SSE4.2 support, |
|
||||
| | ARMv8 CPU |
|
||||
| | |
|
||||
| | - *Example: Intel Core 2 Duo E8200, AMD Athlon XE BE-2300, Snapdragon X Elite* |
|
||||
| | - *Example: Intel Core 2 Duo E8200, AMD FX-4100, Snapdragon X Elite* |
|
||||
| | |
|
||||
| | - **macOS:** x86_64 or ARM CPU (Apple Silicon) |
|
||||
| | |
|
||||
| | - *Example: Intel Core 2 Duo SU9400, Apple M1* |
|
||||
| | |
|
||||
| | - **Linux:** x86_32 CPU with SSE2 instructions, x86_64 CPU, ARMv7 or ARMv8 CPU |
|
||||
| | - **Linux:** x86_32 CPU with SSE2 support, x86_64 CPU with SSE4.2 support, |
|
||||
| | ARMv7 or ARMv8 CPU |
|
||||
| | |
|
||||
| | - *Example: Intel Core 2 Duo E8200, AMD Athlon XE BE-2300, Raspberry Pi 4* |
|
||||
| | - *Example: Intel Core 2 Duo E8200, AMD FX-4100, Raspberry Pi 4* |
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
| **GPU** | - **Forward+ renderer:** Integrated graphics with full Vulkan 1.0 support, |
|
||||
| | Metal 3 support (macOS) or Direct3D 12 (12_0 feature level) support (Windows) |
|
||||
| | |
|
||||
| | - *Example: Intel HD Graphics 5500 (Broadwell), AMD Radeon R5 Graphics (Kaveri)* |
|
||||
| | - *Example: Intel HD Graphics 510 (Skylake), AMD Radeon R5 Graphics (Kaveri)* |
|
||||
| | |
|
||||
| | - **Mobile renderer:** Integrated graphics with full Vulkan 1.0 support, |
|
||||
| | Metal 3 support (macOS) or Direct3D 12 (12_0 feature level) support (Windows) |
|
||||
| | |
|
||||
| | - *Example: Intel HD Graphics 5500 (Broadwell), AMD Radeon R5 Graphics (Kaveri)* |
|
||||
| | - *Example: Intel HD Graphics 510 (Skylake), AMD Radeon R5 Graphics (Kaveri)* |
|
||||
| | |
|
||||
| | - **Compatibility renderer:** Integrated graphics with full OpenGL 3.3 support |
|
||||
| | or Direct3D 11 support (Windows). |
|
||||
@@ -239,25 +242,13 @@ Desktop or laptop PC - Minimum
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
| **Storage** | 150 MB (used for the executable, project files and cache) |
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
| **Operating system** | - **For native exports:** Windows 7 (Compatibility and Forward+/Mobile, Vulkan), |
|
||||
| | Windows 10 (Forward+/Mobile, Direct3D 12), macOS 10.13 (Compatibility), macOS 10.15 |
|
||||
| **Operating system** | - **For native exports:** Windows 10, macOS 10.13 (Compatibility), macOS 10.15 |
|
||||
| | (Forward+/Mobile, Vulkan), macOS 13.0 (Forward+/Mobile, Metal), Linux distribution |
|
||||
| | released after 2016 |
|
||||
| | - **For web exports:** Firefox 79, Chrome 68, Edge 79, Safari 15.2, Opera 64 |
|
||||
| | released after 2018 |
|
||||
| | - **Web editor:** Recent versions of mainstream browsers: Firefox and derivatives |
|
||||
| | (including ESR), Chrome and Chromium derivatives, Safari and WebKit derivatives. |
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
|
||||
.. note::
|
||||
|
||||
Windows 7/8/8.1 are supported on a best-effort basis. These versions are not
|
||||
regularly tested and some features may be missing (such as colored
|
||||
:ref:`print_rich <class_@GlobalScope_method_print_rich>` console output).
|
||||
Support for Windows 7/8/8.1 may be removed in a
|
||||
:ref:`future Godot 4.x release <doc_release_policy>`.
|
||||
|
||||
Vulkan drivers for these Windows versions are known to have issues with
|
||||
memory leaks. As a result, it's recommended to stick to the Compatibility
|
||||
renderer when running Godot on a Windows version older than 10.
|
||||
|
||||
Mobile device (smartphone/tablet) - Minimum
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -293,8 +284,8 @@ Mobile device (smartphone/tablet) - Minimum
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
| **Operating system** | - **For native exports:** Android 6.0 (Compatibility), Android 9.0 (Forward+/Mobile), |
|
||||
| | iOS 12.0 (Forward+/Mobile, Vulkan), iOS 16.0 (Forward+/Mobile, Metal) |
|
||||
| | - **For web exports:** Firefox 79, Chrome 88, Edge 79, Safari 15.2, Opera 64, |
|
||||
| | Samsung Internet 15 |
|
||||
| | - **Web editor:** Recent versions of mainstream browsers: Firefox and derivatives |
|
||||
| | (including ESR), Chrome and Chromium derivatives, Safari and WebKit derivatives. |
|
||||
+----------------------+-----------------------------------------------------------------------------------------+
|
||||
|
||||
These are the **recommended** specifications to get a smooth experience with a
|
||||
@@ -304,7 +295,7 @@ Desktop or laptop PC - Recommended
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
+----------------------+----------------------------------------------------------------------------------------------+
|
||||
| **CPU** | - **Windows:** x86_64 CPU with SSE4.2 instructions, with 4 physical cores or more, ARMv8 CPU |
|
||||
| **CPU** | - **Windows:** x86_64 CPU with SSE4.2 support, with 4 physical cores or more, ARMv8 CPU |
|
||||
| | |
|
||||
| | - *Example: Intel Core i5-6600K, AMD Ryzen 5 1600, Snapdragon X Elite* |
|
||||
| | |
|
||||
@@ -312,7 +303,8 @@ Desktop or laptop PC - Recommended
|
||||
| | |
|
||||
| | - *Example: Intel Core i5-8500, Apple M1* |
|
||||
| | |
|
||||
| | - **Linux:** x86_32 CPU with SSE2 instructions, x86_64 CPU, ARMv7 or ARMv8 CPU |
|
||||
| | - **Linux:** x86_64 CPU with SSE4.2 support, with 4 physical cores or more, |
|
||||
| | ARMv7 or ARMv8 CPU |
|
||||
| | |
|
||||
| | - *Example: Intel Core i5-6600K, AMD Ryzen 5 1600, Raspberry Pi 5 with overclocking* |
|
||||
+----------------------+----------------------------------------------------------------------------------------------+
|
||||
|
||||
@@ -41,7 +41,7 @@ Methods
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`assert<class_@GDScript_method_assert>`\ (\ condition\: :ref:`bool<class_bool>`, message\: :ref:`String<class_String>` = ""\ ) |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`char<class_@GDScript_method_char>`\ (\ char\: :ref:`int<class_int>`\ ) |
|
||||
| :ref:`String<class_String>` | :ref:`char<class_@GDScript_method_char>`\ (\ code\: :ref:`int<class_int>`\ ) |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant<class_Variant>` | :ref:`convert<class_@GDScript_method_convert>`\ (\ what\: :ref:`Variant<class_Variant>`, type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`\ ) |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -57,6 +57,8 @@ Methods
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Resource<class_Resource>` | :ref:`load<class_@GDScript_method_load>`\ (\ path\: :ref:`String<class_String>`\ ) |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`ord<class_@GDScript_method_ord>`\ (\ char\: :ref:`String<class_String>`\ ) |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Resource<class_Resource>` | :ref:`preload<class_@GDScript_method_preload>`\ (\ path\: :ref:`String<class_String>`\ ) |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`print_debug<class_@GDScript_method_print_debug>`\ (\ ...\ ) |vararg| |
|
||||
@@ -109,7 +111,9 @@ Positive floating-point infinity. This is the result of floating-point division
|
||||
|
||||
**NAN** = ``nan`` :ref:`🔗<class_@GDScript_constant_NAN>`
|
||||
|
||||
"Not a Number", an invalid floating-point value. :ref:`NAN<class_@GDScript_constant_NAN>` has special properties, including that ``!=`` always returns ``true``, while other comparison operators always return ``false``. This is true even when comparing with itself (``NAN == NAN`` returns ``false`` and ``NAN != NAN`` returns ``true``). It is returned by some invalid operations, such as dividing floating-point ``0.0`` by ``0.0``.
|
||||
"Not a Number", an invalid floating-point value. It is returned by some invalid operations, such as dividing floating-point ``0.0`` by ``0.0``.
|
||||
|
||||
\ :ref:`NAN<class_@GDScript_constant_NAN>` has special properties, including that ``!=`` always returns ``true``, while other comparison operators always return ``false``. This is true even when comparing with itself (``NAN == NAN`` returns ``false`` and ``NAN != NAN`` returns ``true``). Due to this, you must use :ref:`@GlobalScope.is_nan()<class_@GlobalScope_method_is_nan>` to check whether a number is equal to :ref:`NAN<class_@GDScript_constant_NAN>`.
|
||||
|
||||
\ **Warning:** "Not a Number" is only a concept with floating-point numbers, and has no equivalent for integers. Dividing an integer ``0`` by ``0`` will not result in :ref:`NAN<class_@GDScript_constant_NAN>` and will result in a run-time error instead.
|
||||
|
||||
@@ -120,6 +124,37 @@ Positive floating-point infinity. This is the result of floating-point division
|
||||
Annotations
|
||||
-----------
|
||||
|
||||
.. _class_@GDScript_annotation_@abstract:
|
||||
|
||||
.. rst-class:: classref-annotation
|
||||
|
||||
**@abstract**\ (\ ) :ref:`🔗<class_@GDScript_annotation_@abstract>`
|
||||
|
||||
Marks a class or a method as abstract.
|
||||
|
||||
An abstract class is a class that cannot be instantiated directly. Instead, it is meant to be inherited by other classes. Attempting to instantiate an abstract class will result in an error.
|
||||
|
||||
An abstract method is a method that has no implementation. Therefore, a newline or a semicolon is expected after the function header. This defines a contract that inheriting classes must conform to, because the method signature must be compatible when overriding.
|
||||
|
||||
Inheriting classes must either provide implementations for all abstract methods, or the inheriting class must be marked as abstract. If a class has at least one abstract method (either its own or an unimplemented inherited one), then it must also be marked as abstract. However, the reverse is not true: an abstract class is allowed to have no abstract methods.
|
||||
|
||||
::
|
||||
|
||||
@abstract class Shape:
|
||||
@abstract func draw()
|
||||
|
||||
class Circle extends Shape:
|
||||
func draw():
|
||||
print("Drawing a circle.")
|
||||
|
||||
class Square extends Shape:
|
||||
func draw():
|
||||
print("Drawing a square.")
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_@GDScript_annotation_@export:
|
||||
|
||||
.. rst-class:: classref-annotation
|
||||
@@ -131,27 +166,27 @@ Mark the following property as exported (editable in the Inspector dock and save
|
||||
::
|
||||
|
||||
extends Node
|
||||
|
||||
|
||||
enum Direction {LEFT, RIGHT, UP, DOWN}
|
||||
|
||||
|
||||
# Built-in types.
|
||||
@export var string = ""
|
||||
@export var int_number = 5
|
||||
@export var float_number: float = 5
|
||||
|
||||
|
||||
# Enums.
|
||||
@export var type: Variant.Type
|
||||
@export var format: Image.Format
|
||||
@export var direction: Direction
|
||||
|
||||
|
||||
# Resources.
|
||||
@export var image: Image
|
||||
@export var custom_resource: CustomResource
|
||||
|
||||
|
||||
# Nodes.
|
||||
@export var node: Node
|
||||
@export var custom_node: CustomNode
|
||||
|
||||
|
||||
# Typed arrays.
|
||||
@export var int_array: Array[int]
|
||||
@export var direction_array: Array[Direction]
|
||||
@@ -259,7 +294,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_ENUM<class_@GlobalScope_constant_PROPE
|
||||
@export_enum("Warrior", "Magician", "Thief") var character_class: int
|
||||
@export_enum("Slow:30", "Average:60", "Very Fast:200") var character_speed: int
|
||||
@export_enum("Rebecca", "Mary", "Leah") var character_name: String
|
||||
|
||||
|
||||
@export_enum("Sword", "Spear", "Mace") var character_items: Array[int]
|
||||
@export_enum("double_jump", "climb", "dash") var character_skills: Array[String]
|
||||
|
||||
@@ -275,7 +310,7 @@ If you want to use named GDScript enums, then use :ref:`@export<class_@GDScript_
|
||||
|
||||
enum CharacterName {REBECCA, MARY, LEAH}
|
||||
@export var character_name: CharacterName
|
||||
|
||||
|
||||
enum CharacterItem {SWORD, SPEAR, MACE}
|
||||
@export var character_items: Array[CharacterItem]
|
||||
|
||||
@@ -322,6 +357,20 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_FILE<class_@GlobalScope_constant_PROPE
|
||||
@export_file("*.txt") var notes_path: String
|
||||
@export_file var level_paths: Array[String]
|
||||
|
||||
\ **Note:** The file will be stored and referenced as UID, if available. This ensures that the reference is valid even when the file is moved. You can use :ref:`ResourceUID<class_ResourceUID>` methods to convert it to path.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_@GDScript_annotation_@export_file_path:
|
||||
|
||||
.. rst-class:: classref-annotation
|
||||
|
||||
**@export_file_path**\ (\ filter\: :ref:`String<class_String>` = "", ...\ ) |vararg| :ref:`🔗<class_@GDScript_annotation_@export_file_path>`
|
||||
|
||||
Same as :ref:`@export_file<class_@GDScript_annotation_@export_file>`, except the file will be stored as a raw path. This means that it may become invalid when the file is moved. If you are exporting a :ref:`Resource<class_Resource>` path, consider using :ref:`@export_file<class_@GDScript_annotation_@export_file>` instead.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
@@ -564,11 +613,11 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_GROUP<class_@GlobalScope_constant_PRO
|
||||
@export_group("Racer Properties")
|
||||
@export var nickname = "Nick"
|
||||
@export var age = 26
|
||||
|
||||
|
||||
@export_group("Car Properties", "car_")
|
||||
@export var car_label = "Speedy"
|
||||
@export var car_number = 3
|
||||
|
||||
|
||||
@export_group("", "")
|
||||
@export var ungrouped_number = 3
|
||||
|
||||
@@ -655,10 +704,10 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_RANGE<class_@GlobalScope_constant_PROP
|
||||
@export_range(-10, 20) var number
|
||||
@export_range(-10, 20, 0.2) var number: float
|
||||
@export_range(0, 20) var numbers: Array[float]
|
||||
|
||||
|
||||
@export_range(0, 100, 1, "or_greater") var power_percent
|
||||
@export_range(0, 100, 1, "or_greater", "or_less") var health_delta
|
||||
|
||||
|
||||
@export_range(-180, 180, 0.001, "radians_as_degrees") var angle_radians
|
||||
@export_range(0, 360, 1, "degrees") var angle_degrees
|
||||
@export_range(-8, 8, 2, "suffix:px") var target_offset
|
||||
@@ -700,7 +749,7 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP<class_@GlobalScope_constant_
|
||||
@export_group("Racer Properties")
|
||||
@export var nickname = "Nick"
|
||||
@export var age = 26
|
||||
|
||||
|
||||
@export_subgroup("Car Properties", "car_")
|
||||
@export var car_label = "Speedy"
|
||||
@export var car_number = 3
|
||||
@@ -742,14 +791,14 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_TOOL_BUTTON<class_@GlobalScope_constan
|
||||
|
||||
@tool
|
||||
extends Sprite2D
|
||||
|
||||
|
||||
@export_tool_button("Hello") var hello_action = hello
|
||||
@export_tool_button("Randomize the color!", "ColorRect")
|
||||
var randomize_color_action = randomize_color
|
||||
|
||||
|
||||
func hello():
|
||||
print("Hello world!")
|
||||
|
||||
|
||||
func randomize_color():
|
||||
var undo_redo = EditorInterface.get_editor_undo_redo()
|
||||
undo_redo.create_action("Randomized Sprite2D Color")
|
||||
@@ -831,13 +880,15 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value
|
||||
|
||||
@rpc
|
||||
func fn(): pass
|
||||
|
||||
|
||||
@rpc("any_peer", "unreliable_ordered")
|
||||
func fn_update_pos(): pass
|
||||
|
||||
|
||||
@rpc("authority", "call_remote", "unreliable", 0) # Equivalent to @rpc
|
||||
func fn_default(): pass
|
||||
|
||||
\ **Note:** Methods annotated with :ref:`@rpc<class_@GDScript_annotation_@rpc>` cannot receive objects which define required parameters in :ref:`Object._init()<class_Object_private_method__init>`. See :ref:`Object._init()<class_Object_private_method__init>` for more details.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
@@ -997,15 +1048,16 @@ An optional ``message`` can be shown in addition to the generic "Assertion faile
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **char**\ (\ char\: :ref:`int<class_int>`\ ) :ref:`🔗<class_@GDScript_method_char>`
|
||||
:ref:`String<class_String>` **char**\ (\ code\: :ref:`int<class_int>`\ ) :ref:`🔗<class_@GDScript_method_char>`
|
||||
|
||||
Returns a single character (as a :ref:`String<class_String>`) of the given Unicode code point (which is compatible with ASCII code).
|
||||
Returns a single character (as a :ref:`String<class_String>` of length 1) of the given Unicode code point ``code``.
|
||||
|
||||
::
|
||||
|
||||
var upper = char(65) # upper is "A"
|
||||
var lower = char(65 + 32) # lower is "a"
|
||||
var euro = char(8364) # euro is "€"
|
||||
print(char(65)) # Prints "A"
|
||||
print(char(129302)) # Prints "🤖" (robot face emoji)
|
||||
|
||||
This is the inverse of :ref:`ord()<class_@GDScript_method_ord>`. See also :ref:`String.chr()<class_String_method_chr>` and :ref:`String.unicode_at()<class_String_method_unicode_at>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1025,7 +1077,7 @@ Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :r
|
||||
|
||||
var a = [4, 2.5, 1.2]
|
||||
print(a is Array) # Prints true
|
||||
|
||||
|
||||
var b = convert(a, TYPE_PACKED_BYTE_ARRAY)
|
||||
print(b) # Prints [4, 2, 1]
|
||||
print(b is Array) # Prints false
|
||||
@@ -1054,16 +1106,16 @@ Converts a ``dictionary`` (created with :ref:`inst_to_dict()<class_@GDScript_met
|
||||
|
||||
:ref:`Array<class_Array>` **get_stack**\ (\ ) :ref:`🔗<class_@GDScript_method_get_stack>`
|
||||
|
||||
Returns an array of dictionaries representing the current call stack. See also :ref:`print_stack()<class_@GDScript_method_print_stack>`.
|
||||
Returns an array of dictionaries representing the current call stack.
|
||||
|
||||
::
|
||||
|
||||
func _ready():
|
||||
foo()
|
||||
|
||||
|
||||
func foo():
|
||||
bar()
|
||||
|
||||
|
||||
func bar():
|
||||
print(get_stack())
|
||||
|
||||
@@ -1073,9 +1125,9 @@ Starting from ``_ready()``, ``bar()`` would print:
|
||||
|
||||
[{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}]
|
||||
|
||||
\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`get_stack()<class_@GDScript_method_get_stack>` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server.
|
||||
See also :ref:`print_debug()<class_@GDScript_method_print_debug>`, :ref:`print_stack()<class_@GDScript_method_print_stack>`, and :ref:`Engine.capture_script_backtraces()<class_Engine_method_capture_script_backtraces>`.
|
||||
|
||||
\ **Note:** Calling this function from a :ref:`Thread<class_Thread>` is not supported. Doing so will return an empty array.
|
||||
\ **Note:** By default, backtraces are only available in editor builds and debug builds. To enable them for release builds as well, you need to enable :ref:`ProjectSettings.debug/settings/gdscript/always_track_call_stacks<class_ProjectSettings_property_debug/settings/gdscript/always_track_call_stacks>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1089,7 +1141,7 @@ Starting from ``_ready()``, ``bar()`` would print:
|
||||
|
||||
**Deprecated:** Consider using :ref:`JSON.from_native()<class_JSON_method_from_native>` or :ref:`Object.get_property_list()<class_Object_method_get_property_list>` instead.
|
||||
|
||||
Returns the passed ``instance`` converted to a Dictionary. Can be useful for serializing.
|
||||
Returns the passed ``instance`` converted to a :ref:`Dictionary<class_Dictionary>`. Can be useful for serializing.
|
||||
|
||||
::
|
||||
|
||||
@@ -1128,7 +1180,7 @@ Returns ``true`` if ``value`` is an instance of ``type``. The ``type`` value mus
|
||||
|
||||
- A :ref:`Script<class_Script>` (you can use any class, including inner one).
|
||||
|
||||
Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays). Use the operator instead of this method if you do not need dynamic type checking.
|
||||
Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays). Use the operator instead of this method if you do not need to check the type dynamically.
|
||||
|
||||
\ **Examples:**\
|
||||
|
||||
@@ -1159,7 +1211,7 @@ Returns the length of the given Variant ``var``. The length can be the character
|
||||
|
||||
var a = [1, 2, 3, 4]
|
||||
len(a) # Returns 4
|
||||
|
||||
|
||||
var b = "Hello!"
|
||||
len(b) # Returns 6
|
||||
|
||||
@@ -1194,6 +1246,25 @@ This function is a simplified version of :ref:`ResourceLoader.load()<class_Resou
|
||||
|
||||
----
|
||||
|
||||
.. _class_@GDScript_method_ord:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **ord**\ (\ char\: :ref:`String<class_String>`\ ) :ref:`🔗<class_@GDScript_method_ord>`
|
||||
|
||||
Returns an integer representing the Unicode code point of the given character ``char``, which should be a string of length 1.
|
||||
|
||||
::
|
||||
|
||||
print(ord("A")) # Prints 65
|
||||
print(ord("🤖")) # Prints 129302
|
||||
|
||||
This is the inverse of :ref:`char()<class_@GDScript_method_char>`. See also :ref:`String.chr()<class_String_method_chr>` and :ref:`String.unicode_at()<class_String_method_unicode_at>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_@GDScript_method_preload:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -1230,7 +1301,9 @@ The output in the console may look like the following:
|
||||
Test print
|
||||
At: res://test.gd:15:_process()
|
||||
|
||||
\ **Note:** Calling this function from a :ref:`Thread<class_Thread>` is not supported. Doing so will instead print the thread ID.
|
||||
See also :ref:`print_stack()<class_@GDScript_method_print_stack>`, :ref:`get_stack()<class_@GDScript_method_get_stack>`, and :ref:`Engine.capture_script_backtraces()<class_Engine_method_capture_script_backtraces>`.
|
||||
|
||||
\ **Note:** By default, backtraces are only available in editor builds and debug builds. To enable them for release builds as well, you need to enable :ref:`ProjectSettings.debug/settings/gdscript/always_track_call_stacks<class_ProjectSettings_property_debug/settings/gdscript/always_track_call_stacks>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1242,7 +1315,7 @@ The output in the console may look like the following:
|
||||
|
||||
|void| **print_stack**\ (\ ) :ref:`🔗<class_@GDScript_method_print_stack>`
|
||||
|
||||
Prints a stack trace at the current code location. See also :ref:`get_stack()<class_@GDScript_method_get_stack>`.
|
||||
Prints a stack trace at the current code location.
|
||||
|
||||
The output in the console may look like the following:
|
||||
|
||||
@@ -1250,9 +1323,9 @@ The output in the console may look like the following:
|
||||
|
||||
Frame 0 - res://test.gd:16 in function '_process'
|
||||
|
||||
\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`print_stack()<class_@GDScript_method_print_stack>` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server.
|
||||
See also :ref:`print_debug()<class_@GDScript_method_print_debug>`, :ref:`get_stack()<class_@GDScript_method_get_stack>`, and :ref:`Engine.capture_script_backtraces()<class_Engine_method_capture_script_backtraces>`.
|
||||
|
||||
\ **Note:** Calling this function from a :ref:`Thread<class_Thread>` is not supported. Doing so will instead print the thread ID.
|
||||
\ **Note:** By default, backtraces are only available in editor builds and debug builds. To enable them for release builds as well, you need to enable :ref:`ProjectSettings.debug/settings/gdscript/always_track_call_stacks<class_ProjectSettings_property_debug/settings/gdscript/always_track_call_stacks>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1334,6 +1407,7 @@ Returns ``true`` if the given :ref:`Object<class_Object>`-derived class exists i
|
||||
type_exists("NonExistentClass") # Returns false
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -3052,7 +3052,7 @@ Since :ref:`OK<class_@GlobalScope_constant_OK>` has value ``0``, and all other e
|
||||
var error = method_that_returns_error()
|
||||
if error != OK:
|
||||
printerr("Failure!")
|
||||
|
||||
|
||||
# Or, alternatively:
|
||||
if error:
|
||||
printerr("Still failing!")
|
||||
@@ -3587,7 +3587,7 @@ Hints that an integer property is a bitmask using the optionally named avoidance
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_FILE** = ``13``
|
||||
|
||||
Hints that a :ref:`String<class_String>` property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``.
|
||||
Hints that a :ref:`String<class_String>` property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``. By default the file will be stored as UID whenever available. You can use :ref:`ResourceUID<class_ResourceUID>` methods to convert it back to path. For storing a raw path, use :ref:`PROPERTY_HINT_FILE_PATH<class_@GlobalScope_constant_PROPERTY_HINT_FILE_PATH>`.
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_DIR:
|
||||
|
||||
@@ -3671,6 +3671,8 @@ If a property is :ref:`String<class_String>`, hints that the property represents
|
||||
|
||||
If a property is :ref:`Array<class_Array>`, hints the editor how to show elements. The ``hint_string`` must encode nested types using ``":"`` and ``"/"``.
|
||||
|
||||
If a property is :ref:`Dictionary<class_Dictionary>`, hints the editor how to show elements. The ``hint_string`` is the same as :ref:`Array<class_Array>`, with a ``";"`` separating the key and value.
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
@@ -3713,7 +3715,7 @@ If a property is :ref:`Array<class_Array>`, hints the editor how to show element
|
||||
hint_string = "%d/%d:Zero,One,Three:3,Six:6" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
|
||||
hint_string = "%d/%d:*.png" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of strings (file paths).
|
||||
hint_string = "%d/%d:Texture2D" % [TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Array of textures.
|
||||
|
||||
|
||||
hint_string = "%d:%d:" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array of floats.
|
||||
hint_string = "%d:%d/%d:" % [TYPE_ARRAY, TYPE_STRING, PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings.
|
||||
hint_string = "%d:%d/%d:-1,1,0.1" % [TYPE_ARRAY, TYPE_FLOAT, PROPERTY_HINT_RANGE] # Two-dimensional array of floats (in range from -1 to 1).
|
||||
@@ -3726,7 +3728,7 @@ If a property is :ref:`Array<class_Array>`, hints the editor how to show element
|
||||
hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6"; // Array of integers (an enum).
|
||||
hintString = $"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png"; // Array of strings (file paths).
|
||||
hintString = $"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Array of textures.
|
||||
|
||||
|
||||
hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}:"; // Two-dimensional array of floats.
|
||||
hintString = $"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:"; // Two-dimensional array of multiline strings.
|
||||
hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}/{PropertyHint.Range:D}:-1,1,0.1"; // Two-dimensional array of floats (in range from -1 to 1).
|
||||
@@ -3802,7 +3804,9 @@ Hints that an :ref:`int<class_int>` property is a pointer. Used by GDExtension.
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ARRAY_TYPE** = ``31``
|
||||
|
||||
Hints that a property is an :ref:`Array<class_Array>` with the stored type specified in the hint string.
|
||||
Hints that a property is an :ref:`Array<class_Array>` with the stored type specified in the hint string. The hint string contains the type of the array (e.g. ``"String"``).
|
||||
|
||||
Use the hint string format from :ref:`PROPERTY_HINT_TYPE_STRING<class_@GlobalScope_constant_PROPERTY_HINT_TYPE_STRING>` for more control over the stored type.
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_DICTIONARY_TYPE:
|
||||
|
||||
@@ -3810,7 +3814,9 @@ Hints that a property is an :ref:`Array<class_Array>` with the stored type speci
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_DICTIONARY_TYPE** = ``38``
|
||||
|
||||
Hints that a property is a :ref:`Dictionary<class_Dictionary>` with the stored types specified in the hint string.
|
||||
Hints that a property is a :ref:`Dictionary<class_Dictionary>` with the stored types specified in the hint string. The hint string contains the key and value types separated by a semicolon (e.g. ``"int;String"``).
|
||||
|
||||
Use the hint string format from :ref:`PROPERTY_HINT_TYPE_STRING<class_@GlobalScope_constant_PROPERTY_HINT_TYPE_STRING>` for more control over the stored types.
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID:
|
||||
|
||||
@@ -3875,11 +3881,41 @@ Hints that a :ref:`Callable<class_Callable>` property should be displayed as a c
|
||||
|
||||
Hints that a property will be changed on its own after setting, such as :ref:`AudioStreamPlayer.playing<class_AudioStreamPlayer_property_playing>` or :ref:`GPUParticles3D.emitting<class_GPUParticles3D_property_emitting>`.
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_GROUP_ENABLE:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_GROUP_ENABLE** = ``42``
|
||||
|
||||
Hints that a boolean property will enable the feature associated with the group that it occurs in. The property will be displayed as a checkbox on the group header. Only works within a group or subgroup.
|
||||
|
||||
By default, disabling the property hides all properties in the group. Use the optional hint string ``"checkbox_only"`` to disable this behavior.
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_INPUT_NAME:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_INPUT_NAME** = ``43``
|
||||
|
||||
Hints that a :ref:`String<class_String>` or :ref:`StringName<class_StringName>` property is the name of an input action. This allows the selection of any action name from the Input Map in the Project Settings. The hint string may contain two options separated by commas:
|
||||
|
||||
- If it contains ``"show_builtin"``, built-in input actions are included in the selection.
|
||||
|
||||
- If it contains ``"loose_mode"``, loose mode is enabled. This allows inserting any action name even if it's not present in the input map.
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_FILE_PATH:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_FILE_PATH** = ``44``
|
||||
|
||||
Like :ref:`PROPERTY_HINT_FILE<class_@GlobalScope_constant_PROPERTY_HINT_FILE>`, but the property is stored as a raw path, not UID. That means the reference will be broken if you move the file. Consider using :ref:`PROPERTY_HINT_FILE<class_@GlobalScope_constant_PROPERTY_HINT_FILE>` when possible.
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_MAX:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_MAX** = ``42``
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_MAX** = ``45``
|
||||
|
||||
Represents the size of the :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` enum.
|
||||
|
||||
@@ -4225,7 +4261,7 @@ Used internally. Allows to not dump core virtual methods (such as :ref:`Object._
|
||||
|
||||
:ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_VIRTUAL_REQUIRED** = ``128``
|
||||
|
||||
Flag for a virtual method that is required.
|
||||
Flag for a virtual method that is required. In GDScript, this flag is set for abstract functions.
|
||||
|
||||
.. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT:
|
||||
|
||||
@@ -5261,19 +5297,19 @@ Returns the absolute value of a :ref:`Variant<class_Variant>` parameter ``x`` (i
|
||||
|
||||
var a = abs(-1)
|
||||
# a is 1
|
||||
|
||||
|
||||
var b = abs(-1.2)
|
||||
# b is 1.2
|
||||
|
||||
|
||||
var c = abs(Vector2(-3.5, -4))
|
||||
# c is (3.5, 4)
|
||||
|
||||
|
||||
var d = abs(Vector2i(-5, -6))
|
||||
# d is (5, 6)
|
||||
|
||||
|
||||
var e = abs(Vector3(-7, 8.5, -3.8))
|
||||
# e is (7, 8.5, 3.8)
|
||||
|
||||
|
||||
var f = abs(Vector3i(-7, -8, -9))
|
||||
# f is (7, 8, 9)
|
||||
|
||||
@@ -5346,7 +5382,7 @@ Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a va
|
||||
|
||||
var a = acosh(2) # Returns 1.31695789692482
|
||||
cosh(a) # Returns 2
|
||||
|
||||
|
||||
var b = acosh(-1) # Returns 0
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
@@ -5451,7 +5487,7 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` <
|
||||
|
||||
var a = atanh(0.9) # Returns 1.47221948958322
|
||||
tanh(a) # Returns 0.9
|
||||
|
||||
|
||||
var b = atanh(-2) # Returns -inf
|
||||
tanh(b) # Returns -1
|
||||
|
||||
@@ -5572,7 +5608,7 @@ Clamps the ``value``, returning a :ref:`Variant<class_Variant>` not less than ``
|
||||
|
||||
var a = clamp(-10, -1, 5)
|
||||
# a is -1
|
||||
|
||||
|
||||
var b = clamp(8.1, 0.9, 5.5)
|
||||
# b is 5.5
|
||||
|
||||
@@ -5596,7 +5632,7 @@ Clamps the ``value``, returning a :ref:`float<class_float>` not less than ``min`
|
||||
|
||||
var speed = 42.1
|
||||
var a = clampf(speed, 1.0, 20.5) # a is 20.5
|
||||
|
||||
|
||||
speed = -10.0
|
||||
var b = clampf(speed, -1.0, 1.0) # b is -1.0
|
||||
|
||||
@@ -5616,7 +5652,7 @@ Clamps the ``value``, returning an :ref:`int<class_int>` not less than ``min`` a
|
||||
|
||||
var speed = 42
|
||||
var a = clampi(speed, 1, 20) # a is 20
|
||||
|
||||
|
||||
speed = -10
|
||||
var b = clampi(speed, -1, 1) # b is -1
|
||||
|
||||
@@ -5943,7 +5979,7 @@ Returns the :ref:`Object<class_Object>` that corresponds to ``instance_id``. All
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var drink = "water"
|
||||
|
||||
|
||||
func _ready():
|
||||
var id = get_instance_id()
|
||||
var instance = instance_from_id(id)
|
||||
@@ -5954,7 +5990,7 @@ Returns the :ref:`Object<class_Object>` that corresponds to ``instance_id``. All
|
||||
public partial class MyNode : Node
|
||||
{
|
||||
public string Drink { get; set; } = "water";
|
||||
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
ulong id = GetInstanceId();
|
||||
@@ -5982,7 +6018,7 @@ Returns an interpolation or extrapolation factor considering the range specified
|
||||
# The interpolation ratio in the `lerp()` call below is 0.75.
|
||||
var middle = lerp(20, 30, 0.75)
|
||||
# middle is now 27.5.
|
||||
|
||||
|
||||
# Now, we pretend to have forgotten the original ratio and want to get it back.
|
||||
var ratio = inverse_lerp(20, 30, 27.5)
|
||||
# ratio is now 0.75.
|
||||
@@ -6015,7 +6051,7 @@ Infinity values of the same sign are considered equal.
|
||||
|
||||
:ref:`bool<class_bool>` **is_finite**\ (\ x\: :ref:`float<class_float>`\ ) :ref:`🔗<class_@GlobalScope_method_is_finite>`
|
||||
|
||||
Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`, positive infinity, or negative infinity.
|
||||
Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`, positive infinity, or negative infinity. See also :ref:`is_inf()<class_@GlobalScope_method_is_inf>` and :ref:`is_nan()<class_@GlobalScope_method_is_nan>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -6027,7 +6063,7 @@ Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN<clas
|
||||
|
||||
:ref:`bool<class_bool>` **is_inf**\ (\ x\: :ref:`float<class_float>`\ ) :ref:`🔗<class_@GlobalScope_method_is_inf>`
|
||||
|
||||
Returns ``true`` if ``x`` is either positive infinity or negative infinity.
|
||||
Returns ``true`` if ``x`` is either positive infinity or negative infinity. See also :ref:`is_finite()<class_@GlobalScope_method_is_finite>` and :ref:`is_nan()<class_@GlobalScope_method_is_nan>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -6063,7 +6099,7 @@ Returns ``true`` if ``instance`` is a valid Object (e.g. has not been deleted fr
|
||||
|
||||
:ref:`bool<class_bool>` **is_nan**\ (\ x\: :ref:`float<class_float>`\ ) :ref:`🔗<class_@GlobalScope_method_is_nan>`
|
||||
|
||||
Returns ``true`` if ``x`` is a NaN ("Not a Number" or invalid) value.
|
||||
Returns ``true`` if ``x`` is a NaN ("Not a Number" or invalid) value. This method is needed as :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` is not equal to itself, which means ``x == NAN`` can't be used to check whether a value is a NaN.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -6086,7 +6122,7 @@ Returns ``true``, for value types, if ``a`` and ``b`` share the same value. Retu
|
||||
is_same(vec2_a, vec2_a) # true
|
||||
is_same(vec2_a, vec2_b) # true
|
||||
is_same(vec2_a, vec2_c) # false
|
||||
|
||||
|
||||
# Array is a reference type
|
||||
var arr_a = []
|
||||
var arr_b = []
|
||||
@@ -6357,7 +6393,7 @@ Returns the smallest integer power of 2 that is greater than or equal to ``value
|
||||
nearest_po2(3) # Returns 4
|
||||
nearest_po2(4) # Returns 4
|
||||
nearest_po2(5) # Returns 8
|
||||
|
||||
|
||||
nearest_po2(0) # Returns 0 (this may not be expected)
|
||||
nearest_po2(-1) # Returns 0 (this may not be expected)
|
||||
|
||||
@@ -6500,8 +6536,6 @@ When printing to standard output, the supported subset of BBCode is converted to
|
||||
|
||||
\ **Note:** Consider using :ref:`push_error()<class_@GlobalScope_method_push_error>` and :ref:`push_warning()<class_@GlobalScope_method_push_warning>` to print error and warning messages instead of :ref:`print()<class_@GlobalScope_method_print>` or :ref:`print_rich()<class_@GlobalScope_method_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.
|
||||
|
||||
\ **Note:** Output displayed in the editor supports clickable ``[url=address]text[/url]`` tags. The ``[url]`` tag's ``address`` value is handled by :ref:`OS.shell_open()<class_OS_method_shell_open>` when clicked.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
@@ -6711,7 +6745,7 @@ Given a ``seed``, returns a :ref:`PackedInt64Array<class_PackedInt64Array>` of s
|
||||
::
|
||||
|
||||
var a = rand_from_seed(4)
|
||||
|
||||
|
||||
print(a[0]) # Prints 2879024997
|
||||
print(a[1]) # Prints 4
|
||||
|
||||
@@ -7018,7 +7052,7 @@ Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2
|
||||
sign(0.0) # Returns 0
|
||||
sign(6.0) # Returns 1
|
||||
sign(NAN) # Returns 0
|
||||
|
||||
|
||||
sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1)
|
||||
|
||||
\ **Note:** For better type safety, use :ref:`signf()<class_@GlobalScope_method_signf>`, :ref:`signi()<class_@GlobalScope_method_signi>`, :ref:`Vector2.sign()<class_Vector2_method_sign>`, :ref:`Vector2i.sign()<class_Vector2i_method_sign>`, :ref:`Vector3.sign()<class_Vector3_method_sign>`, :ref:`Vector3i.sign()<class_Vector3i_method_sign>`, :ref:`Vector4.sign()<class_Vector4_method_sign>`, or :ref:`Vector4i.sign()<class_Vector4i_method_sign>`.
|
||||
@@ -7143,7 +7177,7 @@ The returned value is the same type of :ref:`Variant<class_Variant>` as ``step``
|
||||
|
||||
snapped(100, 32) # Returns 96
|
||||
snapped(3.14159, 0.01) # Returns 3.14
|
||||
|
||||
|
||||
snapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72)
|
||||
|
||||
See also :ref:`ceil()<class_@GlobalScope_method_ceil>`, :ref:`floor()<class_@GlobalScope_method_floor>`, and :ref:`round()<class_@GlobalScope_method_round>`.
|
||||
@@ -7206,7 +7240,7 @@ Returns the square root of ``x``, where ``x`` is a non-negative number.
|
||||
sqrt(10.24) # Returns 3.2
|
||||
sqrt(-1) # Returns NaN
|
||||
|
||||
\ **Note:** Negative values of ``x`` return NaN ("Not a Number"). in C#, if you need negative inputs, use ``System.Numerics.Complex``.
|
||||
\ **Note:** Negative values of ``x`` return NaN ("Not a Number"). In C#, if you need negative inputs, use ``System.Numerics.Complex``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -7467,18 +7501,18 @@ A weak reference to an object is not enough to keep the object alive: when the o
|
||||
|
||||
:ref:`Variant<class_Variant>` **wrap**\ (\ value\: :ref:`Variant<class_Variant>`, min\: :ref:`Variant<class_Variant>`, max\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_@GlobalScope_method_wrap>`
|
||||
|
||||
Wraps the :ref:`Variant<class_Variant>` ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces.
|
||||
Wraps the :ref:`Variant<class_Variant>` ``value`` between ``min`` and ``max``. ``min`` is *inclusive* while ``max`` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces.
|
||||
|
||||
Variant types :ref:`int<class_int>` and :ref:`float<class_float>` are supported. If any of the arguments is :ref:`float<class_float>` this function returns a :ref:`float<class_float>`, otherwise it returns an :ref:`int<class_int>`.
|
||||
Variant types :ref:`int<class_int>` and :ref:`float<class_float>` are supported. If any of the arguments is :ref:`float<class_float>`, this function returns a :ref:`float<class_float>`, otherwise it returns an :ref:`int<class_int>`.
|
||||
|
||||
::
|
||||
|
||||
var a = wrap(4, 5, 10)
|
||||
# a is 9 (int)
|
||||
|
||||
|
||||
var a = wrap(7, 5, 10)
|
||||
# a is 7 (int)
|
||||
|
||||
|
||||
var a = wrap(10.5, 5, 10)
|
||||
# a is 5.5 (float)
|
||||
|
||||
@@ -7492,7 +7526,7 @@ Variant types :ref:`int<class_int>` and :ref:`float<class_float>` are supported.
|
||||
|
||||
:ref:`float<class_float>` **wrapf**\ (\ value\: :ref:`float<class_float>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`\ ) :ref:`🔗<class_@GlobalScope_method_wrapf>`
|
||||
|
||||
Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces.
|
||||
Wraps the float ``value`` between ``min`` and ``max``. ``min`` is *inclusive* while ``max`` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces.
|
||||
|
||||
::
|
||||
|
||||
@@ -7509,9 +7543,7 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating
|
||||
# Infinite rotation (in radians)
|
||||
angle = wrapf(angle + 0.1, -PI, PI)
|
||||
|
||||
\ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod()<class_@GlobalScope_method_fposmod>`, so prefer using that instead.
|
||||
|
||||
\ :ref:`wrapf()<class_@GlobalScope_method_wrapf>` is more flexible than using the :ref:`fposmod()<class_@GlobalScope_method_fposmod>` approach by giving the user control over the minimum value.
|
||||
\ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod()<class_@GlobalScope_method_fposmod>`, so prefer using that instead. :ref:`wrapf()<class_@GlobalScope_method_wrapf>` is more flexible than using the :ref:`fposmod()<class_@GlobalScope_method_fposmod>` approach by giving the user control over the minimum value.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -7523,7 +7555,7 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating
|
||||
|
||||
:ref:`int<class_int>` **wrapi**\ (\ value\: :ref:`int<class_int>`, min\: :ref:`int<class_int>`, max\: :ref:`int<class_int>`\ ) :ref:`🔗<class_@GlobalScope_method_wrapi>`
|
||||
|
||||
Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces.
|
||||
Wraps the integer ``value`` between ``min`` and ``max``. ``min`` is *inclusive* while ``max`` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces.
|
||||
|
||||
::
|
||||
|
||||
@@ -7536,6 +7568,7 @@ Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creatin
|
||||
var result = wrapi(-6, -5, -1)
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -23,7 +23,7 @@ It uses floating-point coordinates. The 2D counterpart to **AABB** is :ref:`Rect
|
||||
|
||||
\ **Note:** Negative values for :ref:`size<class_AABB_property_size>` are not supported. With negative size, most **AABB** methods do not work correctly. Use :ref:`abs()<class_AABB_method_abs>` to get an equivalent **AABB** with a non-negative size.
|
||||
|
||||
\ **Note:** In a boolean context, a **AABB** evaluates to ``false`` if both :ref:`position<class_AABB_property_position>` and :ref:`size<class_AABB_property_size>` are zero (equal to :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`). Otherwise, it always evaluates to ``true``.
|
||||
\ **Note:** In a boolean context, an **AABB** evaluates to ``false`` if both :ref:`position<class_AABB_property_position>` and :ref:`size<class_AABB_property_size>` are zero (equal to :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`). Otherwise, it always evaluates to ``true``.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -286,7 +286,7 @@ Returns ``true`` if this bounding box *completely* encloses the ``with`` box. Th
|
||||
var a = AABB(Vector3(0, 0, 0), Vector3(4, 4, 4))
|
||||
var b = AABB(Vector3(1, 1, 1), Vector3(3, 3, 3))
|
||||
var c = AABB(Vector3(2, 2, 2), Vector3(8, 8, 8))
|
||||
|
||||
|
||||
print(a.encloses(a)) # Prints true
|
||||
print(a.encloses(b)) # Prints true
|
||||
print(a.encloses(c)) # Prints false
|
||||
@@ -296,7 +296,7 @@ Returns ``true`` if this bounding box *completely* encloses the ``with`` box. Th
|
||||
var a = new Aabb(new Vector3(0, 0, 0), new Vector3(4, 4, 4));
|
||||
var b = new Aabb(new Vector3(1, 1, 1), new Vector3(3, 3, 3));
|
||||
var c = new Aabb(new Vector3(2, 2, 2), new Vector3(8, 8, 8));
|
||||
|
||||
|
||||
GD.Print(a.Encloses(a)); // Prints True
|
||||
GD.Print(a.Encloses(b)); // Prints True
|
||||
GD.Print(a.Encloses(c)); // Prints False
|
||||
@@ -321,11 +321,11 @@ Returns a copy of this bounding box expanded to align the edges with the given `
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5))
|
||||
|
||||
|
||||
box = box.expand(Vector3(10, 0, 0))
|
||||
print(box.position) # Prints (0.0, 0.0, 0.0)
|
||||
print(box.size) # Prints (10.0, 2.0, 5.0)
|
||||
|
||||
|
||||
box = box.expand(Vector3(-5, 0, 5))
|
||||
print(box.position) # Prints (-5.0, 0.0, 0.0)
|
||||
print(box.size) # Prints (15.0, 2.0, 5.0)
|
||||
@@ -333,11 +333,11 @@ Returns a copy of this bounding box expanded to align the edges with the given `
|
||||
.. code-tab:: csharp
|
||||
|
||||
var box = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 5));
|
||||
|
||||
|
||||
box = box.Expand(new Vector3(10, 0, 0));
|
||||
GD.Print(box.Position); // Prints (0, 0, 0)
|
||||
GD.Print(box.Size); // Prints (10, 2, 5)
|
||||
|
||||
|
||||
box = box.Expand(new Vector3(-5, 0, 5));
|
||||
GD.Print(box.Position); // Prints (-5, 0, 0)
|
||||
GD.Print(box.Size); // Prints (15, 2, 5)
|
||||
@@ -366,7 +366,7 @@ Returns the center point of the bounding box. This is the same as ``position + (
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_endpoint**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_AABB_method_get_endpoint>`
|
||||
|
||||
Returns the position of one of the 8 vertices that compose this bounding box. With a ``idx`` of ``0`` this is the same as :ref:`position<class_AABB_property_position>`, and a ``idx`` of ``7`` is the same as :ref:`end<class_AABB_property_end>`.
|
||||
Returns the position of one of the 8 vertices that compose this bounding box. With an ``idx`` of ``0`` this is the same as :ref:`position<class_AABB_property_position>`, and an ``idx`` of ``7`` is the same as :ref:`end<class_AABB_property_end>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -386,7 +386,7 @@ Returns the longest normalized axis of this bounding box's :ref:`size<class_AABB
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
|
||||
|
||||
|
||||
print(box.get_longest_axis()) # Prints (0.0, 0.0, 1.0)
|
||||
print(box.get_longest_axis_index()) # Prints 2
|
||||
print(box.get_longest_axis_size()) # Prints 8.0
|
||||
@@ -394,7 +394,7 @@ Returns the longest normalized axis of this bounding box's :ref:`size<class_AABB
|
||||
.. code-tab:: csharp
|
||||
|
||||
var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));
|
||||
|
||||
|
||||
GD.Print(box.GetLongestAxis()); // Prints (0, 0, 1)
|
||||
GD.Print(box.GetLongestAxisIndex()); // Prints Z
|
||||
GD.Print(box.GetLongestAxisSize()); // Prints 8
|
||||
@@ -449,7 +449,7 @@ Returns the shortest normalized axis of this bounding box's :ref:`size<class_AAB
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))
|
||||
|
||||
|
||||
print(box.get_shortest_axis()) # Prints (1.0, 0.0, 0.0)
|
||||
print(box.get_shortest_axis_index()) # Prints 0
|
||||
print(box.get_shortest_axis_size()) # Prints 2.0
|
||||
@@ -457,7 +457,7 @@ Returns the shortest normalized axis of this bounding box's :ref:`size<class_AAB
|
||||
.. code-tab:: csharp
|
||||
|
||||
var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));
|
||||
|
||||
|
||||
GD.Print(box.GetShortestAxis()); // Prints (1, 0, 0)
|
||||
GD.Print(box.GetShortestAxisIndex()); // Prints X
|
||||
GD.Print(box.GetShortestAxisSize()); // Prints 2
|
||||
@@ -538,7 +538,7 @@ Returns a copy of this bounding box extended on all sides by the given amount ``
|
||||
var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4)
|
||||
print(a.position) # Prints (0.0, 0.0, 0.0)
|
||||
print(a.size) # Prints (16.0, 16.0, 16.0)
|
||||
|
||||
|
||||
var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2)
|
||||
print(b.position) # Prints (-2.0, -2.0, -2.0)
|
||||
print(b.size) # Prints (12.0, 8.0, 6.0)
|
||||
@@ -548,7 +548,7 @@ Returns a copy of this bounding box extended on all sides by the given amount ``
|
||||
var a = new Aabb(new Vector3(4, 4, 4), new Vector3(8, 8, 8)).Grow(4);
|
||||
GD.Print(a.Position); // Prints (0, 0, 0)
|
||||
GD.Print(a.Size); // Prints (16, 16, 16)
|
||||
|
||||
|
||||
var b = new Aabb(new Vector3(0, 0, 0), new Vector3(8, 4, 2)).Grow(2);
|
||||
GD.Print(b.Position); // Prints (-2, -2, -2)
|
||||
GD.Print(b.Size); // Prints (12, 8, 6)
|
||||
@@ -612,7 +612,7 @@ Returns the intersection between this bounding box and ``with``. If the boxes do
|
||||
|
||||
var box1 = AABB(Vector3(0, 0, 0), Vector3(5, 2, 8))
|
||||
var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4))
|
||||
|
||||
|
||||
var intersection = box1.intersection(box2)
|
||||
print(intersection.position) # Prints (2.0, 0.0, 2.0)
|
||||
print(intersection.size) # Prints (3.0, 2.0, 4.0)
|
||||
@@ -621,7 +621,7 @@ Returns the intersection between this bounding box and ``with``. If the boxes do
|
||||
|
||||
var box1 = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 8));
|
||||
var box2 = new Aabb(new Vector3(2, 0, 2), new Vector3(8, 4, 4));
|
||||
|
||||
|
||||
var intersection = box1.Intersection(box2);
|
||||
GD.Print(intersection.Position); // Prints (2, 0, 2)
|
||||
GD.Print(intersection.Size); // Prints (3, 2, 4)
|
||||
@@ -768,6 +768,7 @@ Returns ``true`` if both :ref:`position<class_AABB_property_position>` and :ref:
|
||||
\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()<class_AABB_method_is_equal_approx>` instead, which is more reliable.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -44,7 +44,11 @@ Properties
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | keep_title_visible | ``true`` (overrides :ref:`Window<class_Window_property_keep_title_visible>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`ok_button_text<class_AcceptDialog_property_ok_button_text>` | ``"OK"`` |
|
||||
| :ref:`bool<class_bool>` | maximize_disabled | ``true`` (overrides :ref:`Window<class_Window_property_maximize_disabled>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | minimize_disabled | ``true`` (overrides :ref:`Window<class_Window_property_minimize_disabled>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`ok_button_text<class_AcceptDialog_property_ok_button_text>` | ``""`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | title | ``"Alert!"`` (overrides :ref:`Window<class_Window_property_title>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
@@ -134,7 +138,7 @@ Emitted when the dialog is accepted, i.e. the OK button is pressed.
|
||||
|
||||
**custom_action**\ (\ action\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AcceptDialog_signal_custom_action>`
|
||||
|
||||
Emitted when a custom button is pressed. See :ref:`add_button()<class_AcceptDialog_method_add_button>`.
|
||||
Emitted when a custom button with an action is pressed. See :ref:`add_button()<class_AcceptDialog_method_add_button>`.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -173,7 +177,7 @@ Sets autowrapping for the text in the dialog.
|
||||
- |void| **set_close_on_escape**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **get_close_on_escape**\ (\ )
|
||||
|
||||
If ``true``, the dialog will be hidden when the escape key (:ref:`@GlobalScope.KEY_ESCAPE<class_@GlobalScope_constant_KEY_ESCAPE>`) is pressed.
|
||||
If ``true``, the dialog will be hidden when the ``ui_cancel`` action is pressed (by default, this action is bound to :ref:`@GlobalScope.KEY_ESCAPE<class_@GlobalScope_constant_KEY_ESCAPE>`).
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -219,14 +223,14 @@ The text displayed by the dialog.
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`String<class_String>` **ok_button_text** = ``"OK"`` :ref:`🔗<class_AcceptDialog_property_ok_button_text>`
|
||||
:ref:`String<class_String>` **ok_button_text** = ``""`` :ref:`🔗<class_AcceptDialog_property_ok_button_text>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_ok_button_text**\ (\ value\: :ref:`String<class_String>`\ )
|
||||
- :ref:`String<class_String>` **get_ok_button_text**\ (\ )
|
||||
|
||||
The text displayed by the OK button (see :ref:`get_ok_button()<class_AcceptDialog_method_get_ok_button>`).
|
||||
The text displayed by the OK button (see :ref:`get_ok_button()<class_AcceptDialog_method_get_ok_button>`). If empty, a default text will be used.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -243,7 +247,9 @@ Method Descriptions
|
||||
|
||||
:ref:`Button<class_Button>` **add_button**\ (\ text\: :ref:`String<class_String>`, right\: :ref:`bool<class_bool>` = false, action\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_AcceptDialog_method_add_button>`
|
||||
|
||||
Adds a button with label ``text`` and a custom ``action`` to the dialog and returns the created button. ``action`` will be passed to the :ref:`custom_action<class_AcceptDialog_signal_custom_action>` signal when pressed.
|
||||
Adds a button with label ``text`` and a custom ``action`` to the dialog and returns the created button.
|
||||
|
||||
If ``action`` is not empty, pressing the button will emit the :ref:`custom_action<class_AcceptDialog_signal_custom_action>` signal with the specified action string.
|
||||
|
||||
If ``true``, ``right`` will place the button to the right of any sibling buttons.
|
||||
|
||||
@@ -369,6 +375,7 @@ The size of the vertical space between the dialog's content and the button row.
|
||||
The panel that fills the background of the window.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -27,9 +27,9 @@ This class holds the context information required for encryption and decryption
|
||||
.. code-tab:: gdscript
|
||||
|
||||
extends Node
|
||||
|
||||
|
||||
var aes = AESContext.new()
|
||||
|
||||
|
||||
func _ready():
|
||||
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.
|
||||
@@ -43,7 +43,7 @@ This class holds the context information required for encryption and decryption
|
||||
aes.finish()
|
||||
# Check ECB
|
||||
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_buffer(), iv.to_utf8_buffer())
|
||||
@@ -60,11 +60,11 @@ This class holds the context information required for encryption and decryption
|
||||
|
||||
using Godot;
|
||||
using System.Diagnostics;
|
||||
|
||||
|
||||
public partial class MyNode : Node
|
||||
{
|
||||
private AesContext _aes = new AesContext();
|
||||
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
string key = "My secret key!!!"; // Key must be either 16 or 32 bytes.
|
||||
@@ -79,7 +79,7 @@ This class holds the context information required for encryption and decryption
|
||||
_aes.Finish();
|
||||
// Check ECB
|
||||
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.ToUtf8Buffer(), iv.ToUtf8Buffer());
|
||||
@@ -227,6 +227,7 @@ Run the desired operation for this AES context. Will return a :ref:`PackedByteAr
|
||||
\ **Note:** The size of ``src`` must be a multiple of 16. Apply some padding if needed.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
197
classes/class_aimmodifier3d.rst
Normal file
197
classes/class_aimmodifier3d.rst
Normal file
@@ -0,0 +1,197 @@
|
||||
: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/AimModifier3D.xml.
|
||||
|
||||
.. _class_AimModifier3D:
|
||||
|
||||
AimModifier3D
|
||||
=============
|
||||
|
||||
**Inherits:** :ref:`BoneConstraint3D<class_BoneConstraint3D>` **<** :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
The **AimModifier3D** rotates a bone to look at a reference bone.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
This is a simple version of :ref:`LookAtModifier3D<class_LookAtModifier3D>` that only allows bone to the reference without advanced options such as angle limitation or time-based interpolation.
|
||||
|
||||
The feature is simplified, but instead it is implemented with smooth tracking without euler, see :ref:`set_use_euler()<class_AimModifier3D_method_set_use_euler>`.
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------+------------------------------------------------------------------+-------+
|
||||
| :ref:`int<class_int>` | :ref:`setting_count<class_AimModifier3D_property_setting_count>` | ``0`` |
|
||||
+-----------------------+------------------------------------------------------------------+-------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` | :ref:`get_forward_axis<class_AimModifier3D_method_get_forward_axis>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Axis<enum_Vector3_Axis>` | :ref:`get_primary_rotation_axis<class_AimModifier3D_method_get_primary_rotation_axis>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_using_euler<class_AimModifier3D_method_is_using_euler>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_using_secondary_rotation<class_AimModifier3D_method_is_using_secondary_rotation>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_forward_axis<class_AimModifier3D_method_set_forward_axis>`\ (\ index\: :ref:`int<class_int>`, axis\: :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>`\ ) |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_primary_rotation_axis<class_AimModifier3D_method_set_primary_rotation_axis>`\ (\ index\: :ref:`int<class_int>`, axis\: :ref:`Axis<enum_Vector3_Axis>`\ ) |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_use_euler<class_AimModifier3D_method_set_use_euler>`\ (\ index\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_use_secondary_rotation<class_AimModifier3D_method_set_use_secondary_rotation>`\ (\ index\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_AimModifier3D_property_setting_count:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`int<class_int>` **setting_count** = ``0`` :ref:`🔗<class_AimModifier3D_property_setting_count>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_setting_count**\ (\ value\: :ref:`int<class_int>`\ )
|
||||
- :ref:`int<class_int>` **get_setting_count**\ (\ )
|
||||
|
||||
The number of settings in the modifier.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_AimModifier3D_method_get_forward_axis:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **get_forward_axis**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_AimModifier3D_method_get_forward_axis>`
|
||||
|
||||
Returns the forward axis of the bone.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AimModifier3D_method_get_primary_rotation_axis:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Axis<enum_Vector3_Axis>` **get_primary_rotation_axis**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_AimModifier3D_method_get_primary_rotation_axis>`
|
||||
|
||||
Returns the axis of the first rotation. It is enabled only if :ref:`is_using_euler()<class_AimModifier3D_method_is_using_euler>` is ``true``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AimModifier3D_method_is_using_euler:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_using_euler**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_AimModifier3D_method_is_using_euler>`
|
||||
|
||||
Returns ``true`` if it provides rotation with using euler.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AimModifier3D_method_is_using_secondary_rotation:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_using_secondary_rotation**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_AimModifier3D_method_is_using_secondary_rotation>`
|
||||
|
||||
Returns ``true`` if it provides rotation by two axes. It is enabled only if :ref:`is_using_euler()<class_AimModifier3D_method_is_using_euler>` is ``true``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AimModifier3D_method_set_forward_axis:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_forward_axis**\ (\ index\: :ref:`int<class_int>`, axis\: :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>`\ ) :ref:`🔗<class_AimModifier3D_method_set_forward_axis>`
|
||||
|
||||
Sets the forward axis of the bone.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AimModifier3D_method_set_primary_rotation_axis:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_primary_rotation_axis**\ (\ index\: :ref:`int<class_int>`, axis\: :ref:`Axis<enum_Vector3_Axis>`\ ) :ref:`🔗<class_AimModifier3D_method_set_primary_rotation_axis>`
|
||||
|
||||
Sets the axis of the first rotation. It is enabled only if :ref:`is_using_euler()<class_AimModifier3D_method_is_using_euler>` is ``true``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AimModifier3D_method_set_use_euler:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_use_euler**\ (\ index\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_AimModifier3D_method_set_use_euler>`
|
||||
|
||||
If sets ``enabled`` to ``true``, it provides rotation with using euler.
|
||||
|
||||
If sets ``enabled`` to ``false``, it provides rotation with using rotation by arc generated from the forward axis vector and the vector toward the reference.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AimModifier3D_method_set_use_secondary_rotation:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_use_secondary_rotation**\ (\ index\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_AimModifier3D_method_set_use_secondary_rotation>`
|
||||
|
||||
If sets ``enabled`` to ``true``, it provides rotation by two axes. It is enabled only if :ref:`is_using_euler()<class_AimModifier3D_method_is_using_euler>` is ``true``.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |void| replace:: :abbr:`void (No return value.)`
|
||||
@@ -23,6 +23,15 @@ An animatable 2D physics body. It can't be moved by external forces or contacts,
|
||||
|
||||
When **AnimatableBody2D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
|
||||
- :doc:`Physics introduction <../tutorials/physics/physics_introduction>`
|
||||
|
||||
- :doc:`Troubleshooting physics issues <../tutorials/physics/troubleshooting_physics_issues>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
@@ -58,6 +67,7 @@ Property Descriptions
|
||||
If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer<class_AnimationPlayer>`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody2D.move_and_collide()<class_PhysicsBody2D_method_move_and_collide>`.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -28,6 +28,10 @@ When **AnimatableBody3D** is moved, its linear and angular velocity are estimate
|
||||
Tutorials
|
||||
---------
|
||||
|
||||
- :doc:`Physics introduction <../tutorials/physics/physics_introduction>`
|
||||
|
||||
- :doc:`Troubleshooting physics issues <../tutorials/physics/troubleshooting_physics_issues>`
|
||||
|
||||
- `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/2747>`__
|
||||
|
||||
- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__
|
||||
@@ -69,6 +73,7 @@ Property Descriptions
|
||||
If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer<class_AnimationPlayer>`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody3D.move_and_collide()<class_PhysicsBody3D_method_move_and_collide>`.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -413,7 +413,7 @@ This method is a shorthand for :ref:`play()<class_AnimatedSprite2D_method_play>`
|
||||
|
||||
|void| **set_frame_and_progress**\ (\ frame\: :ref:`int<class_int>`, progress\: :ref:`float<class_float>`\ ) :ref:`🔗<class_AnimatedSprite2D_method_set_frame_and_progress>`
|
||||
|
||||
Sets :ref:`frame<class_AnimatedSprite2D_property_frame>` the :ref:`frame_progress<class_AnimatedSprite2D_property_frame_progress>` to the given values. Unlike setting :ref:`frame<class_AnimatedSprite2D_property_frame>`, this method does not reset the :ref:`frame_progress<class_AnimatedSprite2D_property_frame_progress>` to ``0.0`` implicitly.
|
||||
Sets :ref:`frame<class_AnimatedSprite2D_property_frame>` and :ref:`frame_progress<class_AnimatedSprite2D_property_frame_progress>` to the given values. Unlike setting :ref:`frame<class_AnimatedSprite2D_property_frame>`, this method does not reset the :ref:`frame_progress<class_AnimatedSprite2D_property_frame_progress>` to ``0.0`` implicitly.
|
||||
|
||||
\ **Example:** Change the animation while keeping the same :ref:`frame<class_AnimatedSprite2D_property_frame>` and :ref:`frame_progress<class_AnimatedSprite2D_property_frame_progress>`:
|
||||
|
||||
@@ -442,6 +442,7 @@ Sets :ref:`frame<class_AnimatedSprite2D_property_frame>` the :ref:`frame_progres
|
||||
Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()<class_AnimatedSprite2D_method_pause>`.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -333,7 +333,7 @@ This method is a shorthand for :ref:`play()<class_AnimatedSprite3D_method_play>`
|
||||
|
||||
|void| **set_frame_and_progress**\ (\ frame\: :ref:`int<class_int>`, progress\: :ref:`float<class_float>`\ ) :ref:`🔗<class_AnimatedSprite3D_method_set_frame_and_progress>`
|
||||
|
||||
Sets :ref:`frame<class_AnimatedSprite3D_property_frame>` the :ref:`frame_progress<class_AnimatedSprite3D_property_frame_progress>` to the given values. Unlike setting :ref:`frame<class_AnimatedSprite3D_property_frame>`, this method does not reset the :ref:`frame_progress<class_AnimatedSprite3D_property_frame_progress>` to ``0.0`` implicitly.
|
||||
Sets :ref:`frame<class_AnimatedSprite3D_property_frame>` and :ref:`frame_progress<class_AnimatedSprite3D_property_frame_progress>` to the given values. Unlike setting :ref:`frame<class_AnimatedSprite3D_property_frame>`, this method does not reset the :ref:`frame_progress<class_AnimatedSprite3D_property_frame_progress>` to ``0.0`` implicitly.
|
||||
|
||||
\ **Example:** Change the animation while keeping the same :ref:`frame<class_AnimatedSprite3D_property_frame>` and :ref:`frame_progress<class_AnimatedSprite3D_property_frame_progress>`:
|
||||
|
||||
@@ -362,6 +362,7 @@ Sets :ref:`frame<class_AnimatedSprite3D_property_frame>` the :ref:`frame_progres
|
||||
Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()<class_AnimatedSprite3D_method_pause>`.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -234,6 +234,7 @@ Assigns a :ref:`Texture2D<class_Texture2D>` to the given frame. Frame IDs start
|
||||
You can define any number of textures up to :ref:`MAX_FRAMES<class_AnimatedTexture_constant_MAX_FRAMES>`, but keep in mind that only frames from 0 to :ref:`frames<class_AnimatedTexture_property_frames>` - 1 will be part of the animation.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -67,15 +67,15 @@ Properties
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+------------------------------------------+--------------------------------------------------------------------+---------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`capture_included<class_Animation_property_capture_included>` | ``false`` |
|
||||
+------------------------------------------+--------------------------------------------------------------------+---------------+
|
||||
| :ref:`float<class_float>` | :ref:`length<class_Animation_property_length>` | ``1.0`` |
|
||||
+------------------------------------------+--------------------------------------------------------------------+---------------+
|
||||
| :ref:`LoopMode<enum_Animation_LoopMode>` | :ref:`loop_mode<class_Animation_property_loop_mode>` | ``0`` |
|
||||
+------------------------------------------+--------------------------------------------------------------------+---------------+
|
||||
| :ref:`float<class_float>` | :ref:`step<class_Animation_property_step>` | ``0.0333333`` |
|
||||
+------------------------------------------+--------------------------------------------------------------------+---------------+
|
||||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`capture_included<class_Animation_property_capture_included>` | ``false`` |
|
||||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||||
| :ref:`float<class_float>` | :ref:`length<class_Animation_property_length>` | ``1.0`` |
|
||||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||||
| :ref:`LoopMode<enum_Animation_LoopMode>` | :ref:`loop_mode<class_Animation_property_loop_mode>` | ``0`` |
|
||||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||||
| :ref:`float<class_float>` | :ref:`step<class_Animation_property_step>` | ``0.033333335`` |
|
||||
+------------------------------------------+--------------------------------------------------------------------+-----------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
@@ -575,7 +575,7 @@ The total length of the animation (in seconds).
|
||||
- |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode<enum_Animation_LoopMode>`\ )
|
||||
- :ref:`LoopMode<enum_Animation_LoopMode>` **get_loop_mode**\ (\ )
|
||||
|
||||
Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
|
||||
Determines the behavior of both ends of the animation timeline during animation playback. This indicates whether and how the animation should be restarted, and is also used to correctly interpolate animation cycles.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -585,7 +585,7 @@ Determines the behavior of both ends of the animation timeline during animation
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`float<class_float>` **step** = ``0.0333333`` :ref:`🔗<class_Animation_property_step>`
|
||||
:ref:`float<class_float>` **step** = ``0.033333335`` :ref:`🔗<class_Animation_property_step>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
@@ -1553,9 +1553,10 @@ A ``backward`` mainly affects the direction of key retrieval of the track with :
|
||||
|
||||
|void| **value_track_set_update_mode**\ (\ track_idx\: :ref:`int<class_int>`, mode\: :ref:`UpdateMode<enum_Animation_UpdateMode>`\ ) :ref:`🔗<class_Animation_method_value_track_set_update_mode>`
|
||||
|
||||
Sets the update mode (see :ref:`UpdateMode<enum_Animation_UpdateMode>`) of a value track.
|
||||
Sets the update mode of a value track.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -197,6 +197,7 @@ Removes the :ref:`Animation<class_Animation>` with the key ``name``.
|
||||
Changes the key of the :ref:`Animation<class_Animation>` associated with the key ``name`` to ``newname``.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -55,7 +55,7 @@ Properties
|
||||
+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`reset_on_save<class_AnimationMixer_property_reset_on_save>` | ``true`` |
|
||||
+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`root_motion_local<class_AnimationMixer_property_root_motion_local>` | |
|
||||
| :ref:`bool<class_bool>` | :ref:`root_motion_local<class_AnimationMixer_property_root_motion_local>` | ``false`` |
|
||||
+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` | ``NodePath("")`` |
|
||||
+-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+
|
||||
@@ -169,6 +169,8 @@ Notifies when an animation list is changed.
|
||||
|
||||
Notifies when an animation starts playing.
|
||||
|
||||
\ **Note:** This signal is not emitted if an animation is looping.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
@@ -480,7 +482,7 @@ This makes it more convenient to preview and edit animations in the editor, as c
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **root_motion_local** :ref:`🔗<class_AnimationMixer_property_root_motion_local>`
|
||||
:ref:`bool<class_bool>` **root_motion_local** = ``false`` :ref:`🔗<class_AnimationMixer_property_root_motion_local>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
@@ -704,7 +706,7 @@ The most basic example is applying position to :ref:`CharacterBody3D<class_Chara
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var current_rotation
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
current_rotation = get_quaternion()
|
||||
@@ -732,7 +734,7 @@ By using this in combination with :ref:`get_root_motion_rotation_accumulator()<c
|
||||
|
||||
|
||||
|
||||
If :ref:`root_motion_local<class_AnimationMixer_property_root_motion_local>` is ``true``, return the pre-multiplied translation value with the inverted rotation.
|
||||
If :ref:`root_motion_local<class_AnimationMixer_property_root_motion_local>` is ``true``, returns the pre-multiplied translation value with the inverted rotation.
|
||||
|
||||
In this case, the code can be written as follows:
|
||||
|
||||
@@ -773,7 +775,7 @@ For example, if an animation with only one key ``Vector3(0, 0, 0)`` is played in
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var prev_root_motion_position_accumulator
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
@@ -840,7 +842,7 @@ For example, if an animation with only one key ``Quaternion(0, 0, 0, 1)`` is pla
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var prev_root_motion_rotation_accumulator
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
@@ -878,7 +880,7 @@ The most basic example is applying scale to :ref:`CharacterBody3D<class_Characte
|
||||
|
||||
var current_scale = Vector3(1, 1, 1)
|
||||
var scale_accum = Vector3(1, 1, 1)
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
current_scale = get_scale()
|
||||
@@ -909,7 +911,7 @@ For example, if an animation with only one key ``Vector3(1, 1, 1)`` is played in
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var prev_root_motion_scale_accumulator
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
@@ -971,6 +973,7 @@ Removes the :ref:`AnimationLibrary<class_AnimationLibrary>` associated with the
|
||||
Moves the :ref:`AnimationLibrary<class_AnimationLibrary>` associated with the key ``name`` to the key ``newname``.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -31,9 +31,9 @@ You can access the time information as read-only parameter which is processed an
|
||||
|
||||
::
|
||||
|
||||
var current_length = $AnimationTree[parameters/AnimationNodeName/current_length]
|
||||
var current_position = $AnimationTree[parameters/AnimationNodeName/current_position]
|
||||
var current_delta = $AnimationTree[parameters/AnimationNodeName/current_delta]
|
||||
var current_length = $AnimationTree["parameters/AnimationNodeName/current_length"]
|
||||
var current_position = $AnimationTree["parameters/AnimationNodeName/current_position"]
|
||||
var current_delta = $AnimationTree["parameters/AnimationNodeName/current_delta"]
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
@@ -349,9 +349,9 @@ Adds an input to the animation node. This is only useful for animation nodes cre
|
||||
|
||||
|void| **blend_animation**\ (\ animation\: :ref:`StringName<class_StringName>`, time\: :ref:`float<class_float>`, delta\: :ref:`float<class_float>`, seeked\: :ref:`bool<class_bool>`, is_external_seeking\: :ref:`bool<class_bool>`, blend\: :ref:`float<class_float>`, looped_flag\: :ref:`LoopedFlag<enum_Animation_LoopedFlag>` = 0\ ) :ref:`🔗<class_AnimationNode_method_blend_animation>`
|
||||
|
||||
Blend an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer<class_AnimationPlayer>`). A ``time`` and ``delta`` may be passed, as well as whether ``seeked`` happened.
|
||||
Blends an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer<class_AnimationPlayer>`). A ``time`` and ``delta`` may be passed, as well as whether ``seeked`` happened.
|
||||
|
||||
A ``looped_flag`` is used by internal processing immediately after the loop. See also :ref:`LoopedFlag<enum_Animation_LoopedFlag>`.
|
||||
A ``looped_flag`` is used by internal processing immediately after the loop.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -363,7 +363,7 @@ A ``looped_flag`` is used by internal processing immediately after the loop. See
|
||||
|
||||
:ref:`float<class_float>` **blend_input**\ (\ input_index\: :ref:`int<class_int>`, time\: :ref:`float<class_float>`, seek\: :ref:`bool<class_bool>`, is_external_seeking\: :ref:`bool<class_bool>`, blend\: :ref:`float<class_float>`, filter\: :ref:`FilterAction<enum_AnimationNode_FilterAction>` = 0, sync\: :ref:`bool<class_bool>` = true, test_only\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_AnimationNode_method_blend_input>`
|
||||
|
||||
Blend an input. This is only useful for animation nodes created for an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed (see :ref:`FilterAction<enum_AnimationNode_FilterAction>` for options).
|
||||
Blends an input. This is only useful for animation nodes created for an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -512,6 +512,7 @@ Sets the name of the input at the given ``input`` index. If the setting fails, r
|
||||
Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -33,6 +33,7 @@ Tutorials
|
||||
- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -41,6 +41,7 @@ Tutorials
|
||||
- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -241,6 +241,7 @@ If :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_ti
|
||||
If ``true``, :ref:`AnimationNode<class_AnimationNode>` provides an animation based on the :ref:`Animation<class_Animation>` resource with some parameters adjusted.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -35,6 +35,7 @@ Tutorials
|
||||
- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -39,6 +39,7 @@ Tutorials
|
||||
- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -137,7 +137,7 @@ Property Descriptions
|
||||
- |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>`\ )
|
||||
- :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` **get_blend_mode**\ (\ )
|
||||
|
||||
Controls the interpolation between animations. See :ref:`BlendMode<enum_AnimationNodeBlendSpace1D_BlendMode>` constants.
|
||||
Controls the interpolation between animations.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -316,6 +316,7 @@ Changes the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at
|
||||
Updates the position of the point at index ``point`` on the blend axis.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -185,7 +185,7 @@ If ``true``, the blend space is triangulated automatically. The mesh updates eve
|
||||
- |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode<enum_AnimationNodeBlendSpace2D_BlendMode>`\ )
|
||||
- :ref:`BlendMode<enum_AnimationNodeBlendSpace2D_BlendMode>` **get_blend_mode**\ (\ )
|
||||
|
||||
Controls the interpolation between animations. See :ref:`BlendMode<enum_AnimationNodeBlendSpace2D_BlendMode>` constants.
|
||||
Controls the interpolation between animations.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -429,6 +429,7 @@ Changes the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at
|
||||
Updates the position of the point at index ``point`` in the blend space.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -50,25 +50,27 @@ Methods
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_node<class_AnimationNodeBlendTree_method_add_node>`\ (\ name\: :ref:`StringName<class_StringName>`, node\: :ref:`AnimationNode<class_AnimationNode>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`connect_node<class_AnimationNodeBlendTree_method_connect_node>`\ (\ input_node\: :ref:`StringName<class_StringName>`, input_index\: :ref:`int<class_int>`, output_node\: :ref:`StringName<class_StringName>`\ ) |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`disconnect_node<class_AnimationNodeBlendTree_method_disconnect_node>`\ (\ input_node\: :ref:`StringName<class_StringName>`, input_index\: :ref:`int<class_int>`\ ) |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationNode<class_AnimationNode>` | :ref:`get_node<class_AnimationNodeBlendTree_method_get_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`get_node_position<class_AnimationNodeBlendTree_method_get_node_position>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_node<class_AnimationNodeBlendTree_method_has_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`remove_node<class_AnimationNodeBlendTree_method_remove_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`rename_node<class_AnimationNodeBlendTree_method_rename_node>`\ (\ name\: :ref:`StringName<class_StringName>`, new_name\: :ref:`StringName<class_StringName>`\ ) |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_node_position<class_AnimationNodeBlendTree_method_set_node_position>`\ (\ name\: :ref:`StringName<class_StringName>`, position\: :ref:`Vector2<class_Vector2>`\ ) |
|
||||
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_node<class_AnimationNodeBlendTree_method_add_node>`\ (\ name\: :ref:`StringName<class_StringName>`, node\: :ref:`AnimationNode<class_AnimationNode>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`connect_node<class_AnimationNodeBlendTree_method_connect_node>`\ (\ input_node\: :ref:`StringName<class_StringName>`, input_index\: :ref:`int<class_int>`, output_node\: :ref:`StringName<class_StringName>`\ ) |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`disconnect_node<class_AnimationNodeBlendTree_method_disconnect_node>`\ (\ input_node\: :ref:`StringName<class_StringName>`, input_index\: :ref:`int<class_int>`\ ) |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationNode<class_AnimationNode>` | :ref:`get_node<class_AnimationNodeBlendTree_method_get_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_node_list<class_AnimationNodeBlendTree_method_get_node_list>`\ (\ ) |const| |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`get_node_position<class_AnimationNodeBlendTree_method_get_node_position>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_node<class_AnimationNodeBlendTree_method_has_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`remove_node<class_AnimationNodeBlendTree_method_remove_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`rename_node<class_AnimationNodeBlendTree_method_rename_node>`\ (\ name\: :ref:`StringName<class_StringName>`, new_name\: :ref:`StringName<class_StringName>`\ ) |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_node_position<class_AnimationNodeBlendTree_method_set_node_position>`\ (\ name\: :ref:`StringName<class_StringName>`, position\: :ref:`Vector2<class_Vector2>`\ ) |
|
||||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -223,6 +225,18 @@ Returns the sub animation node with the specified ``name``.
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNodeBlendTree_method_get_node_list:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_node_list**\ (\ ) |const| :ref:`🔗<class_AnimationNodeBlendTree_method_get_node_list>`
|
||||
|
||||
Returns a list containing the names of all sub animation nodes in this blend tree.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNodeBlendTree_method_get_node_position:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -280,6 +294,7 @@ Changes the name of a sub animation node.
|
||||
Modifies the position of a sub animation node.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -31,13 +31,13 @@ Methods
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`_process_animation_node<class_AnimationNodeExtension_private_method__process_animation_node>`\ (\ playback_info\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`, test_only\: :ref:`bool<class_bool>`\ ) |virtual| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_remaining_time<class_AnimationNodeExtension_method_get_remaining_time>`\ (\ node_info\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, break_loop\: :ref:`bool<class_bool>`\ ) |static| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_looping<class_AnimationNodeExtension_method_is_looping>`\ (\ node_info\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |static| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`_process_animation_node<class_AnimationNodeExtension_private_method__process_animation_node>`\ (\ playback_info\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`, test_only\: :ref:`bool<class_bool>`\ ) |virtual| |required| |
|
||||
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_remaining_time<class_AnimationNodeExtension_method_get_remaining_time>`\ (\ node_info\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, break_loop\: :ref:`bool<class_bool>`\ ) |static| |
|
||||
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_looping<class_AnimationNodeExtension_method_is_looping>`\ (\ node_info\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |static| |
|
||||
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -52,7 +52,7 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedFloat32Array<class_PackedFloat32Array>` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`, test_only\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_AnimationNodeExtension_private_method__process_animation_node>`
|
||||
:ref:`PackedFloat32Array<class_PackedFloat32Array>` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`, test_only\: :ref:`bool<class_bool>`\ ) |virtual| |required| :ref:`🔗<class_AnimationNodeExtension_private_method__process_animation_node>`
|
||||
|
||||
A version of the :ref:`AnimationNode._process()<class_AnimationNode_private_method__process>` method that is meant to be overridden by custom nodes. It returns a :ref:`PackedFloat32Array<class_PackedFloat32Array>` with the processed animation data.
|
||||
|
||||
@@ -85,6 +85,7 @@ Returns the animation's remaining time for the given node info. For looping anim
|
||||
Returns ``true`` if the animation for the given ``node_info`` is looping.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -32,22 +32,22 @@ After setting the request and changing the animation playback, the one-shot node
|
||||
animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)
|
||||
# Alternative syntax (same result as above).
|
||||
animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE
|
||||
|
||||
|
||||
# Abort child animation connected to "shot" port.
|
||||
animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT)
|
||||
# Alternative syntax (same result as above).
|
||||
animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT
|
||||
|
||||
|
||||
# Abort child animation with fading out connected to "shot" port.
|
||||
animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT)
|
||||
# Alternative syntax (same result as above).
|
||||
animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT
|
||||
|
||||
|
||||
# Get current state (read-only).
|
||||
animation_tree.get("parameters/OneShot/active")
|
||||
# Alternative syntax (same result as above).
|
||||
animation_tree["parameters/OneShot/active"]
|
||||
|
||||
|
||||
# Get current internal state (read-only).
|
||||
animation_tree.get("parameters/OneShot/internal_active")
|
||||
# Alternative syntax (same result as above).
|
||||
@@ -57,16 +57,16 @@ After setting the request and changing the animation playback, the one-shot node
|
||||
|
||||
// Play child animation connected to "shot" port.
|
||||
animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Fire);
|
||||
|
||||
|
||||
// Abort child animation connected to "shot" port.
|
||||
animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Abort);
|
||||
|
||||
|
||||
// Abort child animation with fading out connected to "shot" port.
|
||||
animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.FadeOut);
|
||||
|
||||
|
||||
// Get current state (read-only).
|
||||
animationTree.Get("parameters/OneShot/active");
|
||||
|
||||
|
||||
// Get current internal state (read-only).
|
||||
animationTree.Get("parameters/OneShot/internal_active");
|
||||
|
||||
@@ -291,7 +291,7 @@ Determines how cross-fading between animations is eased. If empty, the transitio
|
||||
|
||||
The fade-in duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation.
|
||||
|
||||
\ **Note:** **AnimationNodeOneShot** transitions the current state after the end of the fading. When :ref:`AnimationNodeOutput<class_AnimationNodeOutput>` is considered as the most upstream, so the :ref:`fadein_time<class_AnimationNodeOneShot_property_fadein_time>` is scaled depending on the downstream delta. For example, if this value is set to ``1.0`` and a :ref:`AnimationNodeTimeScale<class_AnimationNodeTimeScale>` with a value of ``2.0`` is chained downstream, the actual processing time will be 0.5 second.
|
||||
\ **Note:** **AnimationNodeOneShot** transitions the current state after the fading has finished.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -327,7 +327,7 @@ Determines how cross-fading between animations is eased. If empty, the transitio
|
||||
|
||||
The fade-out duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation.
|
||||
|
||||
\ **Note:** **AnimationNodeOneShot** transitions the current state after the end of the fading. When :ref:`AnimationNodeOutput<class_AnimationNodeOutput>` is considered as the most upstream, so the :ref:`fadeout_time<class_AnimationNodeOneShot_property_fadeout_time>` is scaled depending on the downstream delta. For example, if this value is set to ``1.0`` and an :ref:`AnimationNodeTimeScale<class_AnimationNodeTimeScale>` with a value of ``2.0`` is chained downstream, the actual processing time will be 0.5 second.
|
||||
\ **Note:** **AnimationNodeOneShot** transitions the current state after the fading has finished.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -347,6 +347,7 @@ The fade-out duration. For example, setting this to ``1.0`` for a 5 second lengt
|
||||
The blend type.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -33,6 +33,7 @@ Tutorials
|
||||
- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -76,6 +76,8 @@ Methods
|
||||
+---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationNode<class_AnimationNode>` | :ref:`get_node<class_AnimationNodeStateMachine_method_get_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||||
+---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_node_list<class_AnimationNodeStateMachine_method_get_node_list>`\ (\ ) |const| |
|
||||
+---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`get_node_name<class_AnimationNodeStateMachine_method_get_node_name>`\ (\ node\: :ref:`AnimationNode<class_AnimationNode>`\ ) |const| |
|
||||
+---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`get_node_position<class_AnimationNodeStateMachine_method_get_node_position>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||||
@@ -261,6 +263,18 @@ Returns the animation node with the given name.
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNodeStateMachine_method_get_node_list:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_node_list**\ (\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_get_node_list>`
|
||||
|
||||
Returns a list containing the names of all animation nodes in this state machine.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNodeStateMachine_method_get_node_name:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -438,6 +452,7 @@ Sets the draw offset of the graph. Used for display in the editor.
|
||||
Sets the animation node's coordinates. Used for display in the editor.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -91,6 +91,37 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
.. _class_AnimationNodeStateMachinePlayback_signal_state_finished:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**state_finished**\ (\ state\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationNodeStateMachinePlayback_signal_state_finished>`
|
||||
|
||||
Emitted when the ``state`` finishes playback. If ``state`` is a state machine set to grouped mode, its signals are passed through with its name prefixed.
|
||||
|
||||
If there is a crossfade, this will be fired when the influence of the :ref:`get_fading_from_node()<class_AnimationNodeStateMachinePlayback_method_get_fading_from_node>` animation is no longer present.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNodeStateMachinePlayback_signal_state_started:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**state_started**\ (\ state\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationNodeStateMachinePlayback_signal_state_started>`
|
||||
|
||||
Emitted when the ``state`` starts playback. If ``state`` is a state machine set to grouped mode, its signals are passed through with its name prefixed.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
@@ -221,6 +252,7 @@ If the path does not connect from the current state, the animation will play aft
|
||||
If ``reset_on_teleport`` is ``true``, the animation is played from the beginning when the travel cause a teleportation.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -322,6 +322,7 @@ The time to cross-fade between this state and the next.
|
||||
\ **Note:** :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>` transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When :ref:`AnimationNodeOutput<class_AnimationNodeOutput>` is considered as the most upstream, so the :ref:`xfade_time<class_AnimationNodeStateMachineTransition_property_xfade_time>` is not scaled depending on the downstream delta. See also :ref:`AnimationNodeOneShot.fadeout_time<class_AnimationNodeOneShot_property_fadeout_time>`.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -35,6 +35,7 @@ Tutorials
|
||||
- :doc:`AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -67,6 +67,7 @@ If ``false``, the blended animations' frame are stopped when the blend value is
|
||||
If ``true``, forcing the blended animations to advance frame.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -31,6 +31,7 @@ Tutorials
|
||||
- `3D Platformer Demo <https://godotengine.org/asset-library/asset/2748>`__
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -32,7 +32,7 @@ After setting the time and changing the animation playback, the time seek node a
|
||||
animation_tree.set("parameters/TimeSeek/seek_request", 0.0)
|
||||
# Alternative syntax (same result as above).
|
||||
animation_tree["parameters/TimeSeek/seek_request"] = 0.0
|
||||
|
||||
|
||||
# Play child animation from 12 second timestamp.
|
||||
animation_tree.set("parameters/TimeSeek/seek_request", 12.0)
|
||||
# Alternative syntax (same result as above).
|
||||
@@ -42,7 +42,7 @@ After setting the time and changing the animation playback, the time seek node a
|
||||
|
||||
// Play child animation from the start.
|
||||
animationTree.Set("parameters/TimeSeek/seek_request", 0.0);
|
||||
|
||||
|
||||
// Play child animation from 12 second timestamp.
|
||||
animationTree.Set("parameters/TimeSeek/seek_request", 12.0);
|
||||
|
||||
@@ -90,6 +90,7 @@ Property Descriptions
|
||||
If ``true``, some processes are executed to handle keys between seeks, such as calculating root motion and finding the nearest discrete key.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -34,12 +34,12 @@ After setting the request and changing the animation playback, the transition no
|
||||
animation_tree.set("parameters/Transition/transition_request", "state_2")
|
||||
# Alternative syntax (same result as above).
|
||||
animation_tree["parameters/Transition/transition_request"] = "state_2"
|
||||
|
||||
|
||||
# Get current state name (read-only).
|
||||
animation_tree.get("parameters/Transition/current_state")
|
||||
# Alternative syntax (same result as above).
|
||||
animation_tree["parameters/Transition/current_state"]
|
||||
|
||||
|
||||
# Get current state index (read-only).
|
||||
animation_tree.get("parameters/Transition/current_index")
|
||||
# Alternative syntax (same result as above).
|
||||
@@ -49,10 +49,10 @@ After setting the request and changing the animation playback, the transition no
|
||||
|
||||
// Play child animation connected to "state_2" port.
|
||||
animationTree.Set("parameters/Transition/transition_request", "state_2");
|
||||
|
||||
|
||||
// Get current state name (read-only).
|
||||
animationTree.Get("parameters/Transition/current_state");
|
||||
|
||||
|
||||
// Get current state index (read-only).
|
||||
animationTree.Get("parameters/Transition/current_index");
|
||||
|
||||
@@ -262,6 +262,7 @@ If ``true``, breaks the loop at the end of the loop cycle for transition, even i
|
||||
If ``true``, the destination animation is restarted when the animation transitions.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -622,7 +622,7 @@ Returns the start time of the section currently being played.
|
||||
|
||||
:ref:`bool<class_bool>` **has_section**\ (\ ) |const| :ref:`🔗<class_AnimationPlayer_method_has_section>`
|
||||
|
||||
Returns ``true`` if an animation is currently playing with section.
|
||||
Returns ``true`` if an animation is currently playing with a section.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -787,7 +787,7 @@ Queues an animation for playback once the current animation and all previously q
|
||||
|
||||
|void| **reset_section**\ (\ ) :ref:`🔗<class_AnimationPlayer_method_reset_section>`
|
||||
|
||||
Resets the current section if section is set.
|
||||
Resets the current section. Does nothing if a section has not been set.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -902,6 +902,7 @@ If ``keep_state`` is ``true``, the animation state is not updated visually.
|
||||
\ **Note:** The method / audio / animation playback tracks will not be processed by this method.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -33,6 +33,7 @@ Tutorials
|
||||
- :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -218,6 +218,7 @@ Returns the process notification in which to update animations.
|
||||
Sets the process notification in which to update animations.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -155,7 +155,7 @@ Emitted when a :ref:`Shape2D<class_Shape2D>` of the received ``area`` enters a s
|
||||
|
||||
var other_shape_owner = area.shape_find_owner(area_shape_index)
|
||||
var other_shape_node = area.shape_owner_get_owner(other_shape_owner)
|
||||
|
||||
|
||||
var local_shape_owner = shape_find_owner(local_shape_index)
|
||||
var local_shape_node = shape_owner_get_owner(local_shape_owner)
|
||||
|
||||
@@ -222,7 +222,7 @@ Emitted when a :ref:`Shape2D<class_Shape2D>` of the received ``body`` enters a s
|
||||
|
||||
var body_shape_owner = body.shape_find_owner(body_shape_index)
|
||||
var body_shape_node = body.shape_owner_get_owner(body_shape_owner)
|
||||
|
||||
|
||||
var local_shape_owner = shape_find_owner(local_shape_index)
|
||||
var local_shape_node = shape_owner_get_owner(local_shape_owner)
|
||||
|
||||
@@ -336,7 +336,7 @@ See :ref:`ProjectSettings.physics/2d/default_angular_damp<class_ProjectSettings_
|
||||
- |void| **set_angular_damp_space_override_mode**\ (\ value\: :ref:`SpaceOverride<enum_Area2D_SpaceOverride>`\ )
|
||||
- :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` **get_angular_damp_space_override_mode**\ (\ )
|
||||
|
||||
Override mode for angular damping calculations within this area. See :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` for possible values.
|
||||
Override mode for angular damping calculations within this area.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -474,7 +474,7 @@ The above is true only when the unit distance is a positive number. When this is
|
||||
- |void| **set_gravity_space_override_mode**\ (\ value\: :ref:`SpaceOverride<enum_Area2D_SpaceOverride>`\ )
|
||||
- :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` **get_gravity_space_override_mode**\ (\ )
|
||||
|
||||
Override mode for gravity calculations within this area. See :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` for possible values.
|
||||
Override mode for gravity calculations within this area.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -510,7 +510,7 @@ See :ref:`ProjectSettings.physics/2d/default_linear_damp<class_ProjectSettings_p
|
||||
- |void| **set_linear_damp_space_override_mode**\ (\ value\: :ref:`SpaceOverride<enum_Area2D_SpaceOverride>`\ )
|
||||
- :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` **get_linear_damp_space_override_mode**\ (\ )
|
||||
|
||||
Override mode for linear damping calculations within this area. See :ref:`SpaceOverride<enum_Area2D_SpaceOverride>` for possible values.
|
||||
Override mode for linear damping calculations within this area.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -655,6 +655,7 @@ Returns ``true`` if the given physics body intersects or overlaps this **Area2D*
|
||||
The ``body`` argument can either be a :ref:`PhysicsBody2D<class_PhysicsBody2D>` or a :ref:`TileMap<class_TileMap>` instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -169,7 +169,7 @@ Emitted when a :ref:`Shape3D<class_Shape3D>` of the received ``area`` enters a s
|
||||
|
||||
var other_shape_owner = area.shape_find_owner(area_shape_index)
|
||||
var other_shape_node = area.shape_owner_get_owner(other_shape_owner)
|
||||
|
||||
|
||||
var local_shape_owner = shape_find_owner(local_shape_index)
|
||||
var local_shape_node = shape_owner_get_owner(local_shape_owner)
|
||||
|
||||
@@ -236,7 +236,7 @@ Emitted when a :ref:`Shape3D<class_Shape3D>` of the received ``body`` enters a s
|
||||
|
||||
var body_shape_owner = body.shape_find_owner(body_shape_index)
|
||||
var body_shape_node = body.shape_owner_get_owner(body_shape_owner)
|
||||
|
||||
|
||||
var local_shape_owner = shape_find_owner(local_shape_index)
|
||||
var local_shape_node = shape_owner_get_owner(local_shape_owner)
|
||||
|
||||
@@ -350,7 +350,7 @@ See :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_
|
||||
- |void| **set_angular_damp_space_override_mode**\ (\ value\: :ref:`SpaceOverride<enum_Area3D_SpaceOverride>`\ )
|
||||
- :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **get_angular_damp_space_override_mode**\ (\ )
|
||||
|
||||
Override mode for angular damping calculations within this area. See :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` for possible values.
|
||||
Override mode for angular damping calculations within this area.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -488,7 +488,7 @@ The above is true only when the unit distance is a positive number. When this is
|
||||
- |void| **set_gravity_space_override_mode**\ (\ value\: :ref:`SpaceOverride<enum_Area3D_SpaceOverride>`\ )
|
||||
- :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **get_gravity_space_override_mode**\ (\ )
|
||||
|
||||
Override mode for gravity calculations within this area. See :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` for possible values.
|
||||
Override mode for gravity calculations within this area.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -524,7 +524,7 @@ See :ref:`ProjectSettings.physics/3d/default_linear_damp<class_ProjectSettings_p
|
||||
- |void| **set_linear_damp_space_override_mode**\ (\ value\: :ref:`SpaceOverride<enum_Area3D_SpaceOverride>`\ )
|
||||
- :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` **get_linear_damp_space_override_mode**\ (\ )
|
||||
|
||||
Override mode for linear damping calculations within this area. See :ref:`SpaceOverride<enum_Area3D_SpaceOverride>` for possible values.
|
||||
Override mode for linear damping calculations within this area.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -794,6 +794,7 @@ Returns ``true`` if the given physics body intersects or overlaps this **Area3D*
|
||||
The ``body`` argument can either be a :ref:`PhysicsBody3D<class_PhysicsBody3D>` or a :ref:`GridMap<class_GridMap>` instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -28,7 +28,7 @@ An array data structure that can contain a sequence of elements of any :ref:`Var
|
||||
print(array[0]) # Prints "First"
|
||||
print(array[2]) # Prints 3
|
||||
print(array[-1]) # Prints "Last"
|
||||
|
||||
|
||||
array[1] = "Second"
|
||||
print(array[1]) # Prints "Second"
|
||||
print(array[-3]) # Prints "Second"
|
||||
@@ -39,7 +39,7 @@ An array data structure that can contain a sequence of elements of any :ref:`Var
|
||||
GD.Print(array[0]); // Prints "First"
|
||||
GD.Print(array[2]); // Prints 3
|
||||
GD.Print(array[^1]); // Prints "Last"
|
||||
|
||||
|
||||
array[1] = "Second";
|
||||
GD.Print(array[1]); // Prints "Second"
|
||||
GD.Print(array[^3]); // Prints "Second"
|
||||
@@ -123,6 +123,8 @@ Methods
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`duplicate<class_Array_method_duplicate>`\ (\ deep\: :ref:`bool<class_bool>` = false\ ) |const| |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`duplicate_deep<class_Array_method_duplicate_deep>`\ (\ deep_subresources_mode\: :ref:`int<class_int>` = 1\ ) |const| |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`erase<class_Array_method_erase>`\ (\ value\: :ref:`Variant<class_Variant>`\ ) |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`fill<class_Array_method_fill>`\ (\ value\: :ref:`Variant<class_Variant>`\ ) |
|
||||
@@ -267,10 +269,10 @@ If ``type`` is not :ref:`@GlobalScope.TYPE_OBJECT<class_@GlobalScope_constant_TY
|
||||
|
||||
class_name Sword
|
||||
extends Node
|
||||
|
||||
|
||||
class Stats:
|
||||
pass
|
||||
|
||||
|
||||
func _ready():
|
||||
var a = Array([], TYPE_INT, "", null) # Array[int]
|
||||
var b = Array([], TYPE_OBJECT, "Node", null) # Array[Node]
|
||||
@@ -285,7 +287,7 @@ In GDScript, this constructor is usually not necessary, as it is possible to cre
|
||||
|
||||
var numbers: Array[float] = []
|
||||
var children: Array[Node] = [$Node, $Sprite2D, $RigidBody3D]
|
||||
|
||||
|
||||
var integers: Array[int] = [0.2, 4.5, -2.0]
|
||||
print(integers) # Prints [0, 4, -2]
|
||||
|
||||
@@ -425,13 +427,13 @@ The ``method`` should take one :ref:`Variant<class_Variant>` parameter (the curr
|
||||
|
||||
func greater_than_5(number):
|
||||
return number > 5
|
||||
|
||||
|
||||
func _ready():
|
||||
print([6, 10, 6].all(greater_than_5)) # Prints true (3/3 elements evaluate to true).
|
||||
print([4, 10, 4].all(greater_than_5)) # Prints false (1/3 elements evaluate to true).
|
||||
print([4, 4, 4].all(greater_than_5)) # Prints false (0/3 elements evaluate to true).
|
||||
print([].all(greater_than_5)) # Prints true (0/0 elements evaluate to true).
|
||||
|
||||
|
||||
# Same as the first line above, but using a lambda function.
|
||||
print([6, 10, 6].all(func(element): return element > 5)) # Prints true
|
||||
|
||||
@@ -441,7 +443,7 @@ The ``method`` should take one :ref:`Variant<class_Variant>` parameter (the curr
|
||||
{
|
||||
return number > 5;
|
||||
}
|
||||
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
// Prints True (3/3 elements evaluate to true).
|
||||
@@ -452,7 +454,7 @@ The ``method`` should take one :ref:`Variant<class_Variant>` parameter (the curr
|
||||
GD.Print(new Godot.Collections.Array>int< { 4, 4, 4 }.All(GreaterThan5));
|
||||
// Prints True (0/0 elements evaluate to true).
|
||||
GD.Print(new Godot.Collections.Array>int< { }.All(GreaterThan5));
|
||||
|
||||
|
||||
// Same as the first line above, but using a lambda function.
|
||||
GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => element > 5)); // Prints True
|
||||
}
|
||||
@@ -483,13 +485,13 @@ The ``method`` should take one :ref:`Variant<class_Variant>` parameter (the curr
|
||||
|
||||
func greater_than_5(number):
|
||||
return number > 5
|
||||
|
||||
|
||||
func _ready():
|
||||
print([6, 10, 6].any(greater_than_5)) # Prints true (3 elements evaluate to true).
|
||||
print([4, 10, 4].any(greater_than_5)) # Prints true (1 elements evaluate to true).
|
||||
print([4, 4, 4].any(greater_than_5)) # Prints false (0 elements evaluate to true).
|
||||
print([].any(greater_than_5)) # Prints false (0 elements evaluate to true).
|
||||
|
||||
|
||||
# Same as the first line above, but using a lambda function.
|
||||
print([6, 10, 6].any(func(number): return number > 5)) # Prints true
|
||||
|
||||
@@ -574,10 +576,10 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e
|
||||
|
||||
var numbers = [2, 4, 8, 10]
|
||||
var idx = numbers.bsearch(7)
|
||||
|
||||
|
||||
numbers.insert(idx, 7)
|
||||
print(numbers) # Prints [2, 4, 7, 8, 10]
|
||||
|
||||
|
||||
var fruits = ["Apple", "Lemon", "Lemon", "Orange"]
|
||||
print(fruits.bsearch("Lemon", true)) # Prints 1, points at the first "Lemon".
|
||||
print(fruits.bsearch("Lemon", false)) # Prints 3, points at "Orange".
|
||||
@@ -606,18 +608,18 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e
|
||||
if a[1] < b[1]:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func _ready():
|
||||
var my_items = [["Tomato", 2], ["Kiwi", 5], ["Rice", 9]]
|
||||
|
||||
|
||||
var apple = ["Apple", 5]
|
||||
# "Apple" is inserted before "Kiwi".
|
||||
my_items.insert(my_items.bsearch_custom(apple, sort_by_amount, true), apple)
|
||||
|
||||
|
||||
var banana = ["Banana", 5]
|
||||
# "Banana" is inserted after "Kiwi".
|
||||
my_items.insert(my_items.bsearch_custom(banana, sort_by_amount, false), banana)
|
||||
|
||||
|
||||
# Prints [["Tomato", 2], ["Apple", 5], ["Kiwi", 5], ["Banana", 5], ["Rice", 9]]
|
||||
print(my_items)
|
||||
|
||||
@@ -661,9 +663,23 @@ To count how many elements in an array satisfy a condition, see :ref:`reduce()<c
|
||||
|
||||
Returns a new copy of the array.
|
||||
|
||||
By default, a **shallow** copy is returned: all nested **Array** and :ref:`Dictionary<class_Dictionary>` elements are shared with the original array. Modifying them in one array will also affect them in the other.
|
||||
By default, a **shallow** copy is returned: all nested **Array**, :ref:`Dictionary<class_Dictionary>`, and :ref:`Resource<class_Resource>` elements are shared with the original array. Modifying any of those in one array will also affect them in the other.
|
||||
|
||||
If ``deep`` is ``true``, a **deep** copy is returned: all nested arrays and dictionaries are also duplicated (recursively).
|
||||
If ``deep`` is ``true``, a **deep** copy is returned: all nested arrays and dictionaries are also duplicated (recursively). Any :ref:`Resource<class_Resource>` is still shared with the original array, though.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_duplicate_deep:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **duplicate_deep**\ (\ deep_subresources_mode\: :ref:`int<class_int>` = 1\ ) |const| :ref:`🔗<class_Array_method_duplicate_deep>`
|
||||
|
||||
Duplicates this array, deeply, like :ref:`duplicate()<class_Array_method_duplicate>`\ ``(true)``, with extra control over how subresources are handled.
|
||||
|
||||
\ ``deep_subresources_mode`` must be one of the values from :ref:`DeepDuplicateMode<enum_Resource_DeepDuplicateMode>`. By default, only internal resources will be duplicated (recursively).
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -734,10 +750,10 @@ The ``method`` receives one of the array elements as an argument, and should ret
|
||||
|
||||
func is_even(number):
|
||||
return number % 2 == 0
|
||||
|
||||
|
||||
func _ready():
|
||||
print([1, 4, 5, 8].filter(is_even)) # Prints [4, 8]
|
||||
|
||||
|
||||
# Same as above, but using a lambda function.
|
||||
print([1, 4, 5, 8].filter(func(number): return number % 2 == 0))
|
||||
|
||||
@@ -782,7 +798,7 @@ Returns the index of the **first** element in the array that causes ``method`` t
|
||||
|
||||
func is_even(number):
|
||||
return number % 2 == 0
|
||||
|
||||
|
||||
func _ready():
|
||||
print([1, 3, 4, 7].find_custom(is_even.bind())) # Prints 2
|
||||
|
||||
@@ -812,7 +828,9 @@ Returns the first element of the array. If the array is empty, fails and returns
|
||||
|
||||
:ref:`Variant<class_Variant>` **get**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Array_method_get>`
|
||||
|
||||
Returns the element at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``).
|
||||
Returns the element at the given ``index`` in the array. If ``index`` out-of-bounds or negative, this method fails and returns ``null``.
|
||||
|
||||
This method is similar (but not identical) to the ``[]`` operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -916,7 +934,7 @@ Returns a hashed 32-bit integer value representing the array and its contents.
|
||||
|
||||
:ref:`int<class_int>` **insert**\ (\ position\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Array_method_insert>`
|
||||
|
||||
Inserts a new element (``value``) at a given index (``position``) in the array. ``position`` should be between ``0`` and the array's :ref:`size()<class_Array_method_size>`.
|
||||
Inserts a new element (``value``) at a given index (``position``) in the array. ``position`` should be between ``0`` and the array's :ref:`size()<class_Array_method_size>`. If negative, ``position`` is considered relative to the end of the array.
|
||||
|
||||
Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or one of the other :ref:`Error<enum_@GlobalScope_Error>` constants if this method fails.
|
||||
|
||||
@@ -1011,10 +1029,10 @@ The ``method`` should take one :ref:`Variant<class_Variant>` parameter (the curr
|
||||
|
||||
func double(number):
|
||||
return number * 2
|
||||
|
||||
|
||||
func _ready():
|
||||
print([1, 2, 3].map(double)) # Prints [2, 4, 6]
|
||||
|
||||
|
||||
# Same as above, but using a lambda function.
|
||||
print([1, 2, 3].map(func(element): return element * 2))
|
||||
|
||||
@@ -1159,11 +1177,11 @@ The ``method`` takes two arguments: the current value of ``accum`` and the curre
|
||||
|
||||
func sum(accum, number):
|
||||
return accum + number
|
||||
|
||||
|
||||
func _ready():
|
||||
print([1, 2, 3].reduce(sum, 0)) # Prints 6
|
||||
print([1, 2, 3].reduce(sum, 10)) # Prints 16
|
||||
|
||||
|
||||
# Same as above, but using a lambda function.
|
||||
print([1, 2, 3].reduce(func(accum, number): return accum + number, 10))
|
||||
|
||||
@@ -1173,10 +1191,10 @@ If :ref:`max()<class_Array_method_max>` is not desirable, this method may also b
|
||||
|
||||
func _ready():
|
||||
var arr = [Vector2i(5, 0), Vector2i(3, 4), Vector2i(1, 2)]
|
||||
|
||||
|
||||
var longest_vec = arr.reduce(func(max, vec): return vec if is_length_greater(vec, max) else max)
|
||||
print(longest_vec) # Prints (3, 4)
|
||||
|
||||
|
||||
func is_length_greater(a, b):
|
||||
return a.length() > b.length()
|
||||
|
||||
@@ -1186,7 +1204,7 @@ This method can also be used to count how many elements in an array satisfy a ce
|
||||
|
||||
func is_even(number):
|
||||
return number % 2 == 0
|
||||
|
||||
|
||||
func _ready():
|
||||
var arr = [1, 2, 3, 4, 5]
|
||||
# If the current element is even, increment count, otherwise leave count the same.
|
||||
@@ -1205,7 +1223,7 @@ See also :ref:`map()<class_Array_method_map>`, :ref:`filter()<class_Array_method
|
||||
|
||||
|void| **remove_at**\ (\ position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Array_method_remove_at>`
|
||||
|
||||
Removes the element from the array at the given index (``position``). If the index is out of bounds, this method fails.
|
||||
Removes the element from the array at the given index (``position``). If the index is out of bounds, this method fails. If the index is negative, ``position`` is considered relative to the end of the array.
|
||||
|
||||
If you need to return the removed element, use :ref:`pop_at()<class_Array_method_pop_at>`. To remove an element by value, use :ref:`erase()<class_Array_method_erase>` instead.
|
||||
|
||||
@@ -1225,7 +1243,7 @@ If you need to return the removed element, use :ref:`pop_at()<class_Array_method
|
||||
|
||||
Sets the array's number of elements to ``size``. If ``size`` is smaller than the array's current size, the elements at the end are removed. If ``size`` is greater, new default elements (usually ``null``) are added, depending on the array's type.
|
||||
|
||||
Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or one of the other :ref:`Error<enum_@GlobalScope_Error>` constants if this method fails.
|
||||
Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or one of the following :ref:`Error<enum_@GlobalScope_Error>` constants if this method fails: :ref:`@GlobalScope.ERR_LOCKED<class_@GlobalScope_constant_ERR_LOCKED>` if the array is read-only, :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` if the size is negative, or :ref:`@GlobalScope.ERR_OUT_OF_MEMORY<class_@GlobalScope_constant_ERR_OUT_OF_MEMORY>` if allocations fail. Use :ref:`size()<class_Array_method_size>` to find the actual size of the array after resize.
|
||||
|
||||
\ **Note:** Calling this method once and assigning the new values is faster than calling :ref:`append()<class_Array_method_append>` for every new element.
|
||||
|
||||
@@ -1319,16 +1337,16 @@ If either ``begin`` or ``end`` are negative, their value is relative to the end
|
||||
|
||||
If ``step`` is negative, this method iterates through the array in reverse, returning a slice ordered backwards. For this to work, ``begin`` must be greater than ``end``.
|
||||
|
||||
If ``deep`` is ``true``, all nested **Array** and :ref:`Dictionary<class_Dictionary>` elements in the slice are duplicated from the original, recursively. See also :ref:`duplicate()<class_Array_method_duplicate>`).
|
||||
If ``deep`` is ``true``, all nested **Array** and :ref:`Dictionary<class_Dictionary>` elements in the slice are duplicated from the original, recursively. See also :ref:`duplicate()<class_Array_method_duplicate>`.
|
||||
|
||||
::
|
||||
|
||||
var letters = ["A", "B", "C", "D", "E", "F"]
|
||||
|
||||
|
||||
print(letters.slice(0, 2)) # Prints ["A", "B"]
|
||||
print(letters.slice(2, -2)) # Prints ["C", "D"]
|
||||
print(letters.slice(-2, 6)) # Prints ["E", "F"]
|
||||
|
||||
|
||||
print(letters.slice(0, 6, 2)) # Prints ["A", "C", "E"]
|
||||
print(letters.slice(4, 1, -1)) # Prints ["E", "D", "C"]
|
||||
|
||||
@@ -1383,12 +1401,12 @@ Sorts the array using a custom :ref:`Callable<class_Callable>`.
|
||||
if a[1] < b[1]:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func _ready():
|
||||
var my_items = [["Tomato", 5], ["Apple", 9], ["Rice", 4]]
|
||||
my_items.sort_custom(sort_ascending)
|
||||
print(my_items) # Prints [["Rice", 4], ["Tomato", 5], ["Apple", 9]]
|
||||
|
||||
|
||||
# Sort descending, using a lambda function.
|
||||
my_items.sort_custom(func(a, b): return a[1] > b[1])
|
||||
print(my_items) # Prints [["Apple", 9], ["Tomato", 5], ["Rice", 4]]
|
||||
@@ -1537,6 +1555,7 @@ If all searched elements are equal, returns ``true`` if this array's size is gre
|
||||
Returns the :ref:`Variant<class_Variant>` element at the specified ``index``. Arrays start at index 0. If ``index`` is greater or equal to ``0``, the element is fetched starting from the beginning of the array. If ``index`` is a negative value, the element is fetched starting from the end. Accessing an array out-of-bounds will cause a run-time error, pausing the project execution if run from the editor.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -32,13 +32,13 @@ The most basic example is the creation of a single triangle:
|
||||
vertices.push_back(Vector3(0, 1, 0))
|
||||
vertices.push_back(Vector3(1, 0, 0))
|
||||
vertices.push_back(Vector3(0, 0, 1))
|
||||
|
||||
|
||||
# Initialize the ArrayMesh.
|
||||
var arr_mesh = ArrayMesh.new()
|
||||
var arrays = []
|
||||
arrays.resize(Mesh.ARRAY_MAX)
|
||||
arrays[Mesh.ARRAY_VERTEX] = vertices
|
||||
|
||||
|
||||
# Create the Mesh.
|
||||
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays)
|
||||
var m = MeshInstance3D.new()
|
||||
@@ -52,13 +52,13 @@ The most basic example is the creation of a single triangle:
|
||||
new Vector3(1, 0, 0),
|
||||
new Vector3(0, 0, 1),
|
||||
];
|
||||
|
||||
|
||||
// Initialize the ArrayMesh.
|
||||
var arrMesh = new ArrayMesh();
|
||||
Godot.Collections.Array arrays = [];
|
||||
arrays.Resize((int)Mesh.ArrayType.Max);
|
||||
arrays[(int)Mesh.ArrayType.Vertex] = vertices;
|
||||
|
||||
|
||||
// Create the Mesh.
|
||||
arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);
|
||||
var m = new MeshInstance3D();
|
||||
@@ -165,7 +165,7 @@ Property Descriptions
|
||||
- |void| **set_blend_shape_mode**\ (\ value\: :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>`\ )
|
||||
- :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>` **get_blend_shape_mode**\ (\ )
|
||||
|
||||
Sets the blend shape mode to one of :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>`.
|
||||
The blend shape mode.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -436,7 +436,7 @@ Sets a name for a given surface.
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -450,7 +450,7 @@ Sets a name for a given surface.
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -464,9 +464,10 @@ Sets a name for a given surface.
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -121,6 +121,7 @@ Method Descriptions
|
||||
Sets :ref:`indices<class_ArrayOccluder3D_property_indices>` and :ref:`vertices<class_ArrayOccluder3D_property_vertices>`, while updating the final occluder only once after both values are set.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -203,6 +203,7 @@ The aspect ratio to enforce on child controls. This is the width divided by the
|
||||
The stretch mode used to align child controls.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -23,6 +23,25 @@ An implementation of the A\* algorithm, used to find the shortest path between t
|
||||
|
||||
See :ref:`AStar3D<class_AStar3D>` for a more thorough explanation on how to use this class. **AStar2D** is a wrapper for :ref:`AStar3D<class_AStar3D>` that enforces 2D coordinates.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
|
||||
- `Grid-based Navigation with AStarGrid2D Demo <https://godotengine.org/asset-library/asset/2723>`__
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------+--------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`bool<class_bool>` | :ref:`neighbor_filter_enabled<class_AStar2D_property_neighbor_filter_enabled>` | ``false`` |
|
||||
+-------------------------+--------------------------------------------------------------------------------+-----------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
@@ -36,6 +55,8 @@ Methods
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_estimate_cost<class_AStar2D_private_method__estimate_cost>`\ (\ from_id\: :ref:`int<class_int>`, end_id\: :ref:`int<class_int>`\ ) |virtual| |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_filter_neighbor<class_AStar2D_private_method__filter_neighbor>`\ (\ from_id\: :ref:`int<class_int>`, neighbor_id\: :ref:`int<class_int>`\ ) |virtual| |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_point<class_AStar2D_method_add_point>`\ (\ id\: :ref:`int<class_int>`, position\: :ref:`Vector2<class_Vector2>`, weight_scale\: :ref:`float<class_float>` = 1.0\ ) |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`are_points_connected<class_AStar2D_method_are_points_connected>`\ (\ id\: :ref:`int<class_int>`, to_id\: :ref:`int<class_int>`, bidirectional\: :ref:`bool<class_bool>` = true\ ) |const| |
|
||||
@@ -89,6 +110,28 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_AStar2D_property_neighbor_filter_enabled:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **neighbor_filter_enabled** = ``false`` :ref:`🔗<class_AStar2D_property_neighbor_filter_enabled>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_neighbor_filter_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **is_neighbor_filter_enabled**\ (\ )
|
||||
|
||||
If ``true`` enables the filtering of neighbors via :ref:`_filter_neighbor()<class_AStar2D_private_method__filter_neighbor>`.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
@@ -120,6 +163,20 @@ Note that this function is hidden in the default **AStar2D** class.
|
||||
|
||||
----
|
||||
|
||||
.. _class_AStar2D_private_method__filter_neighbor:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **_filter_neighbor**\ (\ from_id\: :ref:`int<class_int>`, neighbor_id\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_AStar2D_private_method__filter_neighbor>`
|
||||
|
||||
Called when neighboring enters processing and if :ref:`neighbor_filter_enabled<class_AStar2D_property_neighbor_filter_enabled>` is ``true``. If ``true`` is returned the point will not be processed.
|
||||
|
||||
Note that this function is hidden in the default **AStar2D** class.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AStar2D_method_add_point:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -301,12 +358,12 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``,
|
||||
astar.add_point(2, Vector2(0, 1), 1) # Default weight is 1
|
||||
astar.add_point(3, Vector2(1, 1))
|
||||
astar.add_point(4, Vector2(2, 0))
|
||||
|
||||
|
||||
astar.connect_points(1, 2, false)
|
||||
astar.connect_points(2, 3, false)
|
||||
astar.connect_points(4, 3, false)
|
||||
astar.connect_points(1, 4, false)
|
||||
|
||||
|
||||
var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]
|
||||
|
||||
.. code-tab:: csharp
|
||||
@@ -316,7 +373,7 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``,
|
||||
astar.AddPoint(2, new Vector2(0, 1), 1); // Default weight is 1
|
||||
astar.AddPoint(3, new Vector2(1, 1));
|
||||
astar.AddPoint(4, new Vector2(2, 0));
|
||||
|
||||
|
||||
astar.ConnectPoints(1, 2, false);
|
||||
astar.ConnectPoints(2, 3, false);
|
||||
astar.ConnectPoints(4, 3, false);
|
||||
@@ -361,10 +418,10 @@ Returns an array with the IDs of the points that form the connection with the gi
|
||||
astar.add_point(2, Vector2(0, 1))
|
||||
astar.add_point(3, Vector2(1, 1))
|
||||
astar.add_point(4, Vector2(2, 0))
|
||||
|
||||
|
||||
astar.connect_points(1, 2, true)
|
||||
astar.connect_points(1, 3, true)
|
||||
|
||||
|
||||
var neighbors = astar.get_point_connections(1) # Returns [2, 3]
|
||||
|
||||
.. code-tab:: csharp
|
||||
@@ -374,10 +431,10 @@ Returns an array with the IDs of the points that form the connection with the gi
|
||||
astar.AddPoint(2, new Vector2(0, 1));
|
||||
astar.AddPoint(3, new Vector2(1, 1));
|
||||
astar.AddPoint(4, new Vector2(2, 0));
|
||||
|
||||
|
||||
astar.ConnectPoints(1, 2, true);
|
||||
astar.ConnectPoints(1, 3, true);
|
||||
|
||||
|
||||
long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3]
|
||||
|
||||
|
||||
@@ -420,7 +477,7 @@ Returns an array with the points that are in the path found by AStar2D between t
|
||||
|
||||
If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached.
|
||||
|
||||
\ **Note:** This method is not thread-safe. If called from a :ref:`Thread<class_Thread>`, it will return an empty array and will print an error message.
|
||||
\ **Note:** This method is not thread-safe; it can only be used from a single :ref:`Thread<class_Thread>` at a given time. Consider using :ref:`Mutex<class_Mutex>` to ensure exclusive access to one thread to avoid race conditions.
|
||||
|
||||
Additionally, when ``allow_partial_path`` is ``true`` and ``to_id`` is disabled the search may take an unusually long time to finish.
|
||||
|
||||
@@ -494,7 +551,7 @@ Removes the point associated with the given ``id`` from the points pool.
|
||||
|
||||
|void| **reserve_space**\ (\ num_nodes\: :ref:`int<class_int>`\ ) :ref:`🔗<class_AStar2D_method_reserve_space>`
|
||||
|
||||
Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. The new capacity must be greater or equal to the old capacity.
|
||||
Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -533,6 +590,7 @@ Sets the ``position`` for the point with the given ``id``.
|
||||
Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()<class_AStar2D_private_method__compute_cost>` when determining the overall cost of traveling across a segment from a neighboring point to this point.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -34,12 +34,12 @@ It is also possible to use non-Euclidean distances. To do so, create a script th
|
||||
|
||||
class_name MyAStar3D
|
||||
extends AStar3D
|
||||
|
||||
|
||||
func _compute_cost(u, v):
|
||||
var u_pos = get_point_position(u)
|
||||
var v_pos = get_point_position(v)
|
||||
return abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - v_pos.z)
|
||||
|
||||
|
||||
func _estimate_cost(u, v):
|
||||
var u_pos = get_point_position(u)
|
||||
var v_pos = get_point_position(v)
|
||||
@@ -48,7 +48,7 @@ It is also possible to use non-Euclidean distances. To do so, create a script th
|
||||
.. code-tab:: csharp
|
||||
|
||||
using Godot;
|
||||
|
||||
|
||||
[GlobalClass]
|
||||
public partial class MyAStar3D : AStar3D
|
||||
{
|
||||
@@ -56,10 +56,10 @@ It is also possible to use non-Euclidean distances. To do so, create a script th
|
||||
{
|
||||
Vector3 fromPoint = GetPointPosition(fromId);
|
||||
Vector3 toPoint = GetPointPosition(toId);
|
||||
|
||||
|
||||
return Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z);
|
||||
}
|
||||
|
||||
|
||||
public override float _EstimateCost(long fromId, long toId)
|
||||
{
|
||||
Vector3 fromPoint = GetPointPosition(fromId);
|
||||
@@ -76,6 +76,18 @@ If the default :ref:`_estimate_cost()<class_AStar3D_private_method__estimate_cos
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------+--------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`bool<class_bool>` | :ref:`neighbor_filter_enabled<class_AStar3D_property_neighbor_filter_enabled>` | ``false`` |
|
||||
+-------------------------+--------------------------------------------------------------------------------+-----------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
@@ -87,6 +99,8 @@ Methods
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_estimate_cost<class_AStar3D_private_method__estimate_cost>`\ (\ from_id\: :ref:`int<class_int>`, end_id\: :ref:`int<class_int>`\ ) |virtual| |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_filter_neighbor<class_AStar3D_private_method__filter_neighbor>`\ (\ from_id\: :ref:`int<class_int>`, neighbor_id\: :ref:`int<class_int>`\ ) |virtual| |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_point<class_AStar3D_method_add_point>`\ (\ id\: :ref:`int<class_int>`, position\: :ref:`Vector3<class_Vector3>`, weight_scale\: :ref:`float<class_float>` = 1.0\ ) |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`are_points_connected<class_AStar3D_method_are_points_connected>`\ (\ id\: :ref:`int<class_int>`, to_id\: :ref:`int<class_int>`, bidirectional\: :ref:`bool<class_bool>` = true\ ) |const| |
|
||||
@@ -140,6 +154,28 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_AStar3D_property_neighbor_filter_enabled:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **neighbor_filter_enabled** = ``false`` :ref:`🔗<class_AStar3D_property_neighbor_filter_enabled>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_neighbor_filter_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **is_neighbor_filter_enabled**\ (\ )
|
||||
|
||||
If ``true`` enables the filtering of neighbors via :ref:`_filter_neighbor()<class_AStar3D_private_method__filter_neighbor>`.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
@@ -171,6 +207,20 @@ Note that this function is hidden in the default **AStar3D** class.
|
||||
|
||||
----
|
||||
|
||||
.. _class_AStar3D_private_method__filter_neighbor:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **_filter_neighbor**\ (\ from_id\: :ref:`int<class_int>`, neighbor_id\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_AStar3D_private_method__filter_neighbor>`
|
||||
|
||||
Called when neighboring point enters processing and if :ref:`neighbor_filter_enabled<class_AStar3D_property_neighbor_filter_enabled>` is ``true``. If ``true`` is returned the point will not be processed.
|
||||
|
||||
Note that this function is hidden in the default **AStar3D** class.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AStar3D_method_add_point:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -352,12 +402,12 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``,
|
||||
astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1
|
||||
astar.add_point(3, Vector3(1, 1, 0))
|
||||
astar.add_point(4, Vector3(2, 0, 0))
|
||||
|
||||
|
||||
astar.connect_points(1, 2, false)
|
||||
astar.connect_points(2, 3, false)
|
||||
astar.connect_points(4, 3, false)
|
||||
astar.connect_points(1, 4, false)
|
||||
|
||||
|
||||
var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]
|
||||
|
||||
.. code-tab:: csharp
|
||||
@@ -411,10 +461,10 @@ Returns an array with the IDs of the points that form the connection with the gi
|
||||
astar.add_point(2, Vector3(0, 1, 0))
|
||||
astar.add_point(3, Vector3(1, 1, 0))
|
||||
astar.add_point(4, Vector3(2, 0, 0))
|
||||
|
||||
|
||||
astar.connect_points(1, 2, true)
|
||||
astar.connect_points(1, 3, true)
|
||||
|
||||
|
||||
var neighbors = astar.get_point_connections(1) # Returns [2, 3]
|
||||
|
||||
.. code-tab:: csharp
|
||||
@@ -426,7 +476,7 @@ Returns an array with the IDs of the points that form the connection with the gi
|
||||
astar.AddPoint(4, new Vector3(2, 0, 0));
|
||||
astar.ConnectPoints(1, 2, true);
|
||||
astar.ConnectPoints(1, 3, true);
|
||||
|
||||
|
||||
long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3]
|
||||
|
||||
|
||||
@@ -469,7 +519,7 @@ Returns an array with the points that are in the path found by AStar3D between t
|
||||
|
||||
If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached.
|
||||
|
||||
\ **Note:** This method is not thread-safe. If called from a :ref:`Thread<class_Thread>`, it will return an empty array and will print an error message.
|
||||
\ **Note:** This method is not thread-safe; it can only be used from a single :ref:`Thread<class_Thread>` at a given time. Consider using :ref:`Mutex<class_Mutex>` to ensure exclusive access to one thread to avoid race conditions.
|
||||
|
||||
Additionally, when ``allow_partial_path`` is ``true`` and ``to_id`` is disabled the search may take an unusually long time to finish.
|
||||
|
||||
@@ -543,7 +593,7 @@ Removes the point associated with the given ``id`` from the points pool.
|
||||
|
||||
|void| **reserve_space**\ (\ num_nodes\: :ref:`int<class_int>`\ ) :ref:`🔗<class_AStar3D_method_reserve_space>`
|
||||
|
||||
Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity.
|
||||
Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -582,6 +632,7 @@ Sets the ``position`` for the point with the given ``id``.
|
||||
Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()<class_AStar3D_private_method__compute_cost>` when determining the overall cost of traveling across a segment from a neighboring point to this point.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -48,6 +48,13 @@ To use **AStarGrid2D**, you only need to set the :ref:`region<class_AStarGrid2D_
|
||||
|
||||
To remove a point from the pathfinding grid, it must be set as "solid" with :ref:`set_point_solid()<class_AStarGrid2D_method_set_point_solid>`.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
|
||||
- `Grid-based Navigation with AStarGrid2D Demo <https://godotengine.org/asset-library/asset/2723>`__
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
@@ -573,7 +580,7 @@ Returns an array with the points that are in the path found by **AStarGrid2D** b
|
||||
|
||||
If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached.
|
||||
|
||||
\ **Note:** This method is not thread-safe. If called from a :ref:`Thread<class_Thread>`, it will return an empty array and will print an error message.
|
||||
\ **Note:** This method is not thread-safe; it can only be used from a single :ref:`Thread<class_Thread>` at a given time. Consider using :ref:`Mutex<class_Mutex>` to ensure exclusive access to one thread to avoid race conditions.
|
||||
|
||||
Additionally, when ``allow_partial_path`` is ``true`` and ``to_id`` is solid the search may take an unusually long time to finish.
|
||||
|
||||
@@ -692,6 +699,7 @@ Updates the internal state of the grid according to the parameters to prepare it
|
||||
\ **Note:** All point data (solidity and weight scale) will be cleared.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -119,6 +119,7 @@ The margin around the :ref:`region<class_AtlasTexture_property_region>`. Useful
|
||||
The region used to draw the :ref:`atlas<class_AtlasTexture_property_atlas>`. If either dimension of the region's size is ``0``, the value from :ref:`atlas<class_AtlasTexture_property_atlas>` size will be used for that axis instead.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -22,6 +22,7 @@ Description
|
||||
Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See :ref:`AudioServer<class_AudioServer>` for usage.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -42,9 +42,9 @@ Methods
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------+
|
||||
| :ref:`AudioEffectInstance<class_AudioEffectInstance>` | :ref:`_instantiate<class_AudioEffect_private_method__instantiate>`\ (\ ) |virtual| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------+
|
||||
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
| :ref:`AudioEffectInstance<class_AudioEffectInstance>` | :ref:`_instantiate<class_AudioEffect_private_method__instantiate>`\ (\ ) |virtual| |required| |
|
||||
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -59,25 +59,26 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`AudioEffectInstance<class_AudioEffectInstance>` **_instantiate**\ (\ ) |virtual| :ref:`🔗<class_AudioEffect_private_method__instantiate>`
|
||||
:ref:`AudioEffectInstance<class_AudioEffectInstance>` **_instantiate**\ (\ ) |virtual| |required| :ref:`🔗<class_AudioEffect_private_method__instantiate>`
|
||||
|
||||
Override this method to customize the :ref:`AudioEffectInstance<class_AudioEffectInstance>` created when this effect is applied on a bus in the editor's Audio panel, or through :ref:`AudioServer.add_bus_effect()<class_AudioServer_method_add_bus_effect>`.
|
||||
|
||||
::
|
||||
|
||||
extends AudioEffect
|
||||
|
||||
|
||||
@export var strength = 4.0
|
||||
|
||||
|
||||
func _instantiate():
|
||||
var effect = CustomAudioEffectInstance.new()
|
||||
effect.base = self
|
||||
|
||||
|
||||
return effect
|
||||
|
||||
\ **Note:** It is recommended to keep a reference to the original **AudioEffect** in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -84,6 +84,7 @@ Amount of amplification as a linear value.
|
||||
\ **Note:** This member modifies :ref:`volume_db<class_AudioEffectAmplify_property_volume_db>` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()<class_@GlobalScope_method_db_to_linear>` on :ref:`volume_db<class_AudioEffectAmplify_property_volume_db>`. Setting this member is equivalent to setting :ref:`volume_db<class_AudioEffectAmplify_property_volume_db>` to the result of :ref:`@GlobalScope.linear_to_db()<class_@GlobalScope_method_linear_to_db>` on a value.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -29,6 +29,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -29,6 +29,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -186,6 +186,7 @@ Returns the number of frames available to read using :ref:`get_buffer()<class_Au
|
||||
Returns the number of audio frames inserted from the audio bus.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -607,7 +607,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -621,7 +621,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -635,7 +635,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -649,7 +649,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -663,7 +663,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -677,7 +677,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -691,7 +691,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -705,7 +705,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -719,7 +719,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -733,7 +733,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -747,7 +747,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -761,9 +761,10 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -25,7 +25,7 @@ Dynamic range compressor reduces the level of the sound when the amplitude goes
|
||||
|
||||
Compressor has many uses in the mix:
|
||||
|
||||
- In the Master bus to compress the whole output (although an :ref:`AudioEffectLimiter<class_AudioEffectLimiter>` is probably better).
|
||||
- In the Master bus to compress the whole output (although an :ref:`AudioEffectHardLimiter<class_AudioEffectHardLimiter>` is probably better).
|
||||
|
||||
- In voice channels to ensure they sound as balanced as possible.
|
||||
|
||||
@@ -189,6 +189,7 @@ Reduce the sound level using another audio bus for threshold detection.
|
||||
The level above which compression is applied to the audio. Value can range from -60 to 0.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -293,6 +293,7 @@ Sound level for the second tap.
|
||||
Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right).
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -83,7 +83,7 @@ Digital distortion effect which cuts off peaks at the top and bottom of the wave
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this enum. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
|
||||
|
||||
@@ -202,6 +202,7 @@ Increases or decreases the volume after the effect, in decibels. Value can range
|
||||
Increases or decreases the volume before the effect, in decibels. Value can range from -60 to 60.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -90,6 +90,7 @@ Returns the band's gain at the specified index, in dB.
|
||||
Sets band's gain at the specified index, in dB.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -53,6 +53,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -75,6 +75,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -45,6 +45,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -169,6 +169,7 @@ Gain amount of the frequencies after the filter.
|
||||
Amount of boost in the frequency range near the cutoff frequency.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -103,6 +103,7 @@ Gain to apply before limiting, in decibels.
|
||||
Time it takes in seconds for the gain reduction to fully release.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -29,6 +29,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -29,6 +29,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -38,11 +38,11 @@ Methods
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`_process<class_AudioEffectInstance_private_method__process>`\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int<class_int>`\ ) |virtual| |
|
||||
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_process_silence<class_AudioEffectInstance_private_method__process_silence>`\ (\ ) |virtual| |const| |
|
||||
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`_process<class_AudioEffectInstance_private_method__process>`\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int<class_int>`\ ) |virtual| |required| |
|
||||
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_process_silence<class_AudioEffectInstance_private_method__process_silence>`\ (\ ) |virtual| |const| |
|
||||
+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -57,7 +57,7 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_AudioEffectInstance_private_method__process>`
|
||||
|void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int<class_int>`\ ) |virtual| |required| :ref:`🔗<class_AudioEffectInstance_private_method__process>`
|
||||
|
||||
Called by the :ref:`AudioServer<class_AudioServer>` to process this effect. When :ref:`_process_silence()<class_AudioEffectInstance_private_method__process_silence>` is not overridden or it returns ``false``, this method is called only when the bus is active.
|
||||
|
||||
@@ -78,6 +78,7 @@ Override this method to customize the processing behavior of this effect instanc
|
||||
Should return ``true`` to force the :ref:`AudioServer<class_AudioServer>` to always call :ref:`_process()<class_AudioEffectInstance_private_method__process>`, even if the bus has been muted or cannot otherwise be heard.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -106,7 +106,7 @@ Applies a gain to the limited waves, in decibels. Value can range from 0 to 6.
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this property. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -126,6 +126,7 @@ Applies a gain to the limited waves, in decibels. Value can range from 0 to 6.
|
||||
Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -29,6 +29,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -29,6 +29,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -29,6 +29,7 @@ Tutorials
|
||||
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -63,6 +63,7 @@ Property Descriptions
|
||||
Pan position. Value can range from -1 (fully left) to 1 (fully right).
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -70,7 +70,7 @@ Property Descriptions
|
||||
- |void| **set_depth**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_depth**\ (\ )
|
||||
|
||||
Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4.
|
||||
Determines how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from ``0.1`` to ``4.0``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -141,6 +141,7 @@ Determines the minimum frequency affected by the LFO modulations, in Hz. Value c
|
||||
Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -166,6 +166,7 @@ The oversampling factor to use. Higher values result in better quality, but are
|
||||
The pitch scale to use. ``1.0`` is the default pitch and plays sounds unaffected. :ref:`pitch_scale<class_AudioEffectPitchShift_property_pitch_scale>` can range from ``0.0`` (infinitely low pitch, inaudible) to ``16`` (16 times higher than the initial pitch).
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -84,7 +84,7 @@ Property Descriptions
|
||||
- |void| **set_format**\ (\ value\: :ref:`Format<enum_AudioStreamWAV_Format>`\ )
|
||||
- :ref:`Format<enum_AudioStreamWAV_Format>` **get_format**\ (\ )
|
||||
|
||||
Specifies the format in which the sample will be recorded. See :ref:`Format<enum_AudioStreamWAV_Format>` for available formats.
|
||||
Specifies the format in which the sample will be recorded.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -128,6 +128,7 @@ Returns whether the recording is active or not.
|
||||
If ``true``, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -198,6 +198,7 @@ Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Val
|
||||
Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -167,9 +167,10 @@ The size of the `Fast Fourier transform <https://en.wikipedia.org/wiki/Fast_Four
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
There is currently no description for this property. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -90,9 +90,10 @@ Method Descriptions
|
||||
|
||||
Returns the magnitude of the frequencies from ``from_hz`` to ``to_hz`` in linear energy as a Vector2. The ``x`` component of the return value represents the left stereo channel, and ``y`` represents the right channel.
|
||||
|
||||
\ ``mode`` determines how the frequency range will be processed. See :ref:`MagnitudeMode<enum_AudioEffectSpectrumAnalyzerInstance_MagnitudeMode>`.
|
||||
\ ``mode`` determines how the frequency range will be processed.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||||
.. |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.)`
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user