3.3 Finishing the model - UWRealityLab/StructuralQueryToolkit GitHub Wiki

Change the tag of your model to "Terrain"

To make your model interactable with our tools, you need to mark objects with the "Terrain" tag. Objects will also need a collider component.

  1. Select the default object that you imported into your scene.
  2. Select the Tag dropdown and select "Terrain"

ChangeTag

Add the "Mesh Collider" component to your model

Adding a collider component to your model is needed to make it interactable as well, in addition to allow for collisions to work with the player.

  1. Click on the "Add Component" button for the "default" object
  2. Type in "mesh" or "mesh collider" and select the option called "Mesh Collider"

Adding_Mesh_Collider_1

Adding_Mesh_Collider_2

Your object should look like this in the inspector.

Moving the player object to the game's starting position

Once the model's position is finished, move the player object to where you would like your users to start at.

We recommend that you go into play mode to check that your new player location is suitable and doesn't have any issues, particularly that they do not clip through the ground and fall.

Here is a fast way of moving your player to your model:

  1. Select the "Player" object in your scene hierarchy view
  2. IMPORTANT: click on the scene tab to focus Unity editor on the scene view. You should notice that the scene tab now has a blue line on it, which indicates that it is focused
  3. Hold "v" on your keyboard and drag the player object to vertex snap anywhere on your model

Moving_Player

IMPORTANT: Test your game by going into play mode. You may see yourself falling through your model. To mitigate this, recommend giving your player object an added offset of around 2 meters

  1. Select the "Player" object
  2. Increase its Y position by 2 meters

Adding_Offset_To_Player

Congratulations!

At this point, you should be able to walk around and take measurements on your model.

NEXT STEP: Setting up the main menu