Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Each transition (arrows between animations) must have conditions, for example, a variable dependency (speed > 1). Ho, to use a variable for a condition, you need to create it in the parameters tab, these variables are set from scripts
private Animator animator;
private Rogidbody rb;
void Start() {
animator = GetComponent<Animator>();
rb = GetComponent<Rigidbody>();
}
void Update() {
animator.SetFloat("speed", rb.velocity.x);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question