Hills typically aren't just grass. Vegetation can be used to block a player's visibility and give a better look to our environment. Perform the following steps to add tress:
From the Project tab, go to the
Assets/Terrain Assets/Trees Ambient-Occlusion
folder and drag and drop a tree into the world (I'm using ScotsPineTree).By default, these trees do not contain collision information, so our player could just walk through it. This is actually great for the areas that the player will not reach, as we can add more trees without having to do meaningless calculations. But we need to stop the player from walking through them, so we're going to add a collider.
To do so, select the tree, select Component | Physics | Capsule Collider, and then change the Radius value to
1
.After this, move our newly created tree into the
Assets\MyGame\Prefabs
folder under the Project tab and change its name toCollidingTree...