Forum rules - please read before posting.

How to undo animationState after cutscene?

I have a cutscene, in the beginning of this cutscene my character steps out of his bed (this all works) and there is a conversation and the cutscene ends, character switches to idle state. But if I want to skip the cutscene, all actions are skipped except for the first that is the out of bedstate. How to solve this? And other thing but actually the same thing is the IsTalking animation. My talking animation is looped so it well have a long smooth duration while talking, only problem is after he stops the talking, the same movements from the talking animations are continueing, which means that the clip will still be played when the conversation is over when still in the isTalking State and eventually switches to the idle state. How to undo this state (I would prefare this with a animator.Crossfade) when finished?  And how to undo the outOfBedState once played one time?(This state derives from anystate in the animator btw)

Comments

  • I assume you're referring to a Mecanim-based character.  You can either add transitions within your Mecanim FSM so that the intended animation plays after another has ended, or use a "Character: Animate" Action at the end of your Cutscene to return them to Idle.
  • Yes, I use Mecanim, what do you mean with add transitions? The OutOfBedState is derived from "AnyState" in the Animator, which is one transition, and another one to idle, so I dont understand why it lerps back to the OutOfBedState when I skip the cutscene. I tried to make an custom input action but no, that also didnt help. And about the IsTalking Animation: Is this animation supposed to be on the BaseState btw (layer 0)?
  • A full-body talking animation should be on Base, yes.  You can use the Dialogue: Play speech Action to play head and mouth animations, and also make use of AC's lipsyncing features.

    When you skip a Cutscenes, AC has to re-run all the Actions in the Cutscene - even the ones that have already run by the moment you skip.  This is to ensure that all Actions are properly run, but it does mean that you'll have to be mindful of Mecanim animations, which can't be skipped because of the complexity in Mecanim FSMs.  Therefore, you should end your Cutscene with a Character: Animate Action that snaps your Character to the correct animation.

    Have a look at the 3D Tutorial, if you haven't already.  A section on skipping cutscenes can be found at the 1:24:39 mark, which will explain this in more detail.
  • Hi Chris, thanks, I did check the 3 hour tutorial but it seemed there was another problem that I didnt see before. I had another layer in Mecanim that was running, which I wasnt aware of. Switching it off and creating the right animator, Play custom clip did solve it. Thankfully! So basically this problems are gone :)
  • Oh and one thing that also solved it was to delete all transitions around the OutOfBedState(!)
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.