My way of debug keys

Debug%20C%20key

The logic is correct but more code than you needed. Here’s how I would have done it.

private void CollisionOnOff()
    {
        if (Input.GetKeyDown(KeyCode.C))        
            collisionOn = !collisionOn;        
    }
1 Like

Privacy & Terms