Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Approximating Body Position/Rotation (SteamVR)

Discussion in 'AR/VR (XR) Discussion' started by JD_Designer, Apr 26, 2017.

  1. JD_Designer

    JD_Designer

    Joined:
    Sep 1, 2015
    Posts:
    111
    Hi everyone!

    Thanks in advance for any insight. I was wondering if anyone had a good solution for approximating body position using only the tracked headset and two Vive wands - eg: assuming we create a cube representing a users upper body/chest, is there a algorithm for approximating which direction the body is facing.

    I could link the body cube to the tracked headset, but then it will incorrectly rotate when the user only rotates their head/neck (and not their body). My thought was to find the average position/rotation of the two tracked wands and extrapolate from that value, however I can see how this doesn't solve the problem 100%. Any thoughts?
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Body could be in any orientation irregardless of what these data points (hmd/con/con) look like, so they're not useful for accurate estimations of the body orientation. You could always whip something up that assumes stuff, but it would be inaccurate in many, many cases.
     
  3. JD_Designer

    JD_Designer

    Joined:
    Sep 1, 2015
    Posts:
    111
    Yes. That was my thought, but I was hoping for something clever that would get me close. I'm going to try and get the average rotation/position of the controllers against the average position/rotation of the headset and see if that gets me half way.

    Edit: or rather parent the body cube to the headset's position and get its rotation from the averaged y rotation of the tracked controllers and headset.
     
    Last edited: Apr 26, 2017
  4. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Check out the VR setup from Final IK on the asset store.
     
    R3volve and JD_Designer like this.
  5. JD_Designer

    JD_Designer

    Joined:
    Sep 1, 2015
    Posts:
    111
    Will do! Thanks.
     
  6. R3volve

    R3volve

    Joined:
    Apr 9, 2017
    Posts:
    6
    Thank you Selzier, This is EXACTLY what I have been looking for and utterly unable to find.
     
    Selzier likes this.