Hello
I am making Character Controller by text sentence. If user types "Go straight", main character goes straight with walking animation. I did just "Go straight", I can't make character turn left and right. Is there anyone who can help me? Thanks very much
// Update is called once per frame
void Update () {
if(rx.IsMatch(ControlMsg))
{
animation.Play("walk");
transform.position += transform.forward * Time.deltaTime;
}
else if(rx1.IsMatch(ControlMsg))
{
animation.Play("turn left");
// Help me Here
}
else if(rx2.IsMatch(ControlMsg))
{
animation.Play("turn right");
// Help me Here
}
else
{
animation.Play("Idle1");
animation.Play("Idle1", PlayMode.StopAll);
}
}