Hi, the animator for this project and I have been working on this combat system whereby we were planning on controlling Mecanim’s speed since we needed to control a state’s speed at runtime. Unfortunately, when trying the following code out, we get absolutely no change in the playback speed of mecanim;
void Update() {
activeState = animator.GetCurrentAnimatorStateInfo(0);
if (activeState.IsName("someAnim")) {
animator.speed = 0.01f;
} else {
animator.speed = 1;
}
}
I went on to test this further and even setting animator.speed = 0.1f during the Awake() function had no affect on the actual speed of the animations.
Am I missing something here? Is Animator.speed supposed to function differently than AnimationClip.speed?