I' fairly new to development for Oculus in Unity, but I could already learn how to grab (with hands and controllers) some simple objects. But I face an issue to grab and rotate a door with handles. I use the Oculus Interaction SDK.
In my scene, I have a door made of a hierarchy with a main "pane" (the door itself) and 2 handles, like this:
- wholedoor (with rigidbody+box collider+grab interactable+handgrabinteractable+Onegrabrotatetransformer+Grabbable)
I tried to set grab features using collider of either the doorpane (as described above) or one of the handles (then removing collider and rigidbody from 'wholedoor' and create that in "handleinside").
But in both cases, when I build and upload the Oculus, the door disappears. To be precise, in setup a sabove, the entire door (incl handles) disappear, and if I setup collidr/rigidbody on a handle, then the handle disappears while main doorpane remains, but nothing is grabbed and rotate..
I read on other forums that in XR Interaction , there was some reparenting issues in the past making objects to disappear (cf this topic: here ) but I can't understand if it's same problem here.. nor how to fix it simply.
Any idea ? Is it really impossible to grab a "complex hierarchical object" ? Since I'd like to make some furniture drawers grabbable, doors, etc., I'd prefer keeping whole editable hierarchy instead of flatteing everything to ehses with UV Maps for textures..
After painful investigation and comparison with some examples provided by Oculus SDK, I could make it work using 2 tricks:
-using an extra layer of grouping above the group of objects and adding the rigidbody at that level
- and in below group, having:
-- "interactable group view"
-- and usual Grab interactable, Hand Grab Interactable, Grabbable (and in my case a One GRab Rotate Transformer")
- and having Box Colliders attached to the various objects of the group.
I don't know if that's the most elegant way to handle, but it works..