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.

HoloLens AR Unity app, how to simulate controller, point, click etc?

StuartStuart
edited October 2018 in Questions And Answers

Hi all, totally new to this but google isn't bringing much help.

I've created a test app on Unity which runs in the Mixed Reality Portal, however I can't see the usual 'pointer' which is necessary for interacting with things in the app.

For example, the standard Mixed Reality Portal environment looks like this (note the controller/pointer):

Then I go to the built project which I've exported from Unity, and run it (from a .appx file - using debug from Visual Studio doesn't seem to work), and the Mixed Reality Portal loads this:

The test app I've made is an empty environment with a couple of 3D shapes in front of the user, so this looks sort of promising, sans the 3D shapes.

Then I click the mouse once and end up with this:

I can use the arrow keys to simulate walking and looking around, but the controller has gone.

Is there something I've missed? Do I need to set something in Unity?

I'm new to Unity too, but looking through AR tutorials I can't see what I've done wrong.

Also, if I hit the Windows key it takes me back to the first image, and I can't find any way to get back to my test app without leaving the Mixed Reality Portal and manually loading it again from the folder it's saved in. Is there something else I should know about regarding that, too?

Thanks.

Best Answer

  • StuartStuart
    Answer ✓

    Well, that was easy!

    Turns out the visual depiction of the controller isn't actually necessary in the emulator. That's just a fancy addition Microsoft uses for its Mixed Reality Portal.

    I added some scripts to deal with clicks etc so the objects in the scene do stuff. They react as expected via some 'Gaze' and 'RayCast' methods I added.

    All good.

Answers

  • StuartStuart
    Answer ✓

    Well, that was easy!

    Turns out the visual depiction of the controller isn't actually necessary in the emulator. That's just a fancy addition Microsoft uses for its Mixed Reality Portal.

    I added some scripts to deal with clicks etc so the objects in the scene do stuff. They react as expected via some 'Gaze' and 'RayCast' methods I added.

    All good.

Sign In or Register to comment.