diff --git a/tutorials/physics/physics_introduction.rst b/tutorials/physics/physics_introduction.rst index 0d4a3c041..cc9ce2704 100644 --- a/tutorials/physics/physics_introduction.rst +++ b/tutorials/physics/physics_introduction.rst @@ -180,6 +180,12 @@ would be as follows:: # (2^(1-1)) + (2^(3-1)) + (2^(4-1)) = 1 + 4 + 8 = 13 pow(2, 1-1) + pow(2, 3-1) + pow(2, 4-1) +Export annotations can be used to export bitmasks in the editor with a user-friendly GUI:: + + @export_flags_2d_physics var layers_2d_physics + +Additional export annotations are available for render and navigation layers, in both 2D and 3D. See :ref:`doc_gdscript_exports_exporting_bit_flags`. + Area2D ------ diff --git a/tutorials/scripting/gdscript/gdscript_exports.rst b/tutorials/scripting/gdscript/gdscript_exports.rst index 4e5a414df..e08cb4937 100644 --- a/tutorials/scripting/gdscript/gdscript_exports.rst +++ b/tutorials/scripting/gdscript/gdscript_exports.rst @@ -298,6 +298,8 @@ It must be noted that even if the script is not being run while in the editor, the exported properties are still editable. This can be used in conjunction with a :ref:`script in "tool" mode `. +.. _doc_gdscript_exports_exporting_bit_flags: + Exporting bit flags -------------------