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.
- Select the default object that you imported into your scene.
- Select the Tag dropdown and select "Terrain"
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.
- Click on the "Add Component" button for the "default" object
- Type in "mesh" or "mesh collider" and select the option called "Mesh Collider"
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:
- Select the "Player" object in your scene hierarchy view
- 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
- Hold "v" on your keyboard and drag the player object to vertex snap anywhere on your model
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
- Select the "Player" object
- Increase its Y position by 2 meters
Congratulations!
At this point, you should be able to walk around and take measurements on your model.