When the lerping is over and t value reached 1 the anim.Play stop playing the state animation.
Instead it should keep playing it on maximum value.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveTurn : MonoBehaviour
{
public float moveSpeed;
public float rotationSpeed;
private Animator anim;
public float minimum = 0.0F;
public float maximum = 1.0F;
public float duration;
// starting value for the Lerp
private float t = 0.0f;
// Start is called before the first frame update
void Start()
{
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update()
{
transform.Rotate(Vector3.up * Time.deltaTime * rotationSpeed);
t += Time.deltaTime / duration;
float value = Mathf.Lerp(minimum, maximum, t);
anim.Play("Walk",0,value);
}
}