iMSTK Unity & XR Interaction Toolkit

Hello, I am trying to develop a VR application using iMSTK in Unity together with the XR Interaction Toolkit. Is this possible? My own attempts haven’t yielded much. For example, I experimented with the Syringe in the Grasping example scene. However, when I pick up the object with the Oculus controller, it doesn’t interact with either the Sphere or the Cube. Thank you in advance!

So have a look at the UnityController scene, it uses the UnityDrivenDevice to enable direct interactions between unity input and imstk. Imstk physics is not interoperable with unity physics. If you want to utlize it you will have to model the physics in imstk and attach the unity input similarily to what’s being done in the UnityController scene. And use the UnityDriveDevice to drive an imstk controller with a the Oculus controller.

1 Like

I found the problem. When I saw UnityController scene in your answer, I understood. I had downloaded iMSTK from the Unity Asset Store. When I checked the Git repository, I realized that I was using an old version. I am starting to understand and develop things now. Thank you very much!

1 Like

I think the UnityController is in the 2.0 release but we have added some performance improvements and other updates to the current main branch, i hope everything works out for you.

Following Harri’s suggestion, I am integrating the XR Interaction Toolkit into the UnityController scene. I have set the Syringe (iMSTK physics) as a child object of the Left Controller (Unity physics) and the Cube as a child object of the Right Controller. The hierachy in Unity is set as shown below. I am able to move the Cube using the right Oculus controller, but I cannot move the Syringe with the left one. I would greatly appreciate your help with this. Thank you!

image

I’m not an expert here but if you want to grab the syringe or cube I think you should remove the cube or syringe from the controllers and place it in the scene as a gameobject and then add to it an XR grab interactable along with a rigid body component