Input: Document that accumulated input is disabled by default

This was actually disabled by mistake in 3.4 causing a regression, but since
this issue survived the whole 3.4.x series and it's now very close to 3.5,
it's too late to change it again.

We might consider it for 3.6 after some beta testing.

Fixes #55037.

(cherry picked from commit 7de45b6203)
This commit is contained in:
Rémi Verschelde 2022-07-03 12:00:26 +02:00
parent aad1c39098
commit 373ec9a8a2
2 changed files with 4 additions and 2 deletions

View File

@ -375,7 +375,8 @@
<argument index="0" name="enable" type="bool" />
<description>
Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.
Input accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input.
Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input.
[b]Note:[/b] Input accumulation is [i]disabled[/i] by default for backward compatibility reasons. It is however recommended to enable it for games which don't require very reactive input, as this will decrease CPU usage.
</description>
</method>
<method name="start_joy_vibration">

View File

@ -5,7 +5,8 @@
</brief_description>
<description>
Contains mouse and pen motion information. Supports relative, absolute positions and speed. See [method Node._input].
[b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call [method Input.set_use_accumulated_input] with [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly.
[b]Note:[/b] By default, this event can be emitted multiple times per frame rendered, allowing for precise input reporting, at the expense of CPU usage. You can call [method Input.set_use_accumulated_input] with [code]true[/code] to let multiple events merge into a single emitted event per frame.
[b]Note:[/b] If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly.
</description>
<tutorials>
<link title="Mouse and input coordinates">https://docs.godotengine.org/en/3.4/tutorials/inputs/mouse_and_input_coordinates.html</link>