Directional sprite for Unity (using animator and blend tree method)
- Download the script "DirectionalSprite.cs" and put it somewhere in your player (it doesn't matter where, the script doesn't use local object transform).
- Download the script "SpriteBillboard.cs" and add it to your player (where his SpriteRenderer is located)
- Specify to the script "DirectionalSprite" parent, which will be rotated, basically it is the main parent of the player, where the CharacterController or Rigidbody is located, also specify to it an animator, which will use variables, for example x and z.
- Enjoy the result.
This method was invented by me so that it could be used in multiplayer (The main thing is to synchronize the rotation of your players, leave the rest to the script) Basically, this method is more suitable for those who don't need to use multiple main cameras. Also this method works for any type of camera, orbit or other 3-person cameras, and if it's multiplayer, even 1-person players will be able to show you where they turned.