- Home /
Setting an animation
So i'm using animators to move some floating limbs similar to mii's in nintendo stuff, and I can't seem to figure out how to get an animation to play using the scripts. I need to be able to say click to make it play an animation, but I can't get the animation to change during play time. How would I do this?
Answer by AdrianTEC · Sep 06, 2020 at 08:12 PM
Hum if I understand, it's very easy , you've to open the animator controller, and create some parameters
For each animation, you have added to your player you can see a state in the animator window, so you have to right-click a state an create a transition to other animation, in the transition inspector you can add the parameters. In code, you can modify these parameters value, this is an example
public void something()
{
private Animator Anim;
Anim=gameObject.GetComponent<Animator>();
Anim.SetBool("caminando",true);
}
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
Damn, HOW CAN I KNOW, IF MY 2d ANIMATION SPRITE IS FINISHED??!! 0 Answers
Animation motion on base layer does not play after additional motion on second layer 0 Answers
Generic Animation Main Rig Doesn't Play Any Animation. 0 Answers
Is it possible to change a skybox material via (Animation)? 0 Answers