HoloLens user position

4.2k views Asked by At

Is there a way to get the position of the HoloLens user? I want to send the position of user back to PC and then update my hologram accordingly. Is there a way to do so? I haven't been able to find any API using which I can send back user's location to my computer.

We can use the initial position and orientation of user as origin and then calculate everything relative to it.

5

There are 5 answers

1
Cameron Vetter On

The best way to do this would be to use the HoloToolkit-Unity. You end up adding a prefab called "HoloLensCamera" to every HoloLens project. The starting position and rotation for the root GameObject of HoloLensCamera are always 0,0,0. As you move around, the values of position and rotation are updated relative to your movement.

0
GreedyAi On

I recommend you to check sharingwithUNET in holotoolkit-unity or now Mixedrealitytoolkit-Unity. If you run app in the unity and also run the same app in the hololens you can see the location of the both app users. One you can control in unity and another is the location of the hololens user. When you move with your hololens you can see it updates the location in the app on computer in unity. I'm not sure if this is exactly what you need but I'm sure it will help you out if you check how it works.

Good luck!

0
Gentatsu On

Camera.main.transform is the position of the head.

0
Tania Chistyakova On

Hololens hasn't any API for getting altitude and longitude. All camera positions would be relative to initial.

You should choose the another way. Find any noticeable item at any wall (or floor, or sail). Attach Spatial Anchor to the item. And calculate positions to the anchor. Then share the anchor to all Hololenses in the room.

0
YPR On

The HoloLens create start position, it's 0,0,0. He can't give you a longitude/latitude value because he don't have a compass !