- Home /
 
 
               Question by 
               Brumpet · Jul 31, 2016 at 09:50 AM · 
                c#booleandebuggingwhats-wrong  
              
 
              Input.GetMouseButton NEVER returns false
Ok, so heres my code:
 if(Input.GetMouseButton(0)) {
             anim.SetBool("fireWeapon", true);
             fW = true;
         }else{
             anim.SetBool("fireWeapon", false);
             fW = false;
         }
         Debug.Log(string.Format("{0}", fW));
 
               Initially, the debug returns false, as i havent pressed the left mouse button yet. But when I do press it it changes to true but never changes back. Veeeery confused.
Any help would be lovely ;3
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Brumpet · Jul 30, 2016 at 08:31 PM
Sorry lads, i fixed it. The problem was i didn't check the box in the parameters menu, that little one next to the name. What does that do? o.O
Your answer
 
             Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Making button activate update with boolean 1 Answer