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.

How to get hand position in world coordinates

I want the user to pick objects in an intuitive way and using gaze based ray casting to the object is not something I am looking for. Therefore I need to create a vector from user's left or right eye to tap position of the user's hand. In order to do this I need the World Coordinate of the user's hand not the joystick like unit cube coordinates. Is this possible?

Tagged:

Best Answer

Answers

  • I'm not entirely sure on the math here, but you should be able to calculate the world position of the hand by combining the relative hand position with the camera's position.

  • Thank you for your answer, however does anyone knows how to do this actually?

  • Have you checked converters on Internet ?

  • Which converters? Could you provide a link or elaborate it please?

  • shftdshftd
    edited July 2016

    You have several converters on Internet that convert Cartesian coordinates into others coordinate systems (or vice-versa): that can be useful if you need an exact position conversion without doing calculations.

    However, looking at your situation, you'll need it for each hand's position so my previous answer won't be useful in your case.

    I'm not sure of what you exactly want but if by World Coordinates you meant Spherical Coordinates here is the conversion with the camera as origin:
    (xh, yh, zh) are your hand cartesian coordinates and (xm, ym, zm) are your camera cartesian coordinates (relative to the point (0, 0, 0), origin of Unity's world for example)

    r = sqrt ( (xh-xm)^2 + (yh - ym)^2 + (zh - zm)^2 )
    theta = arccos( (zh - zm) / r )
    phi = arctan( (yh - ym) / (xh-xm) )

Sign In or Register to comment.