Interaction Basics
Last updated
Last updated
Interaction through player input is controlled through an Input class.
Easy shortcuts can be set up through the Input Manager.
Open your Input Manager through the taskbar > Edit > Project Settings...
This will open a new window/tab. Select Input Manager and twirl down the Axes menu.
Twirl down one of the Axes listed to reveal default controls:
This is where you can access the sensitivity for mouse, keyboard, and controller buttons as well as what buttons control the axis/button.
These can now be accessed through using Input.GetAxis() as a value that is positive or negative and Input.GetButton() as a bool value (true/false).
See the links below for coding specific scenarios:
See more detail about user interaction in the Unity documentation.