Search Unity

Question Can the physics capsules that are part of OVR skeleton be used as OVRGrabber volumes

Discussion in 'VR' started by jeromegold, Mar 14, 2021.

  1. jeromegold

    jeromegold

    Joined:
    Apr 7, 2020
    Posts:
    47
    Hi,

    I'm using hand tracking in a project as per the document:
    https://developer.oculus.com/documentation/unity/unity-handtracking/

    The hands work on the Quest.

    I've attached OVRGrabber as well to the OVRHandPrefab but am struggling with adding collision volumes for OVRGrabbber.

    Firstly, I can't actually see the hands in my scene (it works fine on the Quest) - so it makes it hard to place the collision volumes. (Also, I am unsure exactly why the collision volumes are necessary with OVRGrabber - i'm guessing that's how the "hands" know that they can grab an object").

    But I was wondering if it would be feasible to use the physics capsules that can be enabled with the OVRHandPrefab as the volumes for OVRGrabber? (If anyone thinks this would work I guess I could write the code to reference the physics capsules, if it can't be easily done in the viewport alone).

    Thx.
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    This looks to be an issue with the Oculus Integration Asset, which Oculus manages. Please raise this with their support team.
     
  3. anguloriosalexander

    anguloriosalexander

    Joined:
    May 25, 2021
    Posts:
    2
    I've been working on something very similar and had the same issues you described. You've probably had lots of your questions answered already, but I'll throw in my two cents in case they're of benefit to you.

    First off, I may be misunderstanding your first question, but do you have your quest connected to your pc via Link cable? You can use any usb c cable, even the one included with your headset, and that way you can run your project in play mode and see everything in the scene move in real-time. If you're already doing this, just click on your hand prefab in the Hierarchy and press f, it should focus on the hand object in the scene window.

    For your second question, I found out through some experimentation and this thread that the physics capsules are generated at runtime, making it pretty hard to use them with OVRGrabber. If you run the scene in play mode with the method above, you can actually see this new Capsules object created under the hand prefab. In theory, you could have your script add all the capsules right after they're created at runtime, but you'd probably have to modify some things in OVRSkeleton (I haven't tested this, so I can't vouch for how simple this may be or how it will affect other things).

    Let me know if you were able to solve your issues, I'm also trying to figure this out so any input would also be helpful, thanks.