Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Problem when trying to disable a layer in RigBuilder

Discussion in 'Animation Rigging' started by szymongame90, Feb 23, 2020.

  1. szymongame90

    szymongame90

    Joined:
    Jan 4, 2019
    Posts:
    4
    Hi,
    I have encountered a strange problem when using the Animation Rigging package. At the moment of character's fall I would like to disable the Animator and all active layers in RigBuilder and then activate ragdoll (colliders, rigidbody).

    1.JPG
    After performing these actions, one of the bones is moved to a strange place.
    2.JPG

    The problem does not occur if I first turn on the active layer in RigBuilder and then the animator, however it causes the bone to reset to the default position. How can I solve this problem, the easiest way?
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,

    Difficult to say what goes wrong here without looking at your setup.

    Disabling the Animator should suffice to also disable Animation Rigging, so you shouldn't need to also disable layers. Is it possible you're disabling the Animation Rigging layers first (thus disabling constraints) and then the Animator?
     
  3. deecsaunders

    deecsaunders

    Joined:
    Jun 9, 2018
    Posts:
    2
    How do you actually disable a rig layer?
     
  4. shauryajuneja30

    shauryajuneja30

    Joined:
    May 25, 2021
    Posts:
    1
    I Would like to know it too. Have you figured it out?
     
  5. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    In the RigBuilder interface, you can easily uncheck the layer to disable it.

    Rig Layer.png

    Or in code, by doing something like so

    Code (CSharp):
    1. var rigBuilder = myGameObject.GetComponent<RigBuilder>();
    2. rigBuilder.layers[0].active = false;
    This will not remove the rig layer from the PlayableGraph at runtime however. Instead, this will behave the same as if you would have set the weight of either the rig or the constraint to zero.
     
    crasnencov and raniaaaaa like this.
  6. wherecaijii

    wherecaijii

    Joined:
    Jul 9, 2023
    Posts:
    4
    It does not work! And Animator can not be disabled when using animation rigging.
     
    Zai-shen likes this.