Search code examples
mrtk

MRTK v2, how do you make an object dragged by the pointer, stay straight out from the controller?


In the MRTK v2 HandInteractionExamples.unity, when you drag an object with the controller, it acts like it is connected to a fishing line, where pointing the controller in a different direction curves the pointer line, and the object doesn't stay in front of the controller.

The Cliff House in Microsoft's MR Home, has the type of action I am trying to duplicate. You click on an object with the controller and drag it around. The object lags a little bit as it lerps to the new position, but it ends up straight out from the controller. How do I duplicate that control in the examples they provide?

I have made adjustments in a new profile I created, and have modified the DefaultControllerPointer code directly, but to no avail. I am not finding anything in the forums that has helped.


Solution

  • This sounds a lot like https://github.com/microsoft/MixedRealityToolkit-Unity/issues/5203, which is something that the MRTK team also observed in some internal builds. Looking at HandInteractionExamples in the latest code in the mrtk_development branch (as of 8/8/2019), this should be addressed.

    See if you can grab the latest code from mrtk_development - this should make its way into a new release in the near future.