Asteroids – Adding a Model to Unity



I have made a basic space ship model in blender you can use for this tutorial:

Model (zip file)

It is easy enough to add the model to Unity.

Select assets from the top of the screen and then select import new asset. Select the model you want to import.

Import an Asset
Selecting the File

The model will appear in the project folder window and the inspector should change to look something like the picture below.


Deselect import cameras and lamps because we don’t need them (we don’t have either with the model anyway). Also select the generate collider setting as we do want our model to have a collider. We will discuss colliders in more detail in a future part.


Press the apply button to save the changes

Apply Button

To add the model to the game scene drag it from the project folder to the hierarchy. It will appear in the scene.

Scene View

Make sure the model’s position is set to 0, 0, 0.

Setting Position to (0, 0, 0)

We also need to change the rotation of the model so it matches the game scene axis. If you look at the scene view we want the ship to face the same direction as the blue arrow (Z axis). To do this we rotate the model 90 degrees around the Y axis.

Rotating the Model 90 Degrees Around Y
Ship in Scene View

The model is now set up.

Just a few more things we need to do before finishing the tutorial part. Select the camera and move it to 0, 20, 0. Set its rotation to 90, 0, 0.

Camera Transform

Next Change the “Clear Flags” setting to Solid Color and change the Background colour to black.

Camera Settings

We should also change the light. Position it at (0, 20, -10) and set it’s rotation to (45, 30, 0).

Position Light

You may notice the detail on the ship is completely lost. This is because the intensity of the light is too high for the plane white texture of the ship. To change this this select the directional light in the hierarchy. In the inspector change the intensity to 0.6. Now we can make out the detail on the ship.

Light Settings

Your game view should look something like this.

Game View

Next time we will look at parent and child objects.

1 Comment »

Leave a Reply