Forum rules - please read before posting.

Can a character talk and walk at the same time? (Mecanim)

edited December 2014 in Technical Q&A
Hello, it seems like the character cannot talk and walk at the same time. Because either PlayTalk() and PlayIdle() are never called together. Am I right?

In Char.AnimUpdate()

if (isTalking && talkingAnimation == TalkingAnimation.Standard)
animEngine.PlayTalk ();
animEngine.PlayIdle ();

And obviously PlayTalk() doesn't care about updating the move speed parameter, and PlayIdle() make sure that the talk parameter is set to false.



  • But beyond the code excerpt, you can see that this block isn't run if the charState variable is set to CharState.Move (i.e. the Character's walking).  If a Character is on the move, this won't be run.  Instead, try this:

    In AnimEngine_Mecanim.cs, look for PlayWalk and PlayRun.  Just after the "return" line in each function, add this:

    if (character.isTalking)
      character.animEngine.PlayTalk ();

    If that solves the issue, let me know and I'll add it officially.
  • I'm sorry i forgot to mention that this all happen when the character is decelerating so its state should be Decelerate
  • You're going to have to be clearer about what you mean.

    If the character's state is Decelerate, it's because they've stopped moving.  In this instance, you wouldn't want the character to play their Walk or Run animation.
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.