March 2018
Beginner
336 pages
8h 6m
English
Currently, when our Cucumber Man collides with a Cucumber Beetle, the Die animation is played, but no other behaviors are implemented. In this section, we will modify the necessary scripts for the following to occur each time the Cucumber Man collides with a Cucumber Beetle:
We will use the following three lines of code inside our OnCollisionEnter() method to force the beetle to face the Cucumber Man when there is a collision. As you can see from the following code, we create a variable to make it easy to reference the Cucumber Man and then a second variable for the Cucumber ...
Read now
Unlock full access