Forum rules - please read before posting.

Sprites Unity Complex: animation clips overlapping

edited June 2020 in Technical Q&A

Hello,

Upon transitioning from Sprites Unity to Sprites Unity Complex, all seemed to go well except for a few overlapping animations between transitions.

I tested the example character "Brain2D_SpritesUnityComplex" and it works fine. I attempted to set up the same as the example character, except that I don't have extra "Run" and "Talk" animations (yet). The BlendTrees are set up like the example character, and each angle is accounted for.

I feel it's almost there, though there's just a few instances where two animations appear to play and overlap when walking at at angles close to the straight up/down directions (not directly up/down). Also when Idle when facing Up/Down. And briefly when turning.

An example can be seen in this video (it shows the Idle BlendTree first, then the controller, then the Walk BlendTree)

Here's a screenshot of the animator controller:
https://imgur.com/a/FC2mAiB

Also screenshots of the BlendTrees for Idle and Walk:
https://imgur.com/a/X19p4um
https://imgur.com/a/gCO3qWl

In the BlendTrees there's several Left animations being used as I don't have diagonal animations. And I'm using the frame flipping script to mirror the Left animations when walking to the right (frame flipping appears to be working, except for when the overlapping happens).

Here are screenshots of the transitions from Idle to Walk, and vice versa:
https://imgur.com/a/Gtd7GmG
https://imgur.com/a/mSfUD4v

I believe the issue may lie there as it's the only place where there's a slight difference between my character and the "Brain2D_SpritesUnityComplex" character.
In the Transition settings, it appears that there may be overlap of Idle animations playing at the same time as Walking or vice versa.
Although after much testing, I'm unable to see how to change that.
Already tried uncheking "Has Exit Time", setting Transition Duration set to 0,and Transition Offset to 0.
As well as testing other settings such as 1 for the "Exit Time"

The Conditions appear to be correct. And the Parameters appear to be set up correctly for the Player component:
https://imgur.com/a/xRzWapG

Thank you for any help that can be provided!

Comments

  • How many directions do you want the character to have?

    You needn't have so complex a Blend Tree - you only need to have as many states as you have animations. See the Player Inspector's Angle snapping field - you can use this to ensure the "Angle" parameter value always snaps to the e.g. the neareset 90 degree value.

    You can also do without Blend Trees if they're causing you issue. Sub-states with direct transitions between the different directions would be an option, but you'll always want to ensure "Has Exit Time" is unchecked.

  • Thank you for that!
    Setting Angle snapping was essentially all that was needed!

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.