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

Fitbox.cs

In the hololens tutorial Hologram 210, the Fitbox.cs was used to make the hologram academy logo locked to the user's head. But if I change the name of this piece of code to "Fit.cs" or "Trial.cs", it won't work even if the codes are exactly the same. Does anyone know why the name of "Fitbox" has a magic power? Thanks!

Answers

  • Options

    Continuing, I have commented out most of the code in Fitbox.cs but the blue "Hologram Academy" logo still moves with me in the Hololens. Has anyone really successfully handled the code of Fitbox.cs? It's so weird to me how this code works!

  • Options

    When you rename the source file from Fitbox.cs to something else like Trial.cs, you also need to rename the class contained by the source file. This is a Unity thing.

    The "Holographic Academy" logo is a child component of the Fitbox prefab. Its motion is controlled by the parameters passed to the Interpolator object in Fitbox.Start() and Fitbox.LateUpdate(). The Interpolator object itself is created in Fitbox.Start().

  • Options

    @timg
    Thanks for your reply! I created a new project and a new game object in that project. I copy and paste the Fitbox.cs code and drag it to the new game object. But the hologram won't move with my head in this case. It turned out that Fitbox.cs only works in the original project downloaded from Hololens tutorial (I created a game object in the original project and drag the Fitbox.cs in, it works!). Is this due to the Fitbox prefab? Do you have any idea why this happens? Thanks a lot!

  • Options

    Fitbox also requires Interpolator.cs.

Sign In or Register to comment.