Movement using User Input in Unity

How to move the Player with keys


Player Script

How to program?

Set start position of player

Unity is component based

Move the player

Get Input


Make move speed independent of frame rate with Time.deltaTime

Adjust the speed we move at

Final code
Try adjusting the move speed while running the game



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tristan Engel

Aspiring developer that’s self-learning Unity & C# to transition to a career with Unity. I got a passion for creating interactive experiences.