Trying to use colliders on trees to interact with player

I’m trying to use colliders on trees/rocks to stop the player when they run up against the tree/rock. I’ve tried placing a collider on the tree, but I’m not sure how to stop the player.

EDIT: I’m using a first person controller with all defaults. I’m using terrain tree placement for all rocks and trees.

Are you using the terrain Asset trees?

If so then :

  1. Drag the tree you want to use into the scene, from the terrain assets folder(do not place via the tree paint tool!).

  2. Create a prefab in the same folder you got the tree from. Give this prefab an appropriate name.

  3. Add a collider to the tree in your scene(the one that you placed in 1)

  4. When you have the collider how you want it, drag this tree(from the hierarchy window) onto the new prefab that you made.

  5. Go into your terrain editor and add your new new tree prefab to it.

  6. Paint your new trees on the scene and they should all have colliders and the player should stop correctly.