1
\$\begingroup\$

I am relatively new to the Unity environment. I am creating a 2D game. My character's avatar consists of only one single sprite. Due to its specific crawling-like type of movement, I apply some scale changes on the entire object representing my character (lets say it's something like a spring-wiener dog toy if you've ever seen one ;) ).

Now, I wanted to add an animator to the character's object, but unfortunately I've encountered a problem. I would like to apply to the object some animations on specific occasions, but I don't really need an idle animation. In other words, I want that the animator has no effect on the object in its idle state. At first, I created the state "Idle" in the animator controller and assigned no animation to it. It doesn't work. For some reason, the animator overwrites my character's sprite (opacity in this case), along with its scale. That is, the values assigned through the code are being overwritten by the default character's sprite. Eventually, that breaks up the whole crawling-through-scaling idea and for me it really feels crucial for this character.

My second idea was to create an idle state animation, but without adding any parameters to it. The effect is the same as leaving the animation slot unassigned.

I would really love to get some help here, since right now I have completely no idea how to resolve this issue. Thanks in advance :)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.