Hi, I’m facing the following problem:
Hands are grabbing an object and then placing it inside a socket. When the object is dropped, I’d like to know whether it was placed inside a socket, which one, or if it was dropped in open air.
The setup is the following: hands use NearFarInteractor → the object has XRGrabInteractable → the socket has XRSocketInteractable.
And the problem is that I can’t find a suitable event where I’d plug my handling logic (to know if the object was dropped in open air or in a socket).
I tried NearFarInteractor’s selectExited event, however in that event (in the arguments) I can see which object was dropped, but not whether the object was dropped inside a socket or in open air. It seems like at this point the engine still hasn’t processed that, the object is in .selected=false state and the socket’s selectEntered event gets trigged a bit later.
Is there some “proper”/elegant way of achieving this? Ideally I’d like to place this logic inside a single event, to make it easier to follow.
Thanks!