Space Short Monthly: “New” Input System in Unity Part II

Using both keyboard and touch for movement in the new input system in Unity — Touch

Danielle H
4 min readJul 28, 2023

Notice: I will not publish new stories during August. See you again in September!

In the previous article, we covered using arrow keys to move a player using Unity’s new Input System. In this article, we will add touchscreen movement (dragging and tapping) and switching between the modes.

Again, I highly recommend the following tutorials which helped me get started: gameDevBeginner and samyam.

Adding touch input to the map

In the previous article, we arrived at the following Move Action map:

Now we add the Touch movement (dragging) to the map. We have one unbound entry (if you don’t, simply add it using the + in the Move row). Click on it. In the Path value, choose Position(Touchscreen) (you can search for it). Also, mark that it’s part of the Touch scheme:

Excellent!

Adding touch input to the Player Input

--

--

Danielle H
Danielle H

Written by Danielle H

Physicist turned programmer, exploring many languages to build projects from neurobiology tools to abstract videos.

No responses yet