Timing Animation Weight
Hi guys... i'm working on this game and i got my character controller trying to make him get to combat mode
if (atCombat)
{
Anim.SetLayerWeight(1, Mathf.Lerp(currentWeight, 1.0f, 12 * Time.deltaTime));
Anim.SetBool("COMBAT", true);
}
else
{
Anim.SetLayerWeight(1, Mathf.Lerp(currentWeight, 0.0f, 1 * Time.deltaTime));
Anim.ResetTrigger("COMBAT");
Anim.SetBool("COMBAT", false);
}
I'm setting the weight of the animator second layer to 1 on combat mode.. and setting it back to 0 when not on combat mode.. my problem is .... I need it to work like that it's fine but .. my weight i want to set it back to 0 after some time anyway with or without the combat the problem is that atCombat is getting the mouse buttin so aslong as it pressed atCombat will be true.. so how can i make the weight go back to 0 after getting to 1
?
Your answer
Follow this Question
Related Questions
Offset Reload Animation to Fit New Model 0 Answers
Can unity animate 3D objects? 0 Answers
Is there a way to limit animation on collision? 1 Answer
Can't play an animation from the Animator 1 Answer
2D Spine Animation not playing 0 Answers