Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

How Do I Fix This Boolean Glitch?

$
0
0
Here's a doozy. Can't figure it out for the life of me. Once I die, grounded is permanently stuck on false. If I set it true after I die using the Inspector, crouching will set it to false as well as dying. I can't jump at all!

PlayerController:

Code (CSharp):
  1. void Update ()
  2. {
  3.     if (grounded)
  4.     {
  5.         if (Input.GetButton ("Down"))
  6.         anim.SetBool ("Crouch", true);
  7.  
  8.         else
  9.         anim.SetBool ("Crouch", false);
  10.     }
  11.    
  12.     else
  13.     {
  14.         if (Input.GetButton ("Down"))...
How Do I Fix This Boolean Glitch?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>