- Home /
Can animation parameters only be changed in scripts?
I have a very simple animation parameter in the Animator, a boolean that is "true" when a shooting animation is playing (to stop the game logic from allowing more shooting during a gun recoil animation). I assumed I'd be able to access this in animations, i.e. setting it to true when a shooting animation started, and false when it ended. But I just can't see how to access it in my animations. It's not available under "Add Curve". Am I missing something?
I can do this in other ways, but this just seemed like the cleanest.
Answer by joshpsawyer · Mar 28, 2014 at 08:35 PM
Animation curve values are numeric, so you can't use a boolean variable with them. I don't think you can use any parameter except a float, but I've never tried.
You can only set booleans from outside the Animator. That being said, how do you control the animation? You could set it at the same place you play the animation.
I could, but I'd have to watch the animation to see when it transitions to another, which defeats the entire point.
I'll use animation events ins$$anonymous$$d.
Your answer
Follow this Question
Related Questions
Can't Set Animator Boolean Parameter C# 1 Answer
Set animation's CLIP parameters? 0 Answers
Animation State Machine Script Control Issue 1 Answer
Animator in Unity 5 0 Answers
Animation parameters are not being set 0 Answers