cancel
Showing results for 
Search instead for 
Did you mean: 

Meta Interaction SDK: UseInteractable - Requirements to use or any documentation available?

lindy98
Explorer

Hi,

I'm working with the Meta Interaction SDK (v62.0.0) and trying to get something to work with the UseInteractable component (besides the example Spray bottle). 

I've been referencing the Spray bottle closely, and for my custom object, I've written a script that implements IHandGrabUseDelegate, and assigned it to UseInteractable's "Hand Use Delegate" field. The object has HandGrabInteractables, etc. (similar to the Spray bottle). However, the methods from the interface (BeginUse, EndUse, and ComputeUseStrength) are not being called. 

I'm wondering if I'm missing something (probably am), and if there is any documentation on steps / requirements for the Use interaction to work.

Thanks for any help!

4 REPLIES 4

Big_Flex
Meta Employee

Hi @lindy98, thanks for posting about this! I write the docs for Interaction SDK, so you can tag me in any future questions you have about the SDK. Here's the official doc for the Use interaction. You don't need to create any scripts to get the interaction working, you can just copy the structure and components of the spray bottle to your new mesh and then manually point them to the new mesh's trigger and poses. It's a tedious process, but I created a water gun that way. If you've already done that, maybe you forgot to set this field in the UseInteractable? 

Big_Flex_0-1709581764707.png

 

Thank you for the reply! Actually, I think the key I was looking for is the "secondary interactor". I had been trying to implement a "pull to rotate" interaction, and thought the UseInteractable would be useful (ie. OneGrabTranslate to pull, then Use) but the structure of the object I'm working with is different from the spray bottle (the whole object moves with the parent that is grabbed). 

Is there any option to use a secondary interactor filter to connect, eg. a OneGrabTranslateTransformer and a OneGrabRotateTransformer? Or a custom script would need to be written?

Thank you for any help!

Hi lindy, have you come up with a solution for that? I am looking at a similar problem right now and can't seem to find a solution or documentation on interaction like these. 

Thanks for the help 🙂

EDIT: I have finally found out why the HandGrabUse didn't work for me. I did a bunch of digging and essentially the ComputeUseStrength method is only getting called when there is a required finger in the HandGrabUseInteractable! (under Optionals).

In the water bottle example that is the Index but you can set basically any finger on required and then it should work. 

For anyone interested, this mechanic lies in the HandGrabAPI.cs file, which is used in the interface IHandGrabUseDelegate which again is implemented in the WaterSpray script.

Day1332
Honored Guest

Add IHandGrabUseDelegate to the class of objects you want to interact with.

BeginUse(): Run when you hold an object
EndUse(): Run when an object is released
ComputeUseStrength() : Use value for selected Finger Data
When you add the HandGrabUseInteractive Component, you must change it because the Default Values of Use Fingers are all "Ignored".
And Optionals should also add a Secondary Interactor Filter.
 
This is what the people above said.
 
+ The OVCamerraRig has a variety of interactions.
You need to add 'UseGrabInteractor' to it, and if you look at the inspector, there is 'Secondary Interactor Connection' and you need to connect the 'HandGrabInteractor' you already use to the 'Primary Interactor'.