Search Issue Tracker

Won't Fix

Won't Fix in 1.8.X

Votes

0

Found in [Package]

1.8.1

Issue ID

OXRB-213

Regression

No

Identify the bottlenecks limiting our ability to implement framerate independent input polling.

Package: OpenXR Plugin

-

Steps to reproduce:
1. Open the attached project "2022_3_LTS_SimpleVR - Bug framerateindependant.zip"
2. In the "FramerateIndependantTest-3 cases" GameObject in the hierarchy select 1 of the 3 cases to run
2.1. In the Inspector, make sure "KeyboardFramerateIndependantInputWorks" component is enabled (others not enabled)
2.2. Enter Play Mode, click the "Game" window to make sure it has focus
2.3. Press the spacebar multiple times during a frame (the frame is 1 second long, so it should be possible to hit 5 times with ease)
2.4. Notice the console log -> during 1 frame there are multiple action events, each has a different timestamp which links them to when you hit the spacebar in that frame
2.5. Note the code works perfectly for the keyboard, allowing input to be received independant of the framerate (This is expected)
3. In the Inspector, make sure "VrController FramerateIndependantInputFails" component is enabled (others not enabled)
3.1. Connect Oculus Link and setup the Controlls for Quest 2 in "Assets/InputSettings/Simple VR Setup.inputactions". Make sure Quest Interaction Profile is selected in OpenXR settings
3.2. Enter Play Mode, click the "Game" window to make sure it has focus
3.3. Move the left Quest 2 controller around for a minute. The first ~6 frames might not show anything in the console, the controller is not activated yet
3.4. Notice the console log -> during 1 frame there is only 1 input event
3.5. Expected: 120 input events minimum to be available in the trace (since this would be available when running at 120Hz)
3.6. Note the code setup is the same as for the keyboard, it just does not work for VR

Expected results: Input events are not framerate dependent and multiple events can be called in 1 frame
Actual Results: Input events are framerate dependent on OpenXR when at a lower framerate

Reproducible in: OpenXR 1.8.1 (2021.3.29f1, 2022.3.6f1, 2023.1.5f1, 2023.2.0b1, 2023.3.0a1)

Environment tested on: Windows 10

Notes:
-The project is set up to have a low framerate to showcase the issue
-The third component in "FramerateIndependantTest-3 cases" GameObject uses code with lower level Event in mind, which is harder to work with, but it also does not produce the extra input samples
-There's also a Forum post regarding this issue: https://forum.unity.com/threads/sampling-xr-controller-positions-and-linear-velocity-independent-of-frame-rate-and-physics-time-step.1373250/

  1. Resolution Note:

    There are no fixes planned for this Bug

  2. Resolution Note (1.8.X):

    See Notes in parent issue OXRB-213

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.