Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Do anyone know a way I can get the players body rotation data for vr?

Discussion in 'Scripting' started by shadow15919, Apr 8, 2021.

  1. shadow15919

    shadow15919

    Joined:
    Apr 2, 2021
    Posts:
    2
    I am using the oculus integration assets and was wondering how I can get the players body rotation and not the rotation of the user head. Im not sure how to do this. I just want the script to print out the rotation data whenever the user rotate their body in game in vr using the quest 2 controller. Any help would be greatly appreciated.
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,136
    Oculus doesn't have sensors on the body, so it doesn't have that information. You'd have to estimate it by taking into account the hand positions and head rotation. (It's possible the Oculus API might have something that does this estimation for you, I don't know the API well enough to say, but I can pretty confidently say that Oculus does not "know" your body position.)
     
    shadow15919 likes this.
  3. shadow15919

    shadow15919

    Joined:
    Apr 2, 2021
    Posts:
    2
    Oh, I meant the in game body rotation and not the rotation data of a person real body.
    I figure it out.
     
    Last edited: Apr 10, 2021
unityunity