Improve documentation related to fixed physics processing

(cherry picked from commit b89a37269b)
This commit is contained in:
Hugo Locurcio 2020-02-27 22:19:57 +01:00 committed by Rémi Verschelde
parent f0b63b47aa
commit 4e879ed803
2 changed files with 5 additions and 3 deletions

View File

@ -147,10 +147,10 @@
If [code]true[/code], it is running inside the editor. Useful for tool scripts. If [code]true[/code], it is running inside the editor. Useful for tool scripts.
</member> </member>
<member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second" default="60"> <member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second" default="60">
The number of fixed iterations per second (for fixed process and physics). 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 tunneling issues, but keep in mind doing so will increase CPU usage.
</member> </member>
<member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5">
Controls how much physic 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 in-game clock and real clock, but allows to 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. 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 in-game clock and real clock, but allows to 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.
</member> </member>
<member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0"> <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. The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit.

View File

@ -956,10 +956,12 @@
Enables [member Viewport.physics_object_picking] on the root viewport. Enables [member Viewport.physics_object_picking] on the root viewport.
</member> </member>
<member name="physics/common/physics_fps" type="int" setter="" getter="" default="60"> <member name="physics/common/physics_fps" type="int" setter="" getter="" default="60">
Frames per second used in the physics. Physics always needs a fixed amount of frames per second. The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run.
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.iterations_per_second] instead.
</member> </member>
<member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5"> <member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5">
Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS. Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS.
[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>
<member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )"> <member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )">
Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method VisualServer.set_default_clear_color]. Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method VisualServer.set_default_clear_color].