Search Unity

Bug Hand animation when hideControllerOnSelect = true

Discussion in 'XR Interaction Toolkit and Input' started by zajcev-bb, Apr 11, 2021.

  1. zajcev-bb

    zajcev-bb

    Joined:
    Aug 14, 2020
    Posts:
    4
    Selecting a grabbale object turns off the hand game object (m_ModelGO).
    XrbaseController:
    Code (CSharp):
    1.         public bool hideControllerModel
    2.         {
    3.             get => m_HideControllerModel;
    4.             set
    5.             {
    6.                 m_HideControllerModel = value;
    7.                 if (m_ModelGO != null)
    8.                     m_ModelGO.SetActive(!m_HideControllerModel);
    9.             }
    10.         }
    The effect is that every animation of the hand is being stopped.

    At first i thought about rewriting those 2 lines and turn off the mesh renderer instead of whole object but u never know where the renderer is placed in the hand prefab structure.. :/

    So
    1. how about an event instead of deactivation? Il be able to turn off the renderer myself. Execute event if its defined and deactivate if its not defined.
    2. make XrbaseController: PerformSetup public to make it possible to force reinstantiate the hand model on deselect

    i would like to decide on which grabable i should turn off handModel and which not to so.. an event would be best.
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    The team has reviewed this request, and will look towards making improvements to the API in the future. Thanks!