I'm new to scripting and would like to make a 2D character (moving in 2D space) turn correctly with the custom animation engine. The animation has only 2 directions (left and right), so a flip of the sprite (I'm using Spine, so spine object) would do the job; however I can't simply let it flip by detecting mouse-clicking position, since the player could click the background and not inside the NavMesh. Am I missing something? There must be an easy way to do this...thank you very much
Comments
In the Char script:
GetSpriteAngle () - gets the character's facing angle
In your custom animations script:
PlayTurnLeft () - plays whenever your character turns left
PlayTurnRight () - plays whenever your character turns right