When I applied the Rig setup to the player, added one IK constraint, and started playing the game, many things began to act strangely. For example, the IK target and hint are both snapped to the origin, the Rig weight is stuck at 1 (cannot be changed), and so on. I checked with the official documentation and various online tutorials multiple times to verify that my Rig setup was correct. When I switched to a simpler animator controller (one layer, one state with an idle animation) on the same Rig setup and model, the rig and the IK constraint seem to behave more correctly. I am starting to wonder if the Animation Rigging package supports Animator Controllers with multiple layers?
Edit: The Animator is running on a Generic ‘Animation Type’ with no ‘Avatar Definition’
I have a problem with the target and hint also. I am still trying to locate where the problem might be.
The target and hint jump away from start location in preview.
I am still struggling through the 1 key frame animation to keep the model in the place I place it. Preview, play or game play cause mine to switch locations.
In regards to your problem it might be something prior to what you are seeing.
I alleviated rig problems by using exporting Blender mesh only to Mixamo then downloading the model with an animation. Seemed to be less steps.
Interesting. I will do more extensive tests on simpler rigs as well. I really hope Animation Rigging supports more complex Animator Controllers or this is just a bug, since restructuring my entire animation layout would be disastrous
Hey @MMX3VIII , we have fixed issues similar to this one recently (link). Can you try updating to a newer version of Unity with this fix to see if it addresses your issue?
If it does not, please log us a bug using the Unity bug reporter so that we can have a look
Thank you for the reply! Unfortunately no that did not fix my problem. I tested on 2020.3.12f1 with the latest Animation Rigging package. I will file a bug report ASAP
Hey, we had a look at the bug you’ve reported us!
Thank you for that btw
So, the reason why the rig weight is locked at runtime is because writeDefaults is disabled on your state. If you enable writeDefaults you should see that the problem disappears.
Animation Rigging relies on the animation mask to decide whether or not it should read values from the scene (when values are not animated), or use the animation stream (when values are animated). However, when writeDefaults is disabled on a state, the animation system will force the animation mask for all properties, thus, forcing the animation stream into Animation Rigging.
Unfortunately, we can’t change this behaviour in the Animation system as it would break other workflows…
Alternatively, you could also add keyframes for the rig weight in your animation clips to drive the weight through animation instead of script.
Thank you so much for the detailed investigation!! It is a bit disappointing that Animation Rigging cannot support writeDefault on false (maybe the documentation guys can add a little note for future users? ;)), however it is real comforting that we have found the culprit to this behavior. I will search for a work around for writeDefault to get this package working and thanks again for all the help!