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

  • jtthjtth
    Accepted 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

  • jtthjtth
    Accepted 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.