Forum rules - please read before posting.

NPCs only play Down animation after update

edited October 2020 in Technical Q&A

Hello all!

Looked through the forum and didn't see any other threads related to this yet.
Recently, I did an update of both Unity and AC, and the NPCs no longer play their Left, Right, and Up animations. They only play the "Down Idle" position when idle, and when "walking" they only play the "Down Walk" animation. The NPCs can still move / follow the main Player fine, as well as play custom animations in cutscenes.
Also the main Player still animates fine (the same).

Previously, I was using Unity 2020.1.4f1, and AC 1.71.8 (and the Unity 2D Animation Package).
After the update, am now using Unity 2020.1.9f1, AC 1.72.2 (and the Unity 2D Animation Package).

When updating, I update Unity first then AC. I make a backup before each update -- so I was able to test the last project backup and track it down to the AC update to 1.72.2. The issue also remains when testing an update to 1.72.3.

The NPC characters are all using "Sprites Unity Complex" and the states use BlendTrees.
Here's an image of the hierarchy which all NPCs follow:
https://imgur.com/a/q1OeGzN

As mentioned, the animations were all playing fine just up until the update which was about a week ago.

Has anyone else experienced this, and was able to solve it?
Thank you for any assistance!

Comments

  • Is this affecting all characters that rely on "Sprites Unity Complex" or does your Player character rely on "Sprites Unity"?

    When using Sprites Unity Complex, a character's facing direction is controlled through use of either the "Body angle float" or "Direction integer" parameters to initiate transitions in your Animator Controller.

    Which are you using, and is this parameter's value being set correctly?

  • edited October 2020

    It's only affecting the NPCs.

    The main Player uses "Sprites Unity Complex" as well, and the animation states use BlendTrees like the NPCs.

    The NPCs (and Player) all use the "Body angle float" parameter. The parameter does not appear to be updating for NPCs -- it just remains at 0.0 instead of changing as it normally did. My understanding is that since the angle value remains at 0.0, they face downward all the time.

    This was tested in "Play" mode by clicking on the NPC and viewing the "angle float" value in the parameter field.

    The "angle float" values did change in the backup copy version of the project before updating.

    Thanks for your help!

  • Let's see a typical NPC's Inspector in full - both the root, and the object with the Animator on it.

    If you pause the Editor's Play Mode, change the "Body angle float" value in the Animator, and then resume, does it revert back - or stay at the changed value?

  • edited October 2020

    Here's a screenshot of an NPC's inspector:
    https://imgur.com/a/glIeUS7

    The Animator is on the root for all characters, as moving it to the root was what was mentioned to do in a previous thread when setting up the Character Animation 2D Track and getting it working.

    Here's a screenshot of the Inspector for the GameObject:
    https://imgur.com/a/HxjMcvm

    Tested it in "Play" mode -- paused, and changed the "Body angle float" value in the Animator to 20.0. It stayed at that value when resumed (20.0 in this case).

    Thanks again.

  • Their "Facing directions" field is set to "None" - though perhaps this should only affect the "Direction integer" parameter. I'll give this some consideration.

    You can set this field to something else, e.g. Four to have the angle be set in the meantime.

  • Thank you. Setting it to Four solves it for now.

    Thanks again for the help!

  • I'm forgetting myself.

    The message box that appears underneath the box explains the intent: the "Angle float" parameter should always be set, regardless of the "Facing directions" setting.

    Leave as-is, but I'll have this fixed in the next update.

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.