Forum rules - please read before posting.

Flipping sprite/animation?

Hi there.

I have a problem with flipping my character gameobjects. as you can see in my video, my character is rigged with MonoIdle_U/D/R/UR/DR game objects (also, Mono_L/UL/DL, but they were not a part of my first solution) (Just ignore lag #1, it's just my shadow sprite).

Firstly, I made a MonoTake_UR and MonoTake_UL animation for picking up objects. i tried animating from only the MonoIdle_UR sprite, then flipping the sprite while animating the MonoTake_UL animation, but this didn't work. The sprite flipped back when played in gamemode.

I then duplicated MonoIdle_UR/R/DR and flipped them 180 on the y axis and called the new gameobjects Mono_L/UL/DL. (i tried flipping them with the "flip X/Y" in the sprite renderer, but this option only flipped the sprite, not the bones and IK) and then i made a MonoTake_UL animation from my Mono_UL sprite.
I have an actionlist for my Lamp hotspot which, in theory, should play 2 dialogues, then play the MonoTake_UL animation and transport the lamp 0.3 seconds into the animation.

everything happens in the right order, but the MonoTake_UL flips to the UR animation, even though it's not even linked to the MonoIdle_UR gameobject anymore. Can you guys help me?

Link to video: https://previews.dropbox.com/p/thumb/AAVw9tiMmBNf-pM75t4RrJcdtWusEnLWa3X3S-gLu_HZ2F6XRWqcdHZuD_-L3woTpkeg7cycfb_7v9een5qB6Xq_7RQMjF2t7Pi4IIWK4Jhizxy8a0ZyvUozXaiG65iSTxcCKnhNea3WV4xyuDsGpwIRi6uF1pnFufUGpFxqVbhnd3m2_ujv7BOuaySUQZosSLI6WWdNve4DuTJdwnpn7nRZtWq_UmQIVqkg3JydlVEBkg/p.png?size=1280x960&size_mode=3

Comments

  • I'm afraid the link seems broken.

    If you're using Sprites Unity animation mode, you shouldn't have to create left-facing alternatives, setting the Frame flipping? property to Left Mirrors Right will set the sprite child's scale to (-1,1,1) when facing left (but playing a right-facing animation).

  • Huh, yeahh weird. i think this link works: https://www.dropbox.com/s/8hbp2oyelfb7hp5/20190121_194045.mp4?dl=0

    I don't have a "frame flipping?" property, but i have a "flip custom animations?" which i have checked now (didn't work). I've deleted the Mono_L/UL/DL sprites and their animations now, trying to get it to flip automatically. i also changed the "clip" name in the actionlist to "MonoTake" and then checked "add directional suffix" since i now only have the MonoTake_UR animation. (and btw, i am sure that my character is facing UL when it takes my object, so it's not a question of the wrong direction.)

    I'm still at a loss. do you have an idea of what i could be doing wrong?

  • And what happens now after doing all that? Does MonoTake_UR play, or does no animation play at all?

    Does the Console output anything at this time, and let's see some screenshots of your Player Inspector and the ActionList involved.

  • Well, now it doesn't play anything. my Console says: "Animator,GoToState: State could not be found.

    Actionlist:

    Player Inspector:

    My animation window:

    (btw: i also have another small problem, that i thought i might put in here, so you don't have to look at another post. My hotspot labels don't show. Fx. My Oil lamp hotspot doesn't show "Oil lamp" when i hover over it. i have a custom cursor for when something is clickable, i don't know if that has anything t do with it. do you have anything in mind that i might have clicked? It worked and showed the name the very first time i made a hotspot, but now it doesn't... i must have clicked on something but i just can't remember what)

  • my Console says: "Animator,GoToState: State could not be found.

    I'll need the full output from the Console - please copy/paste it exactly.

    I'm afraid your Dropbox links aren't showing - I think you've pasted the preview links instead. Best to upload them to imgur.com and paste the links to there instead.

    (btw: i also have another small problem, that i thought i might put in here, so you don't have to look at another post.

    Separate threads for separate issues in future, please - it helps others with similar questions find answers.

    My hotspot labels don't show.

    Hotspot labels are shown with a Label element that has a Label type setting of Hotspot, placed in a Menu that has an Appear type setting of On Hotspot.

    The default AC interface includes such a Menu, named "Hotspot". See the Manual's "The default interface" chapter for more.

    You may have locked it, or deleted it, from the Menu Manager. If you open your Menu Manager and don't find "Hotspot" listed, you can copy it over from Default_MenuManager by assigning that as your Menu Manager asset file at the top, copying the Hotspot menu via the cog icon to the right, re-assigning your own Menu Manager asset file, and pasting the Hotspot menu into your own.

  • Sorry, i will post them separately next time! and you don't even see the pictures? i'll make sure to use imgur from now on :smile:
    So, i get two warnings:

    1)
    Cannot play clip MonoTake_UR on Mono

    -> AC debug logger
    UnityEngine.Debug:LogWarning(Object, Object)
    AC.ACDebug:LogWarning(Object, Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:25)
    AC.AnimEngine_SpritesUnity:ActionCharAnimRun(ActionCharAnim) (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:271)
    AC.ActionCharAnim:Run() (at Assets/AdventureCreator/Scripts/Actions/ActionCharAnim.cs:99)
    AC.c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:365)
    UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:315)
    AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:552)
    AC.ActionList:EndActionParallel(ActionParallel) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:566)
    AC.c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:430)
    UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:315)
    AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:552)
    AC.ActionList:EndAction(Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:465)
    AC.c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:434)

    2)
    Animator.GotoState: State could not be found
    UnityEngine.Animator:CrossFade(String, Single, Int32)
    AC.AnimEngine_SpritesUnity:ActionCharAnimRun(ActionCharAnim) (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:276)
    AC.ActionCharAnim:Run() (at Assets/AdventureCreator/Scripts/Actions/ActionCharAnim.cs:99)
    AC.c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:365)
    UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:315)
    AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:552)
    AC.ActionList:EndActionParallel(ActionParallel) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:566)
    AC.c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:430)
    UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:315)
    AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:552)
    AC.ActionList:EndAction(Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:465)
    AC.c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:434)

    Label problem:
    I had deleted the menu somehow! Thank you for helping!

    Here's the pictures from my previous post.
    actionlist

    Player inspector:

    Animation window:

  • The error is claiming that the clip "MonoTake_UR" is not present in the base layer of your Animator. As your screenshots don't include that, I'll need you to double-check that this really is the case.

    Otherwise, all seems fine. If a clip named "MonoTake_UR" is present in the Animator (not just the Animation window), you can PM me the character's file (prefab, Animator, animation asset, and sprite graphics) as a .unitypackage file and I'll take a look.

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.