MixedRealityToolkit-Unity
MixedRealityToolkit-Unity copied to clipboard
Port over Tap-to-Place feature from HoloToolkit
Describe the problem
HoloToolkit has a Tap-to-Place feature that is missing in MRTK: https://github.com/microsoft/MixedRealityToolkit-Unity/blob/htk_release/Assets/HoloToolkit/SpatialMapping/Scripts/TapToPlace.cs
Describe the solution you'd like
Reimplement the Tap-to-Place feature in MRTK.
Not sure if this is helpful to anyone, but I figured out a decent work around until this script is available. I used the "Interactable" script and the "Orbital" solver components.
I then did a little bit of configuring to make it work how I want it to:
- I set up the interactable component to be a toggle button by changing the dimensions to equal 2.
- I then selected the "InteractableOnToggleReceiver" Event Type.
- Then I created a script that has two methods, one that turns on the solver and one that turns off the solver. (This is pretty easy, just get a reference to the "SolverHandler" and then change the boolean "UpdateSolvers" to true or false.)
- On the "OnSelect()", I have it set up to call the method that turns on the solver.
- On the "On Deselect()", I have it set up to call the method that turns off the solver.