Search Unity

Question Why animation babehaviour scripts can't control Animation Rig's weight?

Discussion in 'Animation Rigging' started by unity_408540137, Oct 24, 2023.

  1. unity_408540137

    unity_408540137

    Joined:
    Oct 23, 2022
    Posts:
    44
    I am using Animation Behaviour to control Animation Rigs' weight;
    Because each animation has its own pose or behaviour; therefore use animation behaviour to control Rig's weight seems reasonable;
    But I have a question.
    The follow is my scripts, and it really works for geting animation Rig's weight, and Debug.Log also show 0.0fl
    But the strange thing is that the targeted rig's weight still reamins 1.0f on the game Scene, contrast to Debug.Log shows 0.0f
    I can't figure out what happened to this contrast. Rig's weight shows two differnt number: 1.0f on the scene, 0.0f for animation behaviour




    The weird thing is, when I adjust the scroll of the weight on the scene, the weight really corresponds its number from the scripts debug.log in animation behaviour.
    Therofre this only works for one way. Weight on the scene can correspond to Scrips debug.
    But Animation behaviour can't afftect Rig's weight on the scene.