Really liked the exercise

I just want to say how much i enjoyed this lesson , i thought we had to disable collisions and colliders and got this solution after a long time, but really liked being able to do the exercise. Im loving this course, i have gone through many Unity and programming tutorials but it is like the first time i feel i am learning!:

[SerializeField] Collider gameColliderToCheat;

       if (Input.GetKeyDown(KeyCode.C))
       {
        if (gameColliderToCheat.isTrigger)
        {
            gameColliderToCheat.isTrigger = false;
        }
        else
        {
            gameColliderToCheat.isTrigger = true;
        }

}

3 Likes

Privacy & Terms