Skip to content

OnHandUpdate processes invalid hand #426

@BCrowderKB

Description

@BCrowderKB

Describe the bug
OnHandUpdate condition checks don't account for handData.hand == 0

To Reproduce
Steps to reproduce the behavior:

  1. Open WebXRInputSystem.cs
  2. Add console log above "DisableHandRight();" call
    Debug.Log("Invalid Hand: "+(handData.hand == 0));
  3. Make build
  4. Enable & Disable your hands via emulator or other means
  5. Notice console prints "Invalid Hand: true"

Expected behavior
No update should occur if OnHandUpdate is called with an invalid hand
e.g. adding a guard clause at the beginning of OnHandUpdate: if (handData.hand == 0) return;

Screenshots
Image

Unity info (please complete the following information):

  • Editor version: 6000.0.32f1
  • WebXR package version: 0.22.1
  • WebXR Interactions version: 0.22.0 (with previous hand event fix)
  • OpenUPM
  • Input System + XR Interaction Toolkit
  • Built-in render pipeline

Desktop (please complete the following information):

  • Windows 11
  • Chrome

Additional context
I noticed a few spots that default to right hand that should probably check for hand == 2.

I found this while trying to debug a fatal input manager "memory out of bounds" error that was infrequently thrown when Exiting VR in my Quest 3.

Also unrelated but in case you didn't see the tracked pose driver bug claims to have been fixed in InputSystem package 1.13.2 https://issuetracker.unity3d.com/issues/gameobject-is-placed-at-position-0-0-0-when-entering-play-mode-if-using-trackedposedriver

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions