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 5.x By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.