Forum rules - please read before posting.

Character: Animate (Sprites Unity Complex)

Hi, I used Sprites Unity Complex for a NPC and followed this instruction:

https://adventurecreator.org/tutorials/making-2d-character-sprites-unity-complex

My game is 2D and for now, it only has two directions: left and right.
In the Blend Tree, I have Idle_L with a Threshold of 90, and Idle_R with a Threshold of 270. The Parameter is set to Angle, as instructed in the tutorial.

My NPC's default Idle sprite is Idle_L, so I created the following Action to change its direction, but the NPC's Angle parameter doesn't seem to change:

Character: Animate
Method: Change Parameter
Parameter to affect: Angle
Parameter type: Float
Set as value: 270

Did I miss something, or should I not be using the Character: Animate action for this purpose? My intention was to make the character walk or change direction when a hotspot is clicked or during a cutscene. Thank you in advance.

Comments

  • Any Animator parameter mentioned in your character's "Mecanim parameters" panel will be contolled by AC automatically.

    In the case of the "Body angle float", this will be set to the character's facing angle each frame - you won't have to set this manually yourself.

    The Character: Animate Action will work for other parameters (those that aren't listed in the character's Inspector), but here it's being overridden by AC before it has a chance to take effect.

    If you want the character to play their L/R animations automatically as the turn/move, remove the Action and check their Animator window at runtime - you should find that the "Angle" parameter value changes as the character moves.

  • Thank you once again, Chris! Your explanation cleared up all my confusion. I appreciate your help.

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.