Animation change with bool variabiles

What is the best method to change the animation ? If I have 3 states (walk, run, jump) and I set into the animator this transations

  1. Walk to Run with bool variabile r = true
  2. Walk to Jump with bool variabile j = true
    For Run to Jump I must set j = true (such as Walk to Jump) or I must set a new bool variabile ?

What is the difference between isTrigger and Bool variabiles ?

There is another best way for to set the animation?

The best way to change the animations for your specific needs are:

  • Walk to run : Use a float for this animation. You can set a certain speed and if your character crosses that speed, set the animation to running and if he slows down (goes below that specific speed), set his animation to walking again.
  • Walk to jump: You can use a bool for this. For example: Create a bool called ‘canJump’ which checks to see whether the player is jumping or not. If he ‘isGrounded’(which checks wether he is on the ground) and not already jumping, set ‘canJump’ to true and later set it back to false.

Boolean values can consist of 2 values i.e True or false. Once you set something to true , it stays true until you set it to false. Whereas a trigger is a one time action. If something is triggered, it performs that action and goes back to its normal state (if that makes sense). There is no setting of true or false in triggers.

Thank you for answer. My game is a running game then I think that the float variabile is not good for me. My character can only have this states ::

  1. Stopped to Running
  2. Running
  3. Jumping
  4. Rolling
    The problem is that when it is onGrounded he can running but also rollink