Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Skylunar's avatar
Skylunar
Honored Guest
2 years ago

Poke Button and Haptic

I'm trying to figure out how to trigger haptics on a button press. My main issue right now is I don't know how to find out which hand is the one that has poked the button, and only trigger the haptic feedback of that specific hand. I'm working with the new Meta SDK in Unity. Any suggestion would be appreciated!

2 Replies

Replies have been turned off for this discussion
  • There is way like this: 

    public HandGrabInteractor RightHand;

    RightHand.SelectedInteractable.Rigidbody.name == "yourObjectName"

    you can understand with this way which hand holding which object.

  • There's an "Identifier" field on PointerEvent. If you loop through all the Interactables on your object and compare it against interactable.SelectingInteractor.identifier, the matching interactor should be the one currently poking.

    Edit: The caveat here is that you may have an issue doing this during Unhover events, since SelectingInteractor would already be unset at that point (for Unselect events, you can use the Interactor property)