Hi everybody, my name is Nico and i’m new to Unity, i’ve been “working” with it for two months now nut i still have some problems.
I’m trying to add more _characterStates to the Third Person Controller script provided with Unity. I’ve been trying lots of thing, none worked.
So I used a custom function triggered by keydown:
if (Input.GetKeyDown(KeyCode.LeftAlt))
{
Throw();
GameManager.canTake = false;
Debug.Log("throw");
isIdle = false;
}
and here’s the function:
function Throw()
{
_animation.Play(ThrowAnimation.name);
}
the animation plays but only for a frame or two and then returns to idle mode. More than that, I’m just asking myself if there would be a conflict between the function and characterstate.
I really think it’s gotta be a problem with CharacaterState but I can’t find it.
Would someone have any idea on how to add characetrestates or making the animation run till it’s end?
Thanks in advance. Nico