Search Unity

Question ActionBasedController.SendHapticImpulse not working

Discussion in 'XR Interaction Toolkit and Input' started by VisualDima, Mar 24, 2021.

  1. VisualDima

    VisualDima

    Joined:
    May 21, 2020
    Posts:
    19
    I'm using OpenXR plugin. My VR system is WMR

    I'm learning new XR Interaction Toolkit with Action Based Controllers. I managed to understand everything I need to make interactions in my game. But I cant' figure out how to use haptics.

    This code does nothing:

    ActionBasedController controller = GetComponent<ActionBasedController>();
    controller.SendHapticImpulse(0.75f, 2.0f);

    SendHaptics returns True, but I don't feel any rumble in controllers.
    What did I miss?
     
    Last edited: Mar 25, 2021
  2. NemesisWarlock

    NemesisWarlock

    Joined:
    Jan 21, 2017
    Posts:
    140
    Haptics isn't enabled in OpenXR yet.

    Very annoying, I know. but the code you have will work out of the box once it gets updated for support.
     
  3. VisualDima

    VisualDima

    Joined:
    May 21, 2020
    Posts:
    19
    It's sad. I hope, haptics will be implemented soon. At least before my game will be ready for release.
     
  4. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Haptics should now be fixed in the recent 1.2.0 release.