User controls

Maybe you don't like the default controls and key combinations associated with the input axes—Horizontal, Vertical, and Fire1. Maybe you want to change them. These input axes are read using the Input.GetAxis function (shown earlier) and are specified by human readable names, but it's not immediately clear how Unity maps specific input buttons and devices to these virtual axes. Here, we'll see briefly how to customize these. To get started, let's access the Input settings by navigating to Edit | Project Settings | Input from the application menu. See Figure 4.21:

User controls

Figure 4.21: Accessing the Input menu

On selecting this option, a collection ...

Get Unity 2018 By Example - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.