Recreating Tap to place in MRTK 2
Hello every one, I'm trying to recreate the TapToPlace interaction with the objects using Surface Magnetism, but I need to apply Ignore Raycast to the object so the object don't "snap" with the main camera, but after that I can't interact with object.
Was someone able to recreate the same interaction with this new version?
@cre8ivepark I think that you've got the most solvers expertise on the team. Can you help out with this one? If there's more information required here please let us know.
@migueltiago and @wiwei, I figured out a decent work around until the "Tap To Place" 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.
Since your wanting to use the magnetism solver, you might need to change this a little bit to make it work for what you are wanting.
How do you set it up? After selecting (=deselect), the object goes back to the origin?
Dupe of #4515