Forum rules - please read before posting.

Custom character animations don't run if default sorting map is set?

edited May 2020 in Technical Q&A

I'm on Win7 and using older Unity 2018.2.11f1 and also using an older AC version (1.69.0) (was hoping to avoid updating right now unless it's really important)

I sort of assume this is just the way characters work, but I wanted to ask. I have a character who teleports and then is supposed to run a custom animation via Character:Animate. This works when no default sorting map is set, but when there is one, the character position change in the animation does not happen. (The clip in the Animator runs - the blue bar moves across - but no movement happens.) Is this standard behavior? Thanks.

Comments

  • Yes - the GameObject with the Follow Sorting Map component attached (which should typically be the "Sprite child") has its position set.

    What you can do, however, is move your actual animation / sprite graphics to a child of this "sprite child" instead - so that your hierarchy looks like:

    -Root (Player / NPC component)
    -Sprite child (Follow Sorting Map component)
    -Actual character graphics (Sprite Renderer + Animator components)

    This way, the Sprite Child will still have its position controlled by the FSM, but you can also animate the sprite's position separately.

  • Thanks for the advice, I'll try that out soon. :)

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.