- Home /
How to register/unregister pointer sources in Mixed Reality Toolkit?
I'm working with the MRTK in Unity on a VR app that uses motion controllers. I have the standard setup with the MixedRealityCameraParent and associated scripts, and free teleportation enabled, but I can't seem to find where to set which objects are registered as pointer sources. Currently, it starts the scene with the pointer source being the headset, and I can switch it to either of the controllers by clicking the trigger. But I would like to have it default to one of the controllers and stay there.
Can anyone tell me where in the MRTK scripts this functionality is set?
Answer by keveleigh · May 24, 2019 at 09:40 PM
This sounds like you're using the HoloToolkit / MRTK v1 (please correct me if I'm wrong!).
In HTK, this behavior is handled in the SimpleSinglePointerSelector: https://github.com/microsoft/MixedRealityToolkit-Unity/blob/htk_release/Assets/HoloToolkit/Input/Scripts/Focus/SimpleSinglePointerSelector.cs#L114.
You should be able to edit the code to make it default to a controller of a specific handedness, as well as set autoselectBestAvailable in the Inspector to have it jump to a controller without the trigger needed to be pulled.
Your answer
Follow this Question
Related Questions
Mixed Reality (Odyssey) controllers not tracking with SteamVR interaction system! 0 Answers
How can I convert my desktop viewer to a virtual reality side-by-side display? 0 Answers
user input 1 Answer
Microsoft surface 3 virtual keyboard c# 0 Answers
Publishing iOs app with Unity running in VirtualBox? 1 Answer