Activating state upon mouse click in mecanim

Hey guys, I literally jsut want to transition from neutral mace to Mace Attack when the mouse is clicked, I have the neutral state which is activated upon runtime. Any help would be great, sorry for the nooby question but i really dont get this mecanim thing. Thanks guys, any scripting would be preffered in javascript

  1. You need to create bool parameter “Attack” in animator.
  2. In Animator you make transition from “Neutral mace” to “Mace attack”, that get triggerd when “Attack” is true. (You also need to set transiotion back depends on what you want to achive.)
  3. You detected by script that mouse was pressed and use Animator.SetBool to set “Attack” to true. This trigger transition to “Mace attack” state.

To find out more about animation parameters and exapmle of source code you can look at AnimationParameters or Mecanim Tutorial