Unity/C# Challenge 55: Pressure Pad.

Alec Oney
Dec 7, 2021

Challenge: Implement our pressure pad into the game.

Now that we can move our box, we want to implement our pressure pad into the game so that our box can affect it. First, we will create a script for the pressure pad and attach it. Then, we will update our script:

Now, when our box gets within .05 of the pressure pad, it will stop and the pressure pad will change color:

We can then put in any script we want for the pressure pad down condition.

--

--