Distance grab with unity interaction toolkit 3.0.5

I am using the unity xr interaction toolkit, and I want to make a custom interactor to be able to grab objects from a distance, I already has a function that is able to determine which interactable to pick up, but I have no idea how to make the interactor know what to pick up

Edit: I found out that i can just use the near-far interactor that can do exactly this

Hey there, I’m glad you found a way to solve your requirements, I have a question, when you say:

“Edit: I found out that i can just use the near-far interactor that can do exactly this”

Do you mean grabbing/interacting with a far object and transforming its position into your hand or something similar?

I’m asking this because I have that issue and I can’t solve it, when I interact with an object, when I grab it, it moves towards my hand, but it’s almost a meter away (or more) and when I move it while holding it, it moves at an incremental speed from my hand, that is, it doesn’t stay at the same distance from my hand.

If you have any advice on this, I would appreciate it.

Hey @rMadrid13,
There are a couple of things going on here with the Near-Far Interactor. When you push/pull the object, it will move on an accelerated curve based on how fast you are moving. As far as side-to-side or up and down, we recently discovered a bug in some of the distance calculation that may cause it to unintentionally pull towards you when rotating. This is slated to land in XRI 3.0.7 in the very near future.

To add to Dave’s point the near-far interactor offers several options for distance interaction.

  1. If you check the Starter Assets Demo scene we show how you can configure interactables to snap to your hand on select. The far attach mode determines that behavior

  2. If you want constant motion with your hand, you can change the behaviour of the the interaction attach controller and disable distance-based velocity scaling altogether

Hope that helps!

Actually, that is exactly what is happening to me, an unexpected calculation, now with what you tell me it is clear to me, for now I made a script with that functionality, meets the requirement, although I’m missing only minor tweaks for Apple Vision Pro, it works well for now, I’ll be wait for the update.

Thank you for taking the time for it.

Many thanks Eric for your reply and for sharing your knowledge!
I’m sure it’ll be helpful for us.