Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

How can I get the Position and Rotation data of Head in Hololens?

Hello all .I am new here.
I'm attempting to write Unity code which will allow me to keep track of the user's head position and save these data for other use.
I know these data can see at the Device Portal's 3D View tab and I want to know is there any API can get these data.
Is there any difference between data on the 3D View tab and data get by the Camera.main.transform.position and Camera.main.transform.rotation .Thanks.

Best Answer

  • Options
    Answer ✓

    3Dview data and data from Camera.main.transform.position not the same are because I have not set the main camera's position to (0,0,0).

Answers

  • Options

    Hello and welcome to the wonderful world of Hololens development :)

    As you mentioned, you need to save the Camera.main.transform.position and Camera.main.transform.rotation values, but you also need to save the actual 3D scene object (if you want to later replay this relative the space, similar to the 3D View tab)

  • Options

    @papiot
    Thanks for your reply!
    But the most important I want to know is the transformation between data on the 3D View tab and data get by the Camera.main.transform.position and Camera.main.transform.rotation. Now ,I get 3Dview data and data from Camera.main.transform.position,but not the same. I want to konw why? thanks.

  • Options
    Answer ✓

    3Dview data and data from Camera.main.transform.position not the same are because I have not set the main camera's position to (0,0,0).

Sign In or Register to comment.