- Home /
Oculus Avatar, Snapping Objects When Grabbed
So I've been searching forums, videos, etc and I still can't figure it out. How does one snap an object to a certain position and orientation when grabbed? I tried setting to parent, I tried making an empty game object and using it as a reference for the snap features transform, but none of it seems to be working.
For example, say I have a sword. When you grab it, I want the sword to position itself to where your holding it by the sword handle. Thanks in advanced and sorry for asking something that has been answered already possibly. I'm just getting frustrated now.
Answer by JoshWPro · Mar 03, 2018 at 12:16 AM
Hi, I need to do this for my game too. Maybe I find a solutione this WE. I will report back when I find something. But I guess you could do this via script, maybe there ist somekind of bool that tells you if the object ist „grabbed“, then you only need to write a script to set the object as a child of your hand and set the local position an when it is not grabbed set parent back to world. But it would be cool if Oculus has this already build in in there grabbing script.Looking into the script tomorrow.
Your answer
![](https://koobas.hobune.stream/wayback/20220612152240im_/https://answers.unity.com/themes/thub/images/avi.jpg)