Hi everyone !
My player is a witch who has an “idle” animation and a “flying” animation.
However, the “flying” animation is fixed on the ground, I would like to move the witch a little bit up in the air (y = 0.2) but only when the “flying” animation is performing.
Here, my witch is infinitly moving up.
void Animating (float h, float v)
{
bool flying = h != 0f || v != 0f;
if (flying)
{
animation.CrossFade("fly", 0.2f);
transform.Translate(0, 0.2f, 0, Space.World);
}
else
{
animation.CrossFade("idle", 0.2f);
}
}
I found a similar subject, but the suggested solution doesn’t work for me :
How can I just have my witch in position (x, 0.2, z) only during this “flying” animation ?