Skip to main content
Corysia
Up and Coming
July 29, 2019

Implementing a Sliding Drawer

I've been trying to figure out how to implement a drawer.  I was able to solve this using VRTK, but I would like to know if it is possible to do with the Oculus SDK.  What I have run in to can be seen in this video.  https://www.youtube.com/watch?v=VXUo94cvaZc and I believe it's because the OVRGrabbable script makes the hand the parent of the object, allowing it to rotate, while the RigidBody has kept it locked on the X axis.  If someone has an example or a tutorial of how to do this, I'd really like to see it.
This topic has been closed for replies.

3 replies

New Participant
August 1, 2019
How is the RigidBody configured on the dresser itself?
Corysia
CorysiaAuthor
Up and Coming
August 7, 2019
There's a RigidBody on the parent object, the dresser, that has Is Kinematic and Use Gravity checked.  The rigid bodies on the drawers is set to neither 'Use Gravity' nor 'Is Kinematic'.  It has freeze position of Y and Z checked.  And freeze rotation is checked for X, Y, and Z.
VR Development: https://discord.gg/8R9SHQP Quest Example: https://github.com/Corysia/Unity-Oculus-Example
Corysia
CorysiaAuthor
Up and Coming
September 17, 2019
I ended up solving this with a technique Valem posted on YouTube.
VR Development: https://discord.gg/8R9SHQP Quest Example: https://github.com/Corysia/Unity-Oculus-Example