Forum rules - please read before posting.

Animation and Frame flipping issue

Hi!

I'm making a small 2D game with left and right direct controls just to learn the basics of Unity and AC but I'm having an issue with the animation of my player. I made his animations with the Skeletal animation mode. Idle and walk.

I'm using the Sprites Unity animation engine. With the Frame flipping option set as Left Mirrors Right, his sprite and default animation flips when he turns but he doesn't switch from the idle animation to the walk animation. It seems the animation files can't be found, even with it's name being exactly as expected. The idle animation plays in loop in the Animator tab since it's his default animation, but the console keeps warning me that it cannot play animation clip idle_R/walk_R.

Here is a video as example and the screenshot of the console:
https://www.dropbox.com/s/wdn6jw6koqe1lbe/video 01.mp4?dl=0
https://www.dropbox.com/s/3mj0g85dcec524b/erro 01.PNG?dl=0

But if I set facing directions to none, rename the animations without the suffix, and set the Sprite child field in my player Standard 2D animations tab in the Inspector, to none, the animation will work, even if only to the right, but he will use idle and walk animation correctly.

Here is a video as example:
https://www.dropbox.com/s/nlwq4msr5hae5vb/video 02.mp4?dl=0

My big question here is: did I missed some small step that I can easily fix now to make the animations flip and switch between them or should I forget about Skeletal animation and make sprites like in the AC 2D Demo?

Thanks in advance!

Comments

  • edited March 2021

    As you make more animations you will have to drag them from your animations folder into the characters animator window, then they can be found. edit: nevermind I see them in there.
    I think you need to have a folder called Player and then folders inside those called Idle, Talk, Walk and Run and put your animations inside there

  • Welcome to the community, @Galvao.

    Apologies for the trouble. The first video does actually look all correct: your animation states are named correctly based on the "Expected animations" panel in your Player Inspector (idle_R and walk_R).

    The Console, however, is reporting that the animations cannot be found. Since the animation names match, is it possible that you have multiple Animator components attached to your Player (or elsewhere in the hierarchy)? The first possibility that springs to mind is that it's trying to read the wrong Animator.

    Otherwise, it's likely some other similar, minor detail that'll be hard to convey in screenshots / video. If it's not caused by the above, send your character to me via PM and I'll have a look myself.

    A .unitypackage file of your Player prefab, Animator Controller, and AnimationClip assets should be enough.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.