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

Resolved A Collider used by an Interactable object is already registered with another Interactable object.

Discussion in 'XR Interaction Toolkit and Input' started by mcbauer, Feb 16, 2022.

  1. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    498
    [RESOLVED] A Collider used by an Interactable object is already registered with another Interactable object.

    I have 2 XR Grabbable objects, a bolt and a wing nut. The wingnut is a child of the bolt.

    There have been no issues with this setup until a few minutes ago, and now the wingnut just falls directly on the floor at startup. If I remove the wingnut as a child of the bolt all is well.

    It needs to be a child of the bolt however because the user needs to pick up the bolt, and pull the wingnut off.
    Like I said, this was working fine until it stopped.

    How do I get around this?

    For more BG: this setup is duplicated technically 4 times in our scene as this item is used frequently. However, when it runs, there is only 1 active
     
    Last edited: Feb 17, 2022
    FarmerInATechStack likes this.
  2. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    257
    Hi @mcbauer,

    If you have 2 XR Grab Interactable objects (one as a child), you will need to explicitly set the colliders in the parent XR Grab Interactable component or it will automatically find all child colliders and add them to the collider list, including colliders already registered or belonging to a child XR Grab Interactable.

    Let us know if this solves the issue you are dealing with.
     
    FarmerInATechStack likes this.
  3. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    498
    Yes that does look to have solved it, thank you.

    Another problem was the collider on the parent was pretty huge, as in, how did it ever work?!

    So is it fair to assume that if grab interactables have colliders specifically set, it will try to generate any outside of that list?
     
    FarmerInATechStack likes this.
  4. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    257
    That’s correct, it will not automatically change the colliders in the list if they are initially set in the component.
     
    FarmerInATechStack and mcbauer like this.
  5. FarmerInATechStack

    FarmerInATechStack

    Joined:
    Dec 28, 2020
    Posts:
    55
    Thanks for this - solved my issue too!
     
  6. DevTom81

    DevTom81

    Joined:
    Aug 10, 2021
    Posts:
    8
    Hi, i have the same problem.
    How do i set the colliders in the parent XR Grab Interactable component? I don't know how to achieve this.
     
    Last edited: Oct 12, 2023