'Box collider dont recognize rigidbody in unity

Why is my person walking through trees?

How can my character go through a tree when my character has a rigidbody/mesh collider and my tree prefab has a box collider? I want the tree to act like a barrier

colliders don't detect each other, I want the tree to act as an obstacle

fox inspector tree inspector



Solution 1:[1]

Check theese:

  1. Check if collider component is active & working on your fox & tree (because that's marked removed)
  2. in Physics window, check that player's & tree's layers can have collision with each other

Solution 2:[2]

im assuming you are painting the trees on the terrain. If so then remove the Terrain collider in the Tree1 prefab and then refresh.

Solution 3:[3]

Firstly, you need to assign Terrain Data because its look like none.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matin mohammadi
Solution 2 Terrell-byte
Solution 3 bmoglu