OK, this might be really straight-forward so apologies in advance...
I'm having problems with the animation of my player character in a 2D game (using Unity's native 2D). I've set up the animation controller however the animation appears stuck...
I think this is to do with the transitions between animations, the Unity examples change or run animations based on simple input or direction to handle the transitions. Ingame the player while walk along the navmesh to the point clicked... So I guess what I'm asking is how do II set it up to detect which direction the player is moving and play the appropriate animation, reverting to idle after they have moved?
Note- I may also be completely wrong in my above reasoning so if anyone has any pointers feel free, I tried to reverse engineer the Brain2D player but I couldn't seem to get my head round it...
Comments
Am I correct in assuming that you want your character to behave like Brain2D? If so, check this tutorial out: http://www.iceboxstudios.co.uk/adventure-creator/tutorials/making-unity-sprite-based-character-2d
However, you may want to consider using Sprites Unity Complex for this (as the Player's animation engine setting). This setting will basically let you create your own Mecanim FSM to suit your own needs. The character's direction will be passed to the FSM as an integer parameter, which you can choose to ignore or use however you wish.
Please refer to the manual for more on using the "Sprite Unity Complex" animation engine.
It does however bring me to the next problem that I can't find any info on... The game I'm making is pure 2D and as such the NavMesh is currently a poly squashed down to form a line...
@DieHappyGames: You can use the Player: Constrain Action to limit motion to just left and right, which will be the x-axis provided your Camera is looking side-on.