I've removed my previous post and will write it again. So I've been looking through the OVRTouch stuff and I believe to make objects that can't be moved/held when grabbed, I have to use HandPose.
Does anyone know where the documentation is for this or has anyone used it prior? I'm trying to setup handles and such that a player can turn but not walk away with.
Like Chris said majority of the games just hide the hand or have it visible and snap it off if hand moves too far so it might be best to ignore the whole hand pose system..
For the actual code to move the objects there are a lot of tutorials around the net for draggable doors, levers or drawers with mouse where you could just replace movement with hand, search for amnesia unity for example or check VRTK source/demos. Most common way is to just use hinge joints or configurable joints.
Thanks to everyone who tried to help me with this.
What I've actually gone ahead and done is created a 'Sprint Joint' between the Hand and the Objects in Question.
When the Objects are not being grabbed (Draws for example) they're set as Kinematic so that they don't move. Grabbing them makes them not Kinematic and makes the Spring Joint work, so they slide towards the hand based on the joint they've been setup with.
You can see unticking 'Allow offhand grab' on the Lava Box does nothing, I can still pick it up from the main collider that's not assigned to the Grabble script. There's a single small box collider that's at the far right of the object, only that one should be grabbable.
That aside you can see I try setting my Hand Pose to None, Snap & Snap Position. I want to control where the Object will be in the hand or where the Hand will be around the object, these don't seem to be working though? I've set my Hand Pose's X, Y, Z positions as I'm assuming Snap Position references this?
Any help getting this working would be extremely appreciated!
I have a secondary script I have made that works along with grabbable.
So for example on a sword I add grabbable and my script.
The sword pivot is where I want to grab but the rotation maybe incorrect (Im using store items so not always how I need out of the box). So I also have a vector3 m_initalRotation value that if I need to rotate a model on pickup it does that.
I also have bool m_doSnap = true, where if set then on grab I parent the item to the hand and zero out the local transforms which gets the item in the right place. Then unparents again.
Pretty archaic, but works for me.
I leave Allow offhand grab on as then I can actually reposition the hold using both hands ad it feels quite realistic.
Also... Looking at your video..you have 2 box colliders. On grab maybe the item and the hand colliders are clashing so you can never get the item into the hand ...have you tried setting the item boxcolliders to triggers?