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

Tracking loss in Unity

The following page talks about tracking loss in Unity if we would like to use Hololens in a dynamic environment.
https://developer.microsoft.com/en-us/windows/holographic/tracking_loss_in_unity
But I failed to really achieve this in Hololens. There were two pieces of code in the page. Could anyone explain if I should create a new script and drag the script to my object in Unity or should I add the code to the original code of an object? Could you help me understand how to really make tracking loss work? I have some difficulties understanding the above link. Thanks a lot and happy new year!
Thanks,
Kai

Answers

  • Options

    @kzhang3,

    I created a simple script containing only the WorldManager.OnPositionLocatorStateChangedEvent. And added that script to an empty game object in the Hierarchy.

    In addition, I disabled the "On Tracking Loss Pause and Show Image" option in Edit > Settings > Player > Splash Image.

    After building and deploying to my HoloLens, my application no longer shows the tracking lost message.

    Thanks!
    David

  • Options

    @DavidKlineMS ,
    Thanks a lot for the reply! Let me back up a little bit on my goal. I would like to make some holograms that can move with a car so that the passenger can look at it in the car. I use Fitbox.cs (the code from tutorial Hologram 210) to make the holograms as head locked. This works out pretty well when the car moves slowly but when the car drives faster, the hologram will disappear. As the "tracking loss in Unity" web page says, "all content will seem to become body locked during tracking loss if nothing is done to handle it". Thus, I try to use the code you mentioned to turn off the environment tracking. As the car drives, I guess Hololens will loss tracking of the environment so that the holograms will become body locked and still show up in front of the user.

    For now, if I just use the code you mentioned, the hologram won't move with my head. If I use both Fitbox.cs and the code you mentioned, the hologram will move with me pretty well when the car drives slow but disappear when the speed is around or above 15 mph. I wonder if you have any idea on why this happens? Thanks a lot!

Sign In or Register to comment.