cancel
Showing results for 
Search instead for 
Did you mean: 

Poke Button and Haptic

Skylunar
Honored Guest

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 2

bilgekagan
Protege

There is way like this: 

public HandGrabInteractor RightHand;

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

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

lufinkey
Protege

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)