Search Unity

Bug AR Selection Interactable component doesn't work on GameObjects with Rigidbody on Parent

Discussion in 'AR' started by rsauchuck-gp, Dec 16, 2022.

  1. rsauchuck-gp

    rsauchuck-gp

    Joined:
    Jan 21, 2020
    Posts:
    17
    I have a GameObject "cube" made up of child quads.
    I rotate this cube by adding torque via UI joystick (I need to be able to rotate it on multiple axises so using the AR Rotation Interactable was not an option).
    Each Quad has an AR Selection Interactable component so that the user can select a face on the cube.
    However none of the faces are actually selectable in the build.
    I did some experimentation and discovered that adding a Rigidbody component to a Game Object breaks the AR component.
    I got around this by removing the faces from the hierarchy of the empty Rigidbody GO and putting them into a second GO that matches its position and rotation via code in the FixedUpdate.

    This seems like a huge bug to me (unless I am doing something wrong in my implementation of the AR Selection)

    This is for iOS/ARKit
     
  2. rsauchuck-gp

    rsauchuck-gp

    Joined:
    Jan 21, 2020
    Posts:
    17
    I just tested this again. I CAN AR Select game objects with rigidbodies that are on the same object but I can't select them if their PARENT has a rigidbody