Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
134 stars 2 forks source link

Not Respecting Controller poseIsValid, deviceIsConnected, and result Data #2698

Open AdalynBlack opened 1 month ago

AdalynBlack commented 1 month ago

Describe the bug?

It appears that Resonite does not respect the poseIsValid, deviceIsConnected, and result values from OpenVR's DriverPose struct. If multiple valid controllers are connected, with one pair having poseIsValid and deviceIsConnected set to true, and result set to TrackingResult_Running_OK, and the other pair having poseIsValid and deviceIsConnected set to false, andresultset toTrackingResult_Uninitializaed`, Resonite does not appear to respect those flags, and may still try to use the inactive pair of controllers. This bug was noted by another user using the latest nightly build of ALVR, which includes a PR for VRChat hand tracking support, which creates two pairs of controllers so that one may have hand tracking, and the other may pass inputs without associated hand tracking data, with the pairs being mutually exclusive using the previously mentioned states, as documented by VRChat

To Reproduce

  1. Use the latest ALVR nightly release on a headset which supports hand tracking
  2. Under Settings > Headset, enable Hand skeleton and Use separate trackers under the Controllers submenu
  3. Load into Resonite
  4. Switch to hand tracking on your headset
  5. Observe that hand tracking does not work
  6. Switch back to controller tracking
  7. Observe that the controllers no longer track

Expected behavior

If a device is present in OpenVR, but has an invalid pose, isn't connected, or has any result value that isn't TrackingResult_Running_OK, it should not be considered a valid controller, and an alternative should be found in its place If the device currently in use becomes invalid, the game should search for a valid device to use instead

Screenshots

No response

Resonite Version Number

2024.7.25.1284

What Platforms does this occur on?

Windows

What headset if any do you use?

Quest 2

Log Files


7:37:07 PM.401 ( 90 FPS)    DeviceClass: Controller, error: TrackedProp_Success
7:37:07 PM.401 ( 90 FPS)    Getting Role
7:37:07 PM.401 ( 90 FPS)    Role: RightHand
7:37:07 PM.401 ( 90 FPS)    Capacity: 35
7:37:07 PM.401 ( 90 FPS)    Error: TrackedProp_Success
7:37:07 PM.401 ( 90 FPS)    Controller Connected, Device Index: 4, Role: RightHand, RenderModel: oculus_quest_plus_controller_right
7:37:07 PM.401 ( 90 FPS)    RightHand controller role is already mapped to: FrooxEngine.TouchController
7:37:07 PM.401 ( 90 FPS)    Remapping LeftController to new device: 4
7:37:07 PM.402 ( 90 FPS)    Registering Controller: FrooxEngine.TouchController
7:37:07 PM.402 ( 90 FPS)    Controller Registered
7:37:07 PM.403 ( 90 FPS)    Cannot bind FrooxEngine.ScreenInputs to VR Controllers
7:37:07 PM.403 ( 90 FPS)    Cannot bind FrooxEngine.CommonActionsInputs to FrooxEngine.TouchController
7:37:07 PM.403 ( 90 FPS)    Cannot bind FrooxEngine.CommonActionsInputs to FrooxEngine.TouchController
7:37:07 PM.403 ( 90 FPS)    Cannot bind FrooxEngine.CommonActionsInputs to FrooxEngine.TouchController
7:37:07 PM.403 ( 90 FPS)    Cannot bind FrooxEngine.CommonActionsInputs to FrooxEngine.TouchController
7:37:07 PM.403 ( 90 FPS)    Cannot bind FrooxEngine.Undo.UndoInputs to VR Controllers
7:37:07 PM.403 ( 90 FPS)    Cannot bind FrooxEngine.GlobalActions to VR Controllers
7:37:07 PM.405 ( 90 FPS)    Cannot bind FrooxEngine.ScreenInputs to VR Controllers```

### Additional Context

_No response_

### Reporters

StaticVoid: `st47ik` on Discord
shiftyscales commented 1 month ago

Please provide the full log file for this issue, @AdalynBlack.