Game Development Reference
In-Depth Information
Figure 3-5. The Jump input's Positive Button mapped to the escape key
6.
Click Play, and test the new jump mapping by pressing the escape key.
7.
Stop Play mode, and change the Positive Button setting back to space .
While you were in the InputManager, you probably noticed a set of duplicate inputs for several of the
keys. Two alternatives are built into the input template. If you require more alternatives for the same
input, you can simply create another of the same name. The current preset duplicates add input for
joysticks. To create your own input definition, you have to increase the Size value of the Axes list.
1.
At the top of the InputManager in the Inspector, change Size to 16 .
A new input is added by copying the last one in the list.
Tip You can also duplicate specific array elements by right-clicking on the element parent and selecting
Duplicate Array Element. This gives you a quick way to add multiple input options or to set up new inputs by
starting with something close to your desired setup.
2.
Expand it, and change its Name field to Vertical .
3.
Set its Negative Button to k and its Positive Button to j .
4.
Click Play, and test the new alternative “Vertical” input keys.
5.
Test the original W and S keys and the up and down arrows to assure
yourself they still work.
6.
Stop Play mode.
7.
In the InputManager, set the Axes array Size back to 15 to remove your extra
Vertical input.
 
Search WWH ::




Custom Search