Create a Player and Add Basic Input Movements in Unity

Create your Player

Unity provides a number of basic shapes we can use as placeholders. If you right click in the hierarchy window you will see different objects you can add to your scene. A cube will work just fine as a placeholder for our player.

Adding a 3D as a placeholder for your player

Change the game background

If you are wondering why I have a solid background rather than the default one, you can change this easily as well. Select the main camera and then in the inspector you will see that it has a “Skybox”. This is useful with 3D games. But if you want a simple background then change it to “Solid Color” and select a background color of your choice.

Change your background to solid

Change the color of your player

If you like you can change the player to another color. We do this through “materials”. Under “project” in your assets folder add a new folder called “materials”. Then right click it to add your first material and give it a name. In the inspector you can now change the color. Then drag the material to the cube in your hierarchy window. The cube will now have a new color. You might also want to rename your cube to something like “player”.

Adding materials to your cube.

Move your player with user input

While it is nice to have your player there, it doesn’t do much yet. Let’s create some movements based on an input.

--

--

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
Andrea Zilio

Andrea Zilio

Passionate Game Developer and Learning Expert. I love to create games and interactive experiences using Unity, Articulate, C#, JavaScript, PHP, HTML, CSS.