Skip to main content
Participant
April 26, 2024

How to snap a grabbed object during hovering

Hi,

I want to snap an object that I've grabbed towards a fixed socket, as the user moves it over the slot.
The object shall be still in grabbed state, and the controller hands should follow the snapped object.

Is there a way to do this with the Interaction SDK. I didn't find a sample.

regards,

Alex

 

    This topic has been closed for replies.

    5 replies

    BigFlex
    Meta Employee
    April 26, 2024

    Hi Lanzelot01, to snap a grabbed object to a socket, you can follow this snap tutorial. To have the controller driven hands follow the snapped object, you can use the ghost reticle tutorial. In that tutorial, you'll want to follow the instructions at the top and then jump to the section called "Option D : Create Ghost Hand Reticle".

    Interaction SDK also has a large amount of sample scenes that you can discover here.


    Participant
    April 29, 2024

    Hi Big_Flex 

    Thank you for your quick respond. I had already split the problem into two parts, namely snapping and somehow moving the controller/controller hands.

    I am able to snap grabbed objects using GrabInteractor and GrabInteractable. The problem is that all the docs and samples only consider snapping AFTER grabbing. What I need is snapping WHILE holding the object.

    How do I get a object snapped in the hovering state? The object should snap as the controller moves over the snap zone. As the controller moves out of the snap zone (and the user still keeps holding the grab button), the object should unsnap and follow the controller movement again.

    New Participant
    January 29, 2025

    I know its been a while, but you probably could use force select method in the Hand Grab Interactor for this and use colliders to trigger a force select (grab) for your target object. In your logic you would do something like this:
    On collision(or trigger) enter
    ForceRelease
    ForceSelect (hand grab interactor component reference)