Skip to content

DOCS: Re-organize controls section to conform to content model, DOCF-6394#2128

Merged
duckets merged 15 commits into
docs-content-model-reorgfrom
docs/cm-reorg-controls-DOCF-6394
Feb 10, 2025
Merged

DOCS: Re-organize controls section to conform to content model, DOCF-6394#2128
duckets merged 15 commits into
docs-content-model-reorgfrom
docs/cm-reorg-controls-DOCF-6394

Conversation

@duckets
Copy link
Copy Markdown
Contributor

@duckets duckets commented Feb 7, 2025

Description

The new re-organized "controls" section of the docs.

Testing status & QA

Built and checked locally.

Overall Product Risks

Docs only, no product risk.

Comments to reviewers

Pages included:

* [Controls](controls.md)
  * [About controls](about-controls.md)
  * [Control hierarchies](control-hierarchies.md)
  * [Control types reference](control-types-reference.md)
  * [Control usages](control-usages.md)
  * [Control paths](control-paths.md)
  * [Control state](control-state.md)
  * [Record control state history](record-control-state-history.md)
  * [Control actuation](control-actuation.md)
  * [Noisy controls](noisy-controls.md)
  * [Synthetic controls](synthetic-controls.md)
  * [Optimizing controls](optimize-controls.md)

@duckets duckets changed the base branch from develop to docs-content-model-reorg February 7, 2025 10:10
@duckets duckets changed the title Docs: Re-organize controls section to conform to content model, DOCF-6394 DOCS: Re-organize controls section to conform to content model, DOCF-6394 Feb 7, 2025
Comment thread Packages/com.unity.inputsystem/Documentation~/controls.md Outdated
Comment thread Packages/com.unity.inputsystem/Documentation~/about-controls.md Outdated
Comment thread Packages/com.unity.inputsystem/Documentation~/about-controls.md Outdated
Comment thread Packages/com.unity.inputsystem/Documentation~/control-usages.md Outdated
Comment thread Packages/com.unity.inputsystem/Documentation~/control-paths.md Outdated
Comment thread Packages/com.unity.inputsystem/Documentation~/noisy-controls.md Outdated
- The control is not considered for [interactive rebinding](interactive-rebinding.md). [`InputActionRebindingExceptions.RebindingOperation`](../api/UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation.html) ignores the control by default (you can bypass this using [`WithoutIgnoringNoisyControls`](../api/UnityEngine.InputSystem.InputActionRebindingExtensions.RebindingOperation.html#UnityEngine_InputSystem_InputActionRebindingExtensions_RebindingOperation_WithoutIgnoringNoisyControls)).

>**Note**: If any Control on a Device is noisy, the Device itself is flagged as noisy.
- The Input System performs additional event filtering to filter out noise, then calls [`InputDevice.MakeCurrent`](../api/UnityEngine.InputSystem.InputDevice.html#UnityEngine_InputSystem_InputDevice_MakeCurrent) if any non-noise values cause the control to change state. If an input event for a Device contains no state change on a Control that is not marked noisy, then the Device will not be made current based on the event. This avoids, for example, a plugged in PS4 controller constantly making itself the current gamepad ([`Gamepad.current`](../api/UnityEngine.InputSystem.Gamepad.html#UnityEngine_InputSystem_Gamepad_current)) due to its sensors constantly feeding data into the system.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The Input System performs additional event filtering to filter out noise, then calls [`InputDevice.MakeCurrent`](../api/UnityEngine.InputSystem.InputDevice.html#UnityEngine_InputSystem_InputDevice_MakeCurrent) if any non-noise values cause the control to change state. If an input event for a Device contains no state change on a Control that is not marked noisy, then the Device will not be made current based on the event. This avoids, for example, a plugged in PS4 controller constantly making itself the current gamepad ([`Gamepad.current`](../api/UnityEngine.InputSystem.Gamepad.html#UnityEngine_InputSystem_Gamepad_current)) due to its sensors constantly feeding data into the system.
- The Input System performs additional event filtering to filter out noise, then calls [`InputDevice.MakeCurrent`](../api/UnityEngine.InputSystem.InputDevice.html#UnityEngine_InputSystem_InputDevice_MakeCurrent) if any non-noise values cause the control to change state. If an input event for a device doesn't contain a state change on a non-noisy control, then the Input System doesn't mark the device as current based on the event. This avoids, for example, a plugged in PS4 controller constantly making itself the current gamepad ([`Gamepad.current`](../api/UnityEngine.InputSystem.Gamepad.html#UnityEngine_InputSystem_Gamepad_current)) due to its sensors constantly feeding data into the system.

There were a lot of negatives here that were making it hard to parse

- The Input System performs additional event filtering to filter out noise, then calls [`InputDevice.MakeCurrent`](../api/UnityEngine.InputSystem.InputDevice.html#UnityEngine_InputSystem_InputDevice_MakeCurrent) if any non-noise values cause the control to change state. If an input event for a Device contains no state change on a Control that is not marked noisy, then the Device will not be made current based on the event. This avoids, for example, a plugged in PS4 controller constantly making itself the current gamepad ([`Gamepad.current`](../api/UnityEngine.InputSystem.Gamepad.html#UnityEngine_InputSystem_Gamepad_current)) due to its sensors constantly feeding data into the system.

Parallel to the [`input state`](../api/UnityEngine.InputSystem.InputControl.html#UnityEngine_InputSystem_InputControl_currentStatePtr) and the [`default state`](../api/UnityEngine.InputSystem.InputControl.html#UnityEngine_InputSystem_InputControl_defaultStatePtr) that the Input System keeps for all Devices currently present, it also maintains a [`noise mask`](../api/UnityEngine.InputSystem.InputControl.html#UnityEngine_InputSystem_InputControl_noiseMaskPtr) in which only bits for state that is __not__ noise are set. This can be used to very efficiently mask out noise in input.
- When the application loses focus and Devices are [reset](Devices.md#device-resets) as a result, the state of noisy Controls will be preserved as is. This ensures that sensor readinds will remain at their last value rather than being reset to default values.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- When the application loses focus and Devices are [reset](Devices.md#device-resets) as a result, the state of noisy Controls will be preserved as is. This ensures that sensor readinds will remain at their last value rather than being reset to default values.
- When the application loses focus and devices are [reset](Devices.md#device-resets) as a result, the state of noisy controls are preserved. This ensures that sensor readings remain at their last value rather than being reset to default values.

Comment thread Packages/com.unity.inputsystem/Documentation~/synthetic-controls.md Outdated
Comment thread Packages/com.unity.inputsystem/Documentation~/synthetic-controls.md Outdated
duckets and others added 6 commits February 7, 2025 16:12
…OCF-6394

# Conflicts:
#	Packages/com.unity.inputsystem/Documentation~/Keyboard.md
#	Packages/com.unity.inputsystem/Documentation~/control-types.md
Co-authored-by: Jo Dawes <49957016+jo-unity@users.noreply.github.com>
@duckets duckets merged commit d8200a5 into docs-content-model-reorg Feb 10, 2025
@duckets duckets deleted the docs/cm-reorg-controls-DOCF-6394 branch February 10, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants