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.

Air tap is not working with spatial understanding

I am trying to explode an object by tap gesture. Its working without implementing spatial understanding. the below is what i did,

private void GestureRecognizer_TappedEvent(InteractionSourceKind source, int tapCount, Ray headRay)
{
if (_objectInFocus == null)
return;
_objectInFocus.SendMessage("DoExplode");
}

i handled ‘DoExplode’ event in another c# script. Its working fine without spatial understanding. Can anyone help me to figure out?

Answers

  • @AravindSiva,

    It depends on what you are doing with Spatial Understanding. The only thing I can see happening is if you are adding planes between you and the object, which might block it. Alternatively, maybe your Spatial Understanding code is failing somewhere, or not completing, and that's why the tap isn't registering? Have you added a remote debugger to determine if your tapped event is being called and if your spat understanding code is completing correctly?

    James

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • @james_ashley,
    Thanks for the response. Spatial understanding is working fine and it can successfully scan the room. I have checked with break points in tap gesture function. But it was not getting called at the same time gaze is working fine, so nothing is blocking between me and the Object. If I remove the spatial understanding prefab, tap gesture is working. Can't figure out what is the problem.!

  • Not sure if it'll solve the problem, but you could try implementing the IInputHandler interface from the HoloToolKit possibly? And do the same thing you are doing here inside of the OnInputDown/OnInputUp methods instead.

    AR Developer

Sign In or Register to comment.