IVRInput: 1-frame input drop (bActive = false) after lowering action set nPriority while input is held
まだ誰も着手していません。
評価
調査の方向性
The payload names no source files. The entry points are IVRInput::UpdateActionState and GetAnalogActionData, and the priority field is VRActiveActionSet_t::nPriority. Reproducing needs SteamVR, a controller and an overlay app, so start by checking whether the one-frame bActive == false gap happens with other headsets. The issue does not say what to change: the reporter asks whether the gap is intended and whether it should be fixed or documented. Done would mean a maintainer decision plus either a corrected input path or documentation of the gap.
索引モデルが issue の本文から書いたものです。
説明
Summary
I'm writing an overlay application that uses IVRInput. While the pointer is on one of its overlays, it raises the priority of the trigger action set for that hand to vr::k_nActionSetOverlayGlobalPriorityMin (so the game doesn't receive the trigger). When the pointer leaves, it lowers the priority back to 0.
When the priority is lowered while the trigger is still physically held, the next GetAnalogActionData call for the trigger returns VRInputError_None with bActive == false and x == 0 for exactly one frame. On the following frame it returns bActive == true with the real value again.
An application that treats "inactive" as "0" sees a release followed immediately by a new press, although the user never released the trigger.
Raising the priority (0 → global overlay priority) did not show this in my logs.
Environment
- SteamVR version: SteamVR 2.17.10
- OS: Windows 11
- Headset / controllers: Meta Quest 2, connected through Virtual Desktop (Touch controllers)
- Input:
IVRInputwith a custom action manifest; the trigger is avector1action in its own action set (one action set per input group, each activated per hand withulRestrictedToDevice=/user/hand/rightetc.) - SteamVR's setting that allows overlay apps to take input priority is enabled:
What the app does each frame
// sets[] contains one VRActiveActionSet_t per (action set, hand).
// For the trigger set of the right hand:
sets[i].ulActionSet = triggerSet;
sets[i].ulRestrictedToDevice = rightHandSource;
sets[i].nPriority = blocked ? vr::k_nActionSetOverlayGlobalPriorityMin : 0;
vr::VRInput()->UpdateActionState(sets, sizeof(sets[0]), count);
vr::InputAnalogActionData_t d{};
vr::VRInput()->GetAnalogActionData(triggerAction, &d, sizeof(d), vr::k_ulInvalidInputValueHandle);
// d.bActive, d.x are used as the trigger value
blocked becomes true while the ray is on one of our overlays and false when it is not (or when the overlay under the ray is destroyed).
Observed log
f is my frame counter (one UpdateActionState + one read per frame), t is milliseconds. block lines are printed when I change nPriority for the trigger set (it takes effect on the next UpdateActionState). trigger input lines are printed when bActive changes.
f=1198 block trigger=0 (before: trigger=1) t=16060 <- priority lowered while the trigger is held
f=1199 trigger input active=0 (error=0, bActive=0, value=0.00) t=16082 <- one frame, no data
f=1199 block trigger=1 (before: trigger=0) t=16085 <- (my app raised it again)
f=1200 trigger input active=1 (error=0, bActive=1, value=0.74) t=16102 <- real value is back
The same pattern appeared every time the priority was lowered while the trigger was held (3 of 3 cases):
| priority lowered at | bActive == false at |
bActive == true again at |
|---|---|---|
| f=1198 | f=1199 | f=1200 (0.74) |
| f=1226 | f=1227 | f=1228 |
| f=1282 | f=1283 | f=1284 (0.85) |
Raising the priority (f=1255, trigger not held) was followed by no bActive change. The frame interval is about 16 ms.
Expected behavior
One of:
bActivestaystrueand the held value keeps being reported across the priority change; or- If a one-frame gap is expected, it should be documented (for
UpdateActionState/VRActiveActionSet_t::nPriority), together with the recommended way to tell it apart from a real release.
Actual behavior
For one frame after the priority is lowered, bActive == false and x == 0, even though the trigger is held and the call returns VRInputError_None.
Impact
The app sees "trigger 0.61 → 0.00 → 0.74": a release and a new press within two frames, which a human cannot do. In my case a click on a button that disappears (so the ray ends up on another overlay behind it) was delivered twice, and the second one clicked the overlay behind it.
Workaround
When bActive is false, keep the previous value for up to 3 frames, then fall back to 0.
Questions
- Is this gap intended when
nPriorityis lowered? Is it specific to this priority transition (global overlay priority → 0)? - Is there a recommended way to avoid it (for example, delaying the priority change until the input is released, or reading the data with a specific
ulRestrictedToDevice)?
Notes / what I have not verified
- I only tested Quest 2 through Virtual Desktop. I don't know whether it also happens with a native SteamVR headset or other controllers.
- In one earlier run with the input-priority setting turned off, I saw a similar
0.00→0.94jump, but that build had nobActivelogging, so I can't say whetherbActivewas false there.
- 主要言語
- C++
- スター
- 6.7k
- フォーク
- 1.3k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ValveSoftware/openvr のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
ValveSoftware/openvr#1289 · リアクション 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
ValveSoftware/openvr#227 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
ValveSoftware/openvr#1938 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
ValveSoftware/openvr#1937 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ValveSoftware/openvr#1936 ·
ValveSoftware/openvr の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
deepseek-ai/DeepGEMM#529 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
compiler-explorer/compiler-explorer#9710 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ucb-bar/libgemmini#10 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
`test_controlled_TermSequenceBox_logging` and `test_symbolic_ops` fail when another test runs firstオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Quantinuum/tket#2282 ·
メンテナーはふだん 1 日以内に返信