microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6.01k stars 2.12k forks source link

How do you exclude objects from gaze input? #514

Closed StarWardo closed 7 years ago

StarWardo commented 7 years ago

I am looking for a way to let the Hololens ignore certain objects that would not be affected by gaze input. When a gameobject is inside another gameobject (for example a glass orb) they cannot be tapped.

StephenHodgson commented 7 years ago

I actually just merged a PR that addresses this exact issue. https://github.com/Microsoft/HoloToolkit-Unity/pull/510

You'd want to assign an overridden focused object.

Also, you can assign objects to specific layers and on the InputManager's Gaze Manager remove the layer you'd like to ignore. capture

Or if you do not require physics calculations, simply remove the collider from the object.

StarWardo commented 7 years ago

Sorry that I missed that, thanks a lot!

S-Hodgson-MMOARgames commented 7 years ago

No worries, glad I could help.