Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. And always feel free to hit us up on Twitter @MxdRealityDev.

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

  • @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

  • @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.