- Home /
When I grab an object, it is too close
Hi, I have a problem and hope someone can guide / help me please. Currently I can grab an object and the raybean works perfectly. However, when I grab the object, it gets way too close.! Is there anyway I can set the distance the object is from my hand when I grab it? Please!
There surely is a way to do this.
Instead of a "Please!" you could instead add some more helpful details on how exactly you currently place the object so that people can give you actual helpful advice on what to do.
Answer by dukecg · Sep 06, 2021 at 07:50 AM
Captain_Pineapple, thanks for you reply. My obj is placed on top of pillar vertically. When I point the obj, it will come to my hand. For that I added Rigidbody, Sphere Collider and XR Grab Interactable components. I have tried to offset the pivot point in Blender and reimport that new obj thinking it might work, it doesn't. Thank you!
I am currently using Unity Version 2020.3.17f1
Ah well that is why i do not like using premade Assets that do some behaviour X for me. After a short time one runs into an issue that'd need that you change some behaviour of said asset and then you are back to square one.
Best i can think of in that regard is create a script that will take the object you are to attach, create a parent transform which you use as attach point instead. Then you can use the parent relation to add a local offset for the actual grabbed object.
Thank you. I am not a programmer / developer, so scripting is very limited on my side. The parenting seems to be a good idea, will try that. Thank you Captain Pineapple for your help.