Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Object Manipulator not working in nested children?

Discussion in 'XR Interaction Toolkit and Input' started by weber_aias, Oct 22, 2023.

  1. weber_aias

    weber_aias

    Joined:
    Mar 5, 2022
    Posts:
    3
    Hello! I am trying to develop an app for the HoloLens 2/Windows using MRTK 3. The goal is to have a robotic arm, with 6 joints in IK and the user can grab and rotate each joint. The problem is that apparently nested logic does not work as intended with MRTK? It can't be... When I try to select a child joint, it defaults to a parent. For some reason out of 6 joints, the first two work perfectly, and all the rest just default to the second joint, followed by warning:

    A collider used by an Interactable object is already registered with another Interactable object. The T_Transform (UnityEngine.BoxCollider) will remain associated with L_BASE (MixedReality.Toolkit.SpatialManipulation.ObjectManipulator), which was registered before B_BASE (MixedReality.Toolkit.SpatialManipulation.ObjectManipulator). The value returned by XRInteractionManager.TryGetInteractableForCollider will be the first association.
    UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable:OnEnable ()
    MixedReality.Toolkit.StatefulInteractable:OnEnable () (at ./Library/PackageCache/org.mixedrealitytoolkit.core@b62d60687f8c/Interactables/StatefulInteractable.cs:199)

    A collider used by an Interactable object is already registered with another Interactable object. The T_Transform (UnityEngine.MeshCollider) will remain associated with L_BASE (MixedReality.Toolkit.SpatialManipulation.ObjectManipulator), which was registered before B_BASE (MixedReality.Toolkit.SpatialManipulation.ObjectManipulator). The value returned by XRInteractionManager.TryGetInteractableForCollider will be the first association.
    UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable:OnEnable ()
    MixedReality.Toolkit.StatefulInteractable:OnEnable () (at ./Library/PackageCache/org.mixedrealitytoolkit.core@b62d60687f8c/Interactables/StatefulInteractable.cs:199)

    This warning happens for all my nested objects.
    This is my first project using MRTK so I might be missing something completely obvious but I can't find anything, neither here nor on other websites...

    Screenshot 2023-10-22 043445.png

    Here in this picture I will try to explain! On the left you can see under "Plane" the logic of my hierarchy. In the actual game you can see, that although clearly the raycast during grab is on top of another joint, it is selecting the 2nd joint, as described. Grabbing it from up close has the same effect as well. So it doesn't look to be a raycast exclusive issue. On the right you can see my basic setup with object manipulator and bounds control. To be clear, I am working with the basic MRTK 3 settings proposed by Unity, for both the project as well as the hands and all that stuff. Please help!
     
  2. ericprovencher

    ericprovencher

    Unity Technologies

    Joined:
    Dec 17, 2020
    Posts:
    164
  3. weber_aias

    weber_aias

    Joined:
    Mar 5, 2022
    Posts:
    3

    Yes i had already seen that, but I couldn't really understand it! I kind of figured it out now! But now I have a new "bug". Highlighting each child also highlight the previous parents. So for example, hovering over the last child highlights all my parents. It is not a super annoying bug, but I'd rather not have it.


    In the picture I am just highlight the last joint , and on the right side I shown some of the current properties on object manipulator! Screenshot 2023-10-23 040626.png
     
  4. ericprovencher

    ericprovencher

    Unity Technologies

    Joined:
    Dec 17, 2020
    Posts:
    164