The question is answered, right answer was accepted
Animation shakes between animation and idle,Animations shaking while playing
Hey guys, I have this issue where when I play an animation via button, the animation trembles between the animation and the static object. When triggered through the animator's trigger though, it plays perfectly. I also can't see the blue lines that indicate how far up the line the animation is.
!NB - This is an AR Vuforia project
Code Appendix:
Button script:
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class OwlFly : MonoBehaviour { public Animator myOwlAnimator;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void OnTouchDown() {
myOwlAnimator.SetTrigger("FlapWings");
}
void OnTouchUp()
{
}
void OnTouchStay()
{
}
void OnTouchExit()
{
}
}
,Hey guys, I have an issue where the animations that I play via button shake between the animation itself and the idle state of the animator controller. If triggered manually by pressing the trigger on the animation controller though, they play perfectly. The scripts on the buttons are simple OnClick events that set off the trigger. I've also noticed that the blue bars that indicate how far along the line the animation is are missing. Any ideas on what could be causing the issue?
!NB - This is an AR Vuforia project
Code Appendix: using System.Collections; using System.Collections.Generic; using UnityEngine;
public class OwlFly : MonoBehaviour { public Animator myOwlAnimator;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void OnTouchDown() {
myOwlAnimator.SetTrigger("FlapWings");
}
void OnTouchUp()
{
}
void OnTouchStay()
{
}
void OnTouchExit()
{
}
}
Under normal circumstances I'd think it's an .fbx export problem, but no issues can be seen in neither preview, nor the actual run state, when triggered manually by the trigger. It's not the application jumping in between states, as removing the transition for the animation back to idle still doesn't solve the problem.
Update: I managed to get the progress bar on the animator states to run. Strangely, when pressing a button, the animation plays, but the state progress bar keeps looping on idle.
Answer by Vox94 · Dec 08, 2017 at 08:01 PM
Turns out, that I had extra animators on different objects in the scene, which caused this. Problem solved :)