3D – Level and Environment Creation

Importing 3D Models and add a Mesh and Colliders to stop them falling through the floor

You don’t have access to this lesson
Please register or sign in to access the course content.

This guide[4] will show how to import a 3D model[5] and add a simple mesh and collider to it to stop it falling through other objects.

When you import an external 3D model it usually won’t have a mesh added to it to detect and handle collisions with other objects. This results in the object falling through other objects.

In this lesson you will:

  • Import an external 3D model
  • Add the model to a scene
  • Add a Cube mesh to the model (you can use other meshs if they are provided)
  • Add a collider to the object
  • Add a Rigidbody (or CharacterController to an object) to apply physics and detect basic[6] collisions.

Find a 3D model to import. kenney.nl has a number of creative commons licenced models and other assets to use. There is an assets pack from kenney.nl linked at the bottom of the page.

Unzip the file and drag the folder into your assets / project[7] panel.

Find a model to import.

In this case[8] it is the basicCharacter model in kenney_blockycharacters_updated > Models

Drag the model onto the scene.

Add a Rigidbody (or character[1] controller) to the object and press play.

When we play the scene now the object falls through the scene.

We need[9] to add a mesh filter to the object.

By default the is no mesh attached.

We can add a custom mesh here if one has been provided.

For a lot of our objects adding a cube mesh will suffice.

Click on the target on the right .

Search for Cube

Double click the cube mesh to add it

The object will still fall through the environment[2].

We need to add a collider to the object

Now to handle collision detection we need to add a collider to an object. Most already have them added but we can also customise them

On the player object select Add Component[3] and add a Box Collider.

Note the box collider is way too big, we need to resize it.

Now we need to edit the box collider. Click the edit collider button

You can now edit the size of the box collider.

Use the squares in the middle of each face to resize the collider.

Now when we hit play the character will fall and detect the collision with the environment

Terms definitions
1. character. This guide will show how to import a 3D model and add a simple mesh and collider to it to stop it falling through other objects.
2. environment. The surroundings of, and influences on, a particular item of interest. Electronic environments can be defined as functional combinations of hardware and embedded software in the real world – that is, circuits, prototypes or products. In Technology, physical environment commonly refers to the location of the specific practice or the place where a final outcome[17] will be located. In […]
3. Component. The three strands of Technology in the NZC (Technological Practice[10], Technological Knowledge, and Nature of Technology) – together with the six specialist knowledge and skills strands for levels 6, 7, and 8) – support[13] the development of students’ technological literacy[11]. Each of these strands is broken down into smaller groupings (or substrands) called “components”. For […]
4. guide. A user guide, document or tutorial to explain[14] how to complete a task.
5. model. A model is a physical representation of a technological solution[12] (sometimes scaled) that enables a solution’s feasibility to be tested/predicted.
Terms definitions
1. character. This guide will show how to import a 3D model and add a simple mesh and collider to it to stop it falling through other objects. When you import an external 3D model it usually won’t have a mesh added to it to detect and handle collisions with other objects. This results in the object […]
2. environment. This guide will show how to import a 3D model and add a simple mesh and collider to it to stop it falling through other objects. When you import an external 3D model it usually won’t have a mesh added to it to detect and handle collisions with other objects. This results in the object […]
3. Component. This guide will show how to import a 3D model and add a simple mesh and collider to it to stop it falling through other objects. When you import an external 3D model it usually won’t have a mesh added to it to detect and handle collisions with other objects. This results in the object […]
4. guide. This guide will show how to import a 3D model and add a simple mesh and collider to it to stop it falling through other objects. When you import an external 3D model it usually won’t have a mesh added to it to detect and handle collisions with other objects. This results in the object […]
5. model. This guide will show how to import a 3D model and add a simple mesh and collider to it to stop it falling through other objects. When you import an external 3D model it usually won’t have a mesh added to it to detect and handle collisions with other objects. This results in the object […]