Skip to content

FIX: uum 138143 button press points for stickcontrol and vector2 add functionality#2411

Open
Darren-Kelly-Unity wants to merge 4 commits intodevelopfrom
bugfix/uum-138143-button-press-points-for-stickcontrol-and-vector2-add-functionality
Open

FIX: uum 138143 button press points for stickcontrol and vector2 add functionality#2411
Darren-Kelly-Unity wants to merge 4 commits intodevelopfrom
bugfix/uum-138143-button-press-points-for-stickcontrol-and-vector2-add-functionality

Conversation

@Darren-Kelly-Unity
Copy link
Copy Markdown
Collaborator

@Darren-Kelly-Unity Darren-Kelly-Unity commented Apr 29, 2026

Purpose of this PR

Fixes UUM-138143InputAction.IsPressed() / in-progress style checks could fire at the wrong effective magnitude for Vector2 / stick bindings when developers set pressPoint on the control or on PressInteraction, instead of honoring those thresholds consistently.

Introduces IActuationPressPoint, implements it on ButtonControl, Vector2Control, and (via Vector2Control) StickControl, and threads pressPoint / pressPointOrDefault through InputAction, InputActionState, and InputControlExtensions so press-style polling matches the documented interaction defaults. Adds ActuationPressPointTests and refreshes RespondingToActions.md.

Release Notes

  • UUM-138143InputAction.IsPressed() (and related press / in-progress behavior) for actions bound to Vector2Control and StickControl now respects per-control pressPoint and binding PressInteraction.pressPoint, aligning with ButtonControl and fixing incorrect early triggers when rewriting default interaction thresholds.

Functional Testing status

  • Automated: new ActuationPressPointTests and updates in CoreTests_Actions / CoreTests_Controls cover press-point actuation paths.
  • Manual: repro project IN-136917 / scene Input Bug from the ticket; verify console no longer shows IsPressed before processed magnitude reaches the configured press threshold for vector / stick cases.

Performance Testing Status

No performance impact expected: additional work is branchy float comparisons on existing control paths; no new per-frame allocations identified in scope.

Overall Product Risks

Technical Risk: 2 — Touches InputActionState and widely used press APIs; edge cases around magnitude, deadzones, and interactions need regression confidence.

Halo Effect: 2 — Any title using IsPressed / WasPressedThisFrame on Vector2 / stick actions may see timing changes until bindings are tuned; behavior is intended to match documented pressPoint semantics.

Class diagram

Git range analyzed: origin/develop...HEAD (4 commits).

Mermaid class diagram (GitHub)
classDiagram
  direction TB

  class IActuationPressPoint {
    <<interface>>
    +pressPoint
    +pressPointOrDefault
  }

  class ButtonControl {
    +pressPoint
    +pressPointOrDefault
  }

  class Vector2Control {
    +pressPoint
    +pressPointOrDefault
  }

  class StickControl {
  }

  class InputAction {
    +IsPressed()
    +WasPressedThisFrame()
    +WasReleasedThisFrame()
  }

  class InputActionState {
  }

  class InputControlExtensions {
    <<static>>
  }

  IActuationPressPoint <|.. ButtonControl
  IActuationPressPoint <|.. Vector2Control
  Vector2Control <|-- StickControl
  InputAction --> InputActionState : uses
  InputControlExtensions ..> IActuationPressPoint : pressPointOrDefault
Loading

Documentation Impact

Changes analyzed: origin/develop...HEAD (4 commits).

User-facing: New public IActuationPressPoint; InputAction press-helper remarks/behavior; ButtonControl, Vector2Control, StickControl docs around pressPoint; RespondingToActions.md updated for polling vs pressPoint.

Documentation updates in this PR

  • RespondingToActions.md — Clarifies IsPressed / frame helpers vs interactions and pressPoint; review wording and cross-refs after merge.

Follow-up (optional)

  • If QA/docs want a dedicated IActuationPressPoint callout in a control reference page, add a short subsection and link from Responding to Actions.

Jira (fetched via MCP): Bug, In Progress, TBD priority, assignee Darren Kelly, label Input-Actions. Ticket summary: InputAction.IsPressed() and IsInProgress() triggers on wrong values when rewriting the default values of Vector2 interactions.

@u-pr
Copy link
Copy Markdown
Contributor

u-pr Bot commented Apr 29, 2026

⚠️ Review skipped — this PR is too large to process.

The diff contains approximately 325,668 tokens (~977,005 characters), which exceeds the maximum limit of 150,000 tokens.

Please consider splitting this PR into smaller, focused changes.

🤖 Helpful? 👍/👎

@codecov-proxy.fjygbaifeng.eu.org
Copy link
Copy Markdown

codecov-proxy.fjygbaifeng.eu.org Bot commented Apr 29, 2026

Codecov Report

Attention: Patch coverage is 92.46753% with 29 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...nputsystem/InputSystem/Actions/InputActionState.cs 84.55% 21 Missing ⚠️
...tem/InputSystem/Controls/InputControlExtensions.cs 58.82% 7 Missing ⚠️
...ity.inputsystem/InputSystem/Actions/InputAction.cs 75.00% 1 Missing ⚠️
@@             Coverage Diff             @@
##           develop    #2411      +/-   ##
===========================================
+ Coverage    78.13%   78.50%   +0.37%     
===========================================
  Files          483      484       +1     
  Lines        98770   100396    +1626     
===========================================
+ Hits         77169    78820    +1651     
+ Misses       21601    21576      -25     
Flag Coverage Δ
inputsystem_MacOS_2022.3 5.33% <0.61%> (-0.01%) ⬇️
inputsystem_MacOS_2022.3_project 75.41% <91.42%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.0 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_MacOS_6000.0_project 77.30% <91.42%> (-0.01%) ⬇️
inputsystem_MacOS_6000.3 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_MacOS_6000.3_project 77.30% <91.42%> (+0.02%) ⬆️
inputsystem_MacOS_6000.4 5.31% <0.61%> (-0.01%) ⬇️
inputsystem_MacOS_6000.4_project 77.31% <91.42%> (+0.02%) ⬆️
inputsystem_MacOS_6000.5 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_MacOS_6000.5_project 77.34% <91.42%> (+0.02%) ⬆️
inputsystem_MacOS_6000.6 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_MacOS_6000.6_project 77.34% <91.42%> (+0.02%) ⬆️
inputsystem_Ubuntu_2022.3_project 75.31% <91.42%> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.0 5.31% <0.61%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.0_project 77.21% <91.42%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.3 5.31% <0.61%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.3_project 77.20% <91.42%> (+0.02%) ⬆️
inputsystem_Ubuntu_6000.4 5.31% <0.61%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.4_project 77.21% <91.42%> (+0.02%) ⬆️
inputsystem_Ubuntu_6000.5 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.5_project 77.25% <91.42%> (+0.02%) ⬆️
inputsystem_Ubuntu_6000.6 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.6_project 77.25% <91.42%> (+0.02%) ⬆️
inputsystem_Windows_2022.3 5.33% <0.61%> (-0.01%) ⬇️
inputsystem_Windows_2022.3_project 75.53% <91.42%> (+<0.01%) ⬆️
inputsystem_Windows_6000.0 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_Windows_6000.0_project 77.42% <91.42%> (-0.01%) ⬇️
inputsystem_Windows_6000.3 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_Windows_6000.3_project 77.42% <91.42%> (+0.02%) ⬆️
inputsystem_Windows_6000.4 5.31% <0.61%> (-0.01%) ⬇️
inputsystem_Windows_6000.4_project 77.43% <91.42%> (+0.02%) ⬆️
inputsystem_Windows_6000.5 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_Windows_6000.5_project 77.47% <92.46%> (+0.02%) ⬆️
inputsystem_Windows_6000.6 5.30% <0.61%> (-0.01%) ⬇️
inputsystem_Windows_6000.6_project 77.47% <92.46%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...sets/Tests/InputSystem/ActuationPressPointTests.cs 100.00% <100.00%> (ø)
Assets/Tests/InputSystem/CoreTests_Actions.cs 98.87% <ø> (+0.46%) ⬆️
Assets/Tests/InputSystem/CoreTests_Controls.cs 99.80% <100.00%> (-0.02%) ⬇️
....inputsystem/InputSystem/Controls/ButtonControl.cs 88.50% <100.00%> (+0.27%) ⬆️
...y.inputsystem/InputSystem/Controls/StickControl.cs 100.00% <ø> (ø)
...inputsystem/InputSystem/Controls/Vector2Control.cs 100.00% <100.00%> (ø)
...ity.inputsystem/InputSystem/Actions/InputAction.cs 92.15% <75.00%> (-0.04%) ⬇️
...tem/InputSystem/Controls/InputControlExtensions.cs 77.02% <58.82%> (ø)
...nputsystem/InputSystem/Actions/InputActionState.cs 92.66% <84.55%> (+0.03%) ⬆️

... and 2 files with indirect coverage changes

ℹ️ Need help interpreting these results?

@Darren-Kelly-Unity Darren-Kelly-Unity changed the title Bugfix/uum 138143 button press points for stickcontrol and vector2 add functionality FIX: uum 138143 button press points for stickcontrol and vector2 add functionality Apr 29, 2026
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.

1 participant