Search code examples
unity-game-enginehololensmrtk

MRTK Object Manipulation : why is my 2D object not interactable?


[EDIT] I can now see the bounding boxes but can't interact

I'm trying to add some interaction to my app. Basically I have a 2D Sprite and I want to be able to scale and rotate it using both hands.

To do that I followed the documentation about object manipulator and added the following settings : enter image description here

I also added a Box Collider 2D to my element and the NearInteractionGrabbable script from MRTK.

The problem
However, I can't interact with my object, I don't see any bounding boxes and the audio clip isn't playing.

What am I doing wrong ?

PS: I work on Hololens 1st gen, Unity 2019.4.36f and MRTK 2.8.2.0


Solution

  • Usually, we use 3D colliders in HoloLens for interaction. And as far as I know 3D colliders and 2D colliders cannot work together in Unity, so here you can try to add a 3D collider to the 2D sprite.