Tonight I had free time and in the process of a useless journey across the expanses of my laptop I found an installed Unity3d, which my hands never reached. Well, I decided something simple namut. First, open Unity and create a project (3D).
Let's start?
Go to the menu GameObject> 3D Object> Cube and get a cube ')
Scale tool stretch our cube and reduce the height, in the end should get a plate
Add another 1 cube and give it the name player . Bind the camera to the "player"
Click Add Component> Physics> Rigidbody
In the window Rigidbody put a tick Use Gravity .
If you click on the Play button, we will see a falling cube on the plate
Create a maze
Create a new cube and make it like a wall
Duplicate the walls and create a maze out of them. Decorate the finish point with a bulging plate.
Add colors
It's time to code
Create a new C # script that we call playerActions
Open it.
Declare variables
public GameObject player; publicint speed; publicint rotationSpeed;
Start () function
player = (GameObject)this.gameObject;
Update () function
The following lines will allow our "hero" to move back and forth.