diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/AStarGrid2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/AnimationLibrary.xml | 2 | ||||
-rw-r--r-- | doc/classes/AnimationPlayer.xml | 4 | ||||
-rw-r--r-- | doc/classes/Basis.xml | 2 | ||||
-rw-r--r-- | doc/classes/CollisionShape2D.xml | 4 | ||||
-rw-r--r-- | doc/classes/Control.xml | 2 | ||||
-rw-r--r-- | doc/classes/CubemapArray.xml | 2 | ||||
-rw-r--r-- | doc/classes/DirAccess.xml | 6 | ||||
-rw-r--r-- | doc/classes/EditorSettings.xml | 4 | ||||
-rw-r--r-- | doc/classes/Engine.xml | 13 | ||||
-rw-r--r-- | doc/classes/FileAccess.xml | 18 | ||||
-rw-r--r-- | doc/classes/ImageFormatLoaderExtension.xml | 4 | ||||
-rw-r--r-- | doc/classes/InputEventWithModifiers.xml | 2 | ||||
-rw-r--r-- | doc/classes/MenuButton.xml | 6 | ||||
-rw-r--r-- | doc/classes/MultiplayerAPIExtension.xml | 2 | ||||
-rw-r--r-- | doc/classes/NavigationPathQueryParameters2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/NavigationPathQueryParameters3D.xml | 2 | ||||
-rw-r--r-- | doc/classes/OS.xml | 16 | ||||
-rw-r--r-- | doc/classes/OptionButton.xml | 6 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 19 |
20 files changed, 71 insertions, 47 deletions
diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml index 331862ebfa..8dde3748d7 100644 --- a/doc/classes/AStarGrid2D.xml +++ b/doc/classes/AStarGrid2D.xml @@ -53,7 +53,7 @@ </description> </method> <method name="get_id_path"> - <return type="PackedVector2Array" /> + <return type="Vector2i[]" /> <param index="0" name="from_id" type="Vector2i" /> <param index="1" name="to_id" type="Vector2i" /> <description> diff --git a/doc/classes/AnimationLibrary.xml b/doc/classes/AnimationLibrary.xml index 75fe393dbb..769b338063 100644 --- a/doc/classes/AnimationLibrary.xml +++ b/doc/classes/AnimationLibrary.xml @@ -15,7 +15,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="animation" type="Animation" /> <description> - Adds the [param animation] to the library, accesible by the key [param name]. + Adds the [param animation] to the library, accessible by the key [param name]. </description> </method> <method name="get_animation" qualifiers="const"> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index d24703203b..b7ac1ff7f8 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -5,7 +5,7 @@ </brief_description> <description> An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of [AnimationLibrary] resources and custom blend times between animation transitions. - Some methods and properties use a single key to refence an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation whithin the library, for example [code]"movement/run"[/code]. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library. + Some methods and properties use a single key to reference an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation within the library, for example [code]"movement/run"[/code]. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library. [AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween], but it requires doing everything by code. Updating the target properties of animations occurs at process time. </description> @@ -170,7 +170,7 @@ <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes the [AnimationLibrary] assosiated with the key [param name]. + Removes the [AnimationLibrary] associated with the key [param name]. </description> </method> <method name="rename_animation_library"> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index d62f704528..6d9b679fbc 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -83,7 +83,7 @@ <return type="Vector3" /> <param index="0" name="order" type="int" default="2" /> <description> - Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). + Returns the basis's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, by default it uses the YXZ convention: when decomposing, first Z, then X, and Y last. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles. </description> </method> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index fa8fbd0d3e..75530370bc 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -14,6 +14,10 @@ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <members> + <member name="debug_color" type="Color" setter="set_debug_color" getter="get_debug_color" default="Color(0, 0, 0, 1)"> + The collision shape debug color. + [b]Note:[/b] The default value is [member ProjectSettings.debug/shapes/collision/shape_color]. The [code]Color(0, 0, 0, 1)[/code] value documented here is a placeholder, and not the actual default debug color. + </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred]. </member> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 7b9bf0fa37..bf449ade77 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -528,7 +528,7 @@ <param index="0" name="at_position" type="Vector2" default="Vector2(0, 0)" /> <description> Returns the tooltip text [param at_position] in local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns [member tooltip_text]. - [b]Note:[/b] This method can be overriden to customise its behaviour. If this method returns an empty [String], no tooltip is displayed. + [b]Note:[/b] This method can be overridden to customise its behaviour. If this method returns an empty [String], no tooltip is displayed. </description> </method> <method name="grab_click_focus"> diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml index 7f001155e4..07e401a13d 100644 --- a/doc/classes/CubemapArray.xml +++ b/doc/classes/CubemapArray.xml @@ -5,7 +5,7 @@ </brief_description> <description> [CubemapArray]s are made of an array of [Cubemap]s. Accordingly, like [Cubemap]s they are made of multiple textures the amount of which must be divisible by 6 (one image for each face of the cube). The primary benefit of [CubemapArray]s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple [Cubemap]s into a shader using a single [CubemapArray]. - Generally, [CubemapArray]s provide a more efficent way for storing multiple [Cubemap]s, than storing multiple [Cubemap]s themselves in an array. + Generally, [CubemapArray]s provide a more efficient way for storing multiple [Cubemap]s, than storing multiple [Cubemap]s themselves in an array. Internally Godot, uses [CubemapArray]s for many effects including the [Sky], if you set [member ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections] to [code]true[/code]. [b]Note:[/b] [CubemapArray] is not supported in the OpenGL 3 rendering backend. </description> diff --git a/doc/classes/DirAccess.xml b/doc/classes/DirAccess.xml index af498a6519..7d1612e59c 100644 --- a/doc/classes/DirAccess.xml +++ b/doc/classes/DirAccess.xml @@ -80,7 +80,7 @@ <param index="2" name="chmod_flags" type="int" default="-1" /> <description> Copies the [param from] file to the [param to] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - If [param chmod_flags] is different than [code]-1[/code], the unix permissions for the destination path will be set to the provided value, if available on the current operating system. + If [param chmod_flags] is different than [code]-1[/code], the Unix permissions for the destination path will be set to the provided value, if available on the current operating system. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> @@ -199,7 +199,7 @@ <method name="get_space_left"> <return type="int" /> <description> - On UNIX desktop systems, returns the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. + Returns the available space on the current directory's disk, in bytes. Returns [code]0[/code] if the platform-specific method to query the available space fails. </description> </method> <method name="list_dir_begin"> @@ -251,7 +251,7 @@ <param index="0" name="path" type="String" /> <description> Creates a new [DirAccess] object and opens an existing directory of the filesystem. The [param path] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). - Returns [code]null[/code] if opening the directory failed. You can use [method get_open_error] to check the error that ocurred. + Returns [code]null[/code] if opening the directory failed. You can use [method get_open_error] to check the error that occurred. </description> </method> <method name="remove"> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 6007128965..7f3ffce9b7 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -314,8 +314,8 @@ <member name="editors/3d/navigation/navigation_scheme" type="int" setter="" getter=""> The navigation scheme to use in the 3D editor. Changing this setting will affect the mouse buttons that must be held down to perform certain operations in the 3D editor viewport. - [b]Godot[/b] Middle mouse button to orbit, [kbd]Shift + Middle mouse button[/kbd] to pan. [kbd]Mouse wheel[/kbd] to zoom. - - [b]Maya:[/b] [kbd]Alt + Left mouse buttton[/kbd] to orbit. [kbd]Middle mouse button[/kbd] to pan, [kbd]Shift + Middle mouse button[/kbd] to pan 10 times faster. [kbd]Mouse wheel[/kbd] to zoom. - - [b]Modo:[/b] [kbd]Alt + Left mouse buttton[/kbd] to orbit. [kbd]Alt + Shift + Left mouse button[/kbd] to pan. [kbd]Ctrl + Alt + Left mouse button[/kbd] to zoom. + - [b]Maya:[/b] [kbd]Alt + Left mouse button[/kbd] to orbit. [kbd]Middle mouse button[/kbd] to pan, [kbd]Shift + Middle mouse button[/kbd] to pan 10 times faster. [kbd]Mouse wheel[/kbd] to zoom. + - [b]Modo:[/b] [kbd]Alt + Left mouse button[/kbd] to orbit. [kbd]Alt + Shift + Left mouse button[/kbd] to pan. [kbd]Ctrl + Alt + Left mouse button[/kbd] to zoom. See also [member editors/3d/freelook/freelook_navigation_scheme]. [b]Note:[/b] On certain window managers on Linux, the [kbd]Alt[/kbd] key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. </member> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index ecf3d87a70..2b8663e039 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -261,12 +261,20 @@ </method> </methods> <members> + <member name="max_fps" type="int" setter="set_max_fps" getter="get_max_fps" default="0"> + The maximum number of frames per second that can be rendered. A value of [code]0[/code] means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering. + Limiting the FPS can be useful to reduce system power consumption, which reduces heat and noise emissions (and improves battery life on mobile devices). + If [member ProjectSettings.display/window/vsync/vsync_mode] is [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. + If [member ProjectSettings.display/window/vsync/vsync_mode] is [code]Enabled[/code], on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will [url=https://blurbusters.com/howto-low-lag-vsync-on/]reduce input lag while avoiding tearing[/url]. + If [member ProjectSettings.display/window/vsync/vsync_mode] is [code]Disabled[/code], limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. + See also [member physics_ticks_per_second] and [member ProjectSettings.application/run/max_fps]. + </member> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of the in-game clock and real clock but smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code]. </member> <member name="physics_ticks_per_second" type="int" setter="set_physics_ticks_per_second" getter="get_physics_ticks_per_second" default="60"> - The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [member target_fps] and [member ProjectSettings.physics/common/physics_ticks_per_second]. + The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [member max_fps] and [member ProjectSettings.physics/common/physics_ticks_per_second]. [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS. </member> <member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true"> @@ -274,9 +282,6 @@ [b]Warning:[/b] If you set this to [code]false[/code] anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to [code]false[/code] in a [code]@tool[/code] script, this will also impact the editor itself. Do [i]not[/i] report bugs before ensuring error messages are enabled (as they are by default). [b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor. </member> - <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0"> - The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. See also [member physics_ticks_per_second] and [member ProjectSettings.debug/settings/fps/force_fps]. - </member> <member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0"> Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. </member> diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml index adc0f4c3dd..e52f897164 100644 --- a/doc/classes/FileAccess.xml +++ b/doc/classes/FileAccess.xml @@ -20,13 +20,13 @@ [csharp] public void Save(string content) { - using var file = FileAccess.Open("user://save_game.dat", File.ModeFlags.Write); + using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Write); file.StoreString(content); } public string Load() { - using var file = FileAccess.Open("user://save_game.dat", File.ModeFlags.Read); + using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Read); string content = file.GetAsText(); return content; } @@ -250,7 +250,7 @@ <param index="1" name="flags" type="int" enum="FileAccess.ModeFlags" /> <description> Creates a new [FileAccess] object and opens the file for writing or reading, depending on the flags. - Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that ocurred. + Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred. </description> </method> <method name="open_compressed" qualifiers="static"> @@ -261,7 +261,7 @@ <description> Creates a new [FileAccess] object and opens a compressed file for reading or writing. [b]Note:[/b] [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround. - Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that ocurred. + Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred. </description> </method> <method name="open_encrypted" qualifiers="static"> @@ -272,7 +272,7 @@ <description> Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. [b]Note:[/b] The provided key must be 32 bytes long. - Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that ocurred. + Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred. </description> </method> <method name="open_encrypted_with_pass" qualifiers="static"> @@ -282,7 +282,7 @@ <param index="2" name="pass" type="String" /> <description> Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. - Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that ocurred. + Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred. </description> </method> <method name="seek"> @@ -316,8 +316,7 @@ return (unsigned + MAX_15B) % MAX_16B - MAX_15B func _ready(): - var f = File.new() - f.open("user://file.dat", File.WRITE_READ) + var f = FileAccess.open("user://file.dat", FileAccess.WRITE_READ) f.store_16(-42) # This wraps around and stores 65494 (2^16 - 42). f.store_16(121) # In bounds, will store 121. f.seek(0) # Go back to start to read the stored value. @@ -329,8 +328,7 @@ [csharp] public override void _Ready() { - var f = new File(); - f.Open("user://file.dat", File.ModeFlags.WriteRead); + using var f = FileAccess.Open("user://file.dat", FileAccess.ModeFlags.WriteRead); f.Store16(unchecked((ushort)-42)); // This wraps around and stores 65494 (2^16 - 42). f.Store16(121); // In bounds, will store 121. f.Seek(0); // Go back to start to read the stored value. diff --git a/doc/classes/ImageFormatLoaderExtension.xml b/doc/classes/ImageFormatLoaderExtension.xml index b2a7ebc60f..9d18ee8b84 100644 --- a/doc/classes/ImageFormatLoaderExtension.xml +++ b/doc/classes/ImageFormatLoaderExtension.xml @@ -5,7 +5,7 @@ </brief_description> <description> The engine supports multiple image formats out of the box (PNG, SVG, JPEG, WebP to name a few), but you can choose to implement support for additional image formats by extending this class. - Be sure to respect the documented return types and values. You should create an instance of it, and call [method add_format_loader] to register that loader during the initializaiton phase. + Be sure to respect the documented return types and values. You should create an instance of it, and call [method add_format_loader] to register that loader during the initialization phase. </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ <method name="_get_recognized_extensions" qualifiers="virtual const"> <return type="PackedStringArray" /> <description> - Returns the list of file extensions for this image format. Files with the given extentions will be treated as image file and loaded using this class. + Returns the list of file extensions for this image format. Files with the given extensions will be treated as image file and loaded using this class. </description> </method> <method name="_load_image" qualifiers="virtual"> diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index d0453156d5..c6311d780c 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -23,7 +23,7 @@ State of the [kbd]Alt[/kbd] modifier. </member> <member name="command_or_control_autoremap" type="bool" setter="set_command_or_control_autoremap" getter="is_command_or_control_autoremap" default="false"> - Automaticaly use [kbd]Meta[/kbd] ([kbd]Command[/kbd]) on macOS and [kbd]Ctrl[/kbd] on other platforms. If [code]true[/code], [member ctrl_pressed] and [member meta_pressed] cannot be set. + Automatically use [kbd]Meta[/kbd] ([kbd]Command[/kbd]) on macOS and [kbd]Ctrl[/kbd] on other platforms. If [code]true[/code], [member ctrl_pressed] and [member meta_pressed] cannot be set. </member> <member name="ctrl_pressed" type="bool" setter="set_ctrl_pressed" getter="is_ctrl_pressed" default="false"> State of the [kbd]Ctrl[/kbd] modifier. diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 1f38510e83..4d5d5a011b 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -25,6 +25,12 @@ If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button. </description> </method> + <method name="show_popup"> + <return type="void" /> + <description> + Adjusts popup position and sizing for the [MenuButton], then shows the [PopupMenu]. Prefer this over using [code]get_popup().popup()[/code]. + </description> + </method> </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" /> diff --git a/doc/classes/MultiplayerAPIExtension.xml b/doc/classes/MultiplayerAPIExtension.xml index e67970cc89..c4012a920a 100644 --- a/doc/classes/MultiplayerAPIExtension.xml +++ b/doc/classes/MultiplayerAPIExtension.xml @@ -5,7 +5,7 @@ </brief_description> <description> This class can be used to augment or replace the default [MultiplayerAPI] implementation via script or extensions. - The following example augment the default implemenation ([SceneMultiplayer]) by logging every RPC being made, and every object being configured for replication. + The following example augment the default implementation ([SceneMultiplayer]) by logging every RPC being made, and every object being configured for replication. [codeblocks] [gdscript] extends MultiplayerAPIExtension diff --git a/doc/classes/NavigationPathQueryParameters2D.xml b/doc/classes/NavigationPathQueryParameters2D.xml index 364f495a72..397ca8b713 100644 --- a/doc/classes/NavigationPathQueryParameters2D.xml +++ b/doc/classes/NavigationPathQueryParameters2D.xml @@ -33,7 +33,7 @@ The path query uses the default A* pathfinding algorithm. </constant> <constant name="PATH_POSTPROCESSING_CORRIDORFUNNEL" value="0" enum="PathPostProcessing"> - Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artifical corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. + Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. </constant> <constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing"> Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. diff --git a/doc/classes/NavigationPathQueryParameters3D.xml b/doc/classes/NavigationPathQueryParameters3D.xml index 59c907c5b5..29faa5561b 100644 --- a/doc/classes/NavigationPathQueryParameters3D.xml +++ b/doc/classes/NavigationPathQueryParameters3D.xml @@ -33,7 +33,7 @@ The path query uses the default A* pathfinding algorithm. </constant> <constant name="PATH_POSTPROCESSING_CORRIDORFUNNEL" value="0" enum="PathPostProcessing"> - Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artifical corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. + Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. </constant> <constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing"> Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index be7bacd994..bc6ac8012f 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -18,12 +18,6 @@ Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed. </description> </method> - <method name="can_use_threads" qualifiers="const"> - <return type="bool" /> - <description> - Returns [code]true[/code] if the current host platform is using multiple threads. - </description> - </method> <method name="close_midi_inputs"> <return type="void" /> <description> @@ -523,7 +517,7 @@ <param index="0" name="path" type="String" /> <description> Moves the file or directory to the system's recycle bin. See also [method DirAccess.remove]. - The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in [code]res://[/code] as it will not work in exported project. + The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in [code]res://[/code] as it will not work in exported projects. [b]Note:[/b] If the user has disabled the recycle bin on their system, the file will be permanently deleted instead. [codeblocks] [gdscript] @@ -544,6 +538,14 @@ [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> + <method name="read_string_from_stdin"> + <return type="String" /> + <param index="0" name="block" type="bool" default="true" /> + <description> + Reads a user input string from the standard input (usually the terminal). + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Non-blocking reads are not currently supported on any platform. + </description> + </method> <method name="request_permission"> <return type="bool" /> <param index="0" name="name" type="String" /> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index f10c096c1b..199535298c 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -190,6 +190,12 @@ Sets the tooltip of the item at index [param idx]. </description> </method> + <method name="show_popup"> + <return type="void" /> + <description> + Adjusts popup position and sizing for the [OptionButton], then shows the [PopupMenu]. Prefer this over using [code]get_popup().popup()[/code]. + </description> + </method> </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" /> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 498283b2f3..288dc25a77 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -276,6 +276,15 @@ <member name="application/run/main_scene" type="String" setter="" getter="" default=""""> Path to the main scene file that will be loaded when the project runs. </member> + <member name="application/run/max_fps" type="int" setter="" getter="" default="0"> + Maximum number of frames per second allowed. A value of [code]0[/code] means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering. + Limiting the FPS can be useful to reduce system power consumption, which reduces heat and noise emissions (and improves battery life on mobile devices). + If [member display/window/vsync/vsync_mode] is set to [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. + If [member display/window/vsync/vsync_mode] is [code]Enabled[/code], on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will [url=https://blurbusters.com/howto-low-lag-vsync-on/]reduce input lag while avoiding tearing[/url]. + If [member display/window/vsync/vsync_mode] is [code]Disabled[/code], limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. + See also [member physics/common/physics_ticks_per_second]. + [b]Note:[/b] This property is only read when the project starts. To change the rendering FPS cap at runtime, set [member Engine.max_fps] instead. + </member> <member name="audio/buses/channel_disable_threshold_db" type="float" setter="" getter="" default="-60.0"> Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing. </member> @@ -454,12 +463,6 @@ <member name="debug/settings/crash_handler/message.editor" type="String" setter="" getter="" default=""Please include this when reporting the bug on: https://github.com/godotengine/godot/issues""> Editor-only override for [member debug/settings/crash_handler/message]. Does not affect exported projects in debug or release mode. </member> - <member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0"> - Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging. - If [member display/window/vsync/vsync_mode] is set to [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. See also [member physics/common/physics_ticks_per_second]. - This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non-real-time rendering of static frames, or test the project under lag conditions. - [b]Note:[/b] This property is only read when the project starts. To change the rendering FPS cap at runtime, set [member Engine.target_fps] instead. - </member> <member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024"> Maximum call stack allowed for debugging GDScript. </member> @@ -1672,7 +1675,7 @@ [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead. </member> <member name="physics/common/physics_ticks_per_second" type="int" setter="" getter="" default="60"> - The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. See also [member debug/settings/fps/force_fps]. + The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. See also [member application/run/max_fps]. [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_ticks_per_second] instead. [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics/common/physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS. </member> @@ -1986,7 +1989,7 @@ [b]Mobile[/b]: Modern renderer designed for mobile devices. Has a lower base overhead than Clustered, but does not scale as well to large scenes with many elements. [b]Compatibility[/b]: Low-end renderer designed for older devices. Based on the limitations of the OpenGL 3.3/ OpenGL ES 3.0 / WebGL 2 APIs. </member> - <member name="rendering/renderer/rendering_method.mobile" type="String" setter="" getter="" default=""forward_plus""> + <member name="rendering/renderer/rendering_method.mobile" type="String" setter="" getter="" default=""mobile""> Override for [member rendering/renderer/rendering_method] on mobile devices. </member> <member name="rendering/renderer/rendering_method.web" type="String" setter="" getter="" default=""gl_compatibility""> |