so, I’m making a sign language project, and the way iv made it is if I have a word in my string, and it matches an animation I have in the “Any State” state machine, play animation. But they don’t smoothly transition between each other. Here is what I have
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Asl : MonoBehaviour
{
private string[] strArray;
public string str = ("");
private int amount = 0;
private Animator anim;
public void Start(){
strArray = str.Split(' ');
anim = GetComponent<Animator>();
}
public void LateUpdate()
{
if(amount < strArray.Length)
{
anim.Play(strArray[amount]);
if(anim.GetCurrentAnimatorStateInfo(0).IsName(strArray[amount]) && anim.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1.0f)
{
amount++;
}
}
else
{
anim.Play("Idle");
}
}
}