Skip to content

Commit f1a105b

Browse files
ducketsjo-unity
andauthored
Update Packages/com.unity.inputsystem/Documentation~/timing-optimize-dynamic-update.md
Co-authored-by: Jo Dawes <[email protected]>
1 parent e4fdd5e commit f1a105b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Packages/com.unity.inputsystem/Documentation~/timing-optimize-dynamic-update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ If you're not working with the physics system or using `FixedUpdate`, always set
44

55
You can use either a Polling or Event-driven approach to read and process input each frame. You can find out more about Polling or Event-driven approaches in [Responding To Actions](RespondingToActions.html). Whether you choose polling or event-driven, as long as you have your Update Mode set to **Process Events in Dynamic Update**, you receive the latest events and values at the start of each frame.
66

7-
### Polling technique
7+
## Polling technique
88

99
Poll input in `Update` and use those values to control your game in `Update`. If there were multiple events after the last frame completed (for example, multiple changing position values of a continuously moving gamepad stick), polling gives you the most recently processed value which is often fine for most scenarios. This approach is often called **sample-and-hold** and is a form of down-sampling, because individual subframe information is discarded. For example, in the scenario shown in the diagram below, polling the input on frame 3 gives the value for event (**g**), while the values for events (**d**) (**e**) and (**f**) are discarded.
1010

0 commit comments

Comments
 (0)