Things got a little too shaky!

objective: Give the player the option to turn the screen shake off.

Making it possible to turn screen shake off in-game:

Add in a panel to hold all the options, a Button to be able to go back to the pause menu, and a Toggle which we will be using to turn screen shake on and off.

In the UI Manager Script, add a variable to store the camera, the toggle we made, and the options menu. Adding the options menu will let us jump between the pause menu and the options menu.

Here we can make the method for the back button.

The options menu button from the pause menu is the opposite of this.

Add in a public method for the camera shake, we can use the “isOn” to check if the toggle is on or off.

And lastly, add an event On Value Changed (Boolean) and point it to the camera shake toggle method above.

Time to test it all out.

With that done, another feature is added with the ability to turn it off. See you in the next one!

Game Developer in the making~