Forum rules - please read before posting.

Set Standard for 2D_SpritesUnityComplex

Hi,

How does one Set Standard Anim for a characters animation when using 2D_SpritesUnityComplex rather than 2D SPrites Unity? I want to use same character prefab and change idle walk and talk to suit idle walk and talk, but i can;t see hoe to dod this using SpritesUnityComplex? Can you help?

Comments

  • When using Sprites Unity Complex, animation playback is handled via animator parameters. What a character is doing is detached from how they're animated - AC will update the parameters you assign, but what animations these result in will be down to how the parameters are used.

    To change a character's idle/walk/talk etc animations, you want to create an additional Bool parameter (e.g. "IsWearingSuit") which, when set to True, reroutes the Animator Controller to play a separate set of idle/walk/talk animations.

    These "standard" animations can still rely on the original parameters - e.g. the "suit idle" <-> "suit walk" transitions still rely on your "Move speed" float.

    To switch your character to use this new set of animations, use the Character: Animate Action's Change Parameter Value method to update the value of your new Bool parameter.

  • ok that makes sense thank you, would you mind helping me work out where to reroute to suit anims? Would I have the decision come from Any State to either Idle or SuitIdle Blend Tree? See screenshot, thanks

    https://www.dropbox.com/s/iq8g18kmjbtcgb8/AnimationParemeters.png?dl=0

  • edited July 2021

    This is what I am trying with blend trees, although I have yet to get it to work... am i on the right track?

    https://www.dropbox.com/s/r22g00ktkpws284/Blendtree.png?dl=0

  • Blend Trees should avoid the need for transitions, though it may be easier to visualize if you keep them separate.

    If you did use transitions, don't use "Any State". You'd instead have to create three separate ones explicitly for your Idle/Walk/Talk states to go to their "suit" counterpart - and vice-versa.

  • This set up seems to work. But I am using any state...

    https://www.dropbox.com/s/0t55awjzjk5pdsi/ANY STATE.png?dl=0

    How would i change this to not use Anystate? (the idle, walk and talks are blend trees)

  • edited July 2021

    If you use Any State, you'll transition back to SuitIdle from SuitTalk and SuitTalk.

    If you switch to a Trigger parameter, you can continue to use Any State, as it'll be a one-time transition. You'll have to make a separate "Normal" Trigger parameter to go back to the regular set of animations though.

    Otherwise, you need to wire up transitions between Idle and SuitIdle.

  • thanks Chris, got this working now

  • ok so i am running into issues, any chance you can draw or explain your post above? as i am a bit confused by the trigger parameter suggestion. The problem i am having is when in Suit mode, both anystate>suitidle and suitwalk>suitidle have the same parameter list of MoveSpeed less than 0.1 so it is trying to play SuitIdle and SuitTalk at the same time

    https://www.dropbox.com/s/buugqlkw7oyuj1a/AnimatorIssue.png?dl=0

  • The problem i am having is when in Suit mode, both anystate>suitidle and suitwalk>suitidle have the same parameter list of MoveSpeed less than 0.1 so it is trying to play SuitIdle and SuitTalk at the same time

    This is the reason you should only rely on "Any State" for Trigger parameters, since it'll only fire one frame.

    You're mixing your parameter types - use only either Bools/Ints or Triggers to handle the costume changes.

    If you have three separate Trigger parameters - e.g. ToNormal, ToSuit, ToUntucked - then for each you can create a transition from Any State to the corresponding Idle animation.

    If you only have two costume types, best to use a Bool parameter. If more, use an Integer (where 0 = tucked, 1 = suit, 2 = untucked). Then for each Idle animation, create a transition to the other two Idle animations based on the Integer value:

    TuckedIdle -> SuitIdle when = 1
    TuckedIdle -> UntuckedIdle when = 2
    
    SuitIdle -> TuckedIdle when = 0
    SuitIdle -> UntuckedIdle when = 2
    
    UntuckedIdle -> TuckedIdle when = 0
    UntuckedIdle -> SuitIdle when = 1
    
  • I think I have this sorted now so thanks for your help. One other question. My character kind of snaps back to idle first frame from Walmart animation, how do I get a smooth transition so it kind of flows baxk from which ever frame from wall animation?
  • By "walmart" and "wall", do you mean "walk"? Are you animating with sprite-swaps, or a 2D skeleton?

    If you use sprite-swaps, you'd probably have to create additional walk->idle animation(s) to get a smooth transition. Either way, it's a general Unity animation topic - not something specific to AC.

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.