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

HandsManager bug? (Academy Holograms 211)

jtthjtth
edited November 2017 in Questions And Answers

Holograms 211 - Holo Academy

In Holograms 211 MSFT uses a script, HandsManager.cs, to detect when the user's hand is being tracked. If a users hand is being tracked a boolean, HandDetected, is flipped.

HandsDetected determines if the hand is currently detected or not by tracking the hand detected state and returns true if a users hands is detected.

HandsDetected is also set to true upon the HoloLens clickers first input. After this initial input it appears to not have any effect on the HandsDetected boolean.

Is this the intended behavior? Is it possible to prevent the clicker from interacting with HandsDetected when its first input is sent?

Asking this because I have a system in place that makes a custom GUI visible when the users hand is present, and invisible when their hand is not. In addition to this GUI, I'm using the clicker for different behaviors when the users hand is not detected. Unfortunately as mentioned prior, when the clicker sends its first input it flips HandsDetected and causes undesired behavior.

This isn't a huge issue but it hampers the programmatic ability to make a holographic app dummy proof.

Best Answer

  • Options
    jtthjtth
    Answer ✓
    private void InteractionManager_SourceDetected(InteractionSourceState hand)
    {
        if (hand.source.kind == InteractionSourceKind.Hand)
            HandDetected = true;
    }
    

    This should work. Added a simple check to ensure the source being detected is the hand. Alternatively one could check to ensure the source kind is not a controller.

Answers

  • Options
    jtthjtth
    Answer ✓
    private void InteractionManager_SourceDetected(InteractionSourceState hand)
    {
        if (hand.source.kind == InteractionSourceKind.Hand)
            HandDetected = true;
    }
    

    This should work. Added a simple check to ensure the source being detected is the hand. Alternatively one could check to ensure the source kind is not a controller.

Sign In or Register to comment.