Skip to main content
New Participant
December 29, 2017

How to snap object with OVR Grabbable?

  • December 29, 2017
  • 15 replies
  • 18143 views
Hello!

I've managed to successfully set up grabbing with Grabber but now I would like to go a step further and only allow grabbing at a specific point. In my case, I am trying to pickup a sword only by the handle, and make sure it always faces the correct orientation. I've looked through the documentation for Grabber/Grabbable but I can't seem to find what I need to execute this.

Thank you for the help! 

15 replies

New Participant
January 30, 2018
set up a an empty gameobject at position (0,0,0) and rotation (0,0,0) in the unity scene. attach this as your snap offset transform in the ovr grabbable script. change the rotation or position values of this empty object by the amount you want the object to offset when you grab it.
Up and Coming
February 18, 2018

Galactig said:

set up a an empty gameobject at position (0,0,0) and rotation (0,0,0) in the unity scene. attach this as your snap offset transform in the ovr grabbable script. change the rotation or position values of this empty object by the amount you want the object to offset when you grab it.


this does not work for me.
Participant
March 25, 2018
I'm also struggling with this. It seems the object is being offset, but not as expected. If I use an unparented Empty at the origin, it still places my object a few meters away.  I can't seem to find any additional documentation or code comments.   Thanks!
April 18, 2018
Same thing happening for me, the object is way offset from the hand and changing the snap offset transform does nothing? Anyone ever solve it? Thanks

Inspiring
April 18, 2018
The empty game object for the snap have to be on the scene (unparented) NOT a child of the hands object..... at least that fixed it for me.... 

Also make sure to check Snap Position and Snap Rotation on the Grabbable script....
New Participant
April 19, 2018

digibix said:

The empty game object for the snap have to be on the scene (unparented) NOT a child of the hands object..... at least that fixed it for me.... 

Also make sure to check Snap Position and Snap Rotation on the Grabbable script....


Hmmm, I have the empty GO at (0,0,0) and when I grab an object it still has an offset 
Participant
July 4, 2018
I still have not been able to get this to work properly. Have there been any updates? Thanks!
Participant
January 7, 2019
Just a bump. As of January 2019 this bug still exists. For me, having the empty GO placed at (0,0,0) with (0,0,0) rotation gives the grabbable object a few meters offset anyway. I've also noticed that the amount of offset changes, and is not consistent (i.e. it's not always 2 meters off in the x direction. It might be 1.342 in the x and another amount in the Y and Z and then on it's next grab it will be completely separate numbers for each value). Either we are all completely not understanding how the Snap Offset is supposed to be used (a demo scene would be LOVELY :D) or it has been bugged for over a year. This was all checked with the latest version of Oculus Integration on the Unity Asset Store (Version 1.32 released on December 19, 2018) and is still bugged.
New Participant
October 31, 2019
Same problem here! Exactly what StitchesOTH is describing. Any news?
Cheers!
New Participant
February 6, 2020
I think that this snapOffset is get World Position