Hi there,
I am new to Animations and have a few questions. Mainly that I just had my artist send over a simple power bar animation. What it does is, at start is an all Yellow bar. If played, the yellow is over taking, by red moving left to right. So, what I want to do is have the bar, power up, (animate) if the up btn is pressed.
Currently, if I press the up btn I get the message that…
Please attach an animation clip with the name ‘powerUp’ or call this function only for existing animations.
I have looked this up but nothing appears to me as an answer.
So I am wondering, what do I need to do to get this to fly? I think I need to use animationClip but again am a bit lost. Also, is there a way to reverse?
Thanks and sorry for the newbish questions.
Here is my code.
It is slightly modified from the docs.
Note:
If powerDown is enabled = true, then the animation runs automatically.
If it is false, there is no animation.
No matter if powerUp is enabled or not, this effects nothing.
:.?
Oh, my bad.
I had seen this. It is what i based my code off of.
I need to figure out why using an input to trigger my animation was causing an error, that error being that unity says i had no animation clip. I made adjustments but to no avail.
It works, but I want to be able to control things like speed etc. Things that are manipulated thru AnimationState, so how do I go about making it so that animation “Take 001” can be slowed, stopped… anything that an animationState can handle.
acting as triggers, just to animate the only animation I have, but have stumbled upon an unexpected phenomenon. If I press Up the animation begins to play. If I press down before the animation finishes, there is no change, the animation must finish before the (same animation) but separate trigger is activated.
I would have thought that the running animation would be interrupted by the new instruction. No? Is this the case, but not here simply because it is the same animation that is working?
Right now, since I only have one animation, as in I have no “idle” animation, I am wondering, when I start it to say half way thru the full animation, then stop it, so it is essentially paused at the halfway point… The I restart it, I want it to start where it left off, however it resets to the beginning. How can I achieve this?
But this is a read only and it seems to only read its full length. At least my print out was static, always the same. I would like to see its position (frame, position in animation) and take that into account when continuing the animation.