02-20-2024 11:44 AM
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!
02-22-2024 01:49 AM
There is way like this:
public HandGrabInteractor RightHand;
RightHand.SelectedInteractable.Rigidbody.name == "yourObjectName"
you can understand with this way which hand holding which object.
02-22-2024 09:59 AM - edited 02-22-2024 11:34 AM
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)