why does my character passes through trees ??

i know that this question has been asked multiple times…so sorry, and i even saw all the solutions over the net. but nothing worked out for me… i have a terrain, a tree and a character. howerver, the chararcter passes through the tree. i have applied capsule collider to both of them…but still nothing works… :frowning:
can anyone pls say how can i resolve this problem… its very annoying… thnx in advance…


I think that the collider is marked as trigger. If it is not set as trigger then I think that your “Player” has a Rigidbody component attached to it. So, I think that you are using transform to move your Player instead of that use rigidbody.position.

I hope this will answer your question ;^)

Now I understand what’s the problem. If anything is colliding with other object one of those objects should have a Rigidbody component so you can add the component and configure it.
I hope now the bug is fixed ;-D

If you are not using a Rigid Body for you your Character, then it needs to have “Character Controller”, that’s the first thing.

Second thing, I can see that the Height in your tree Capsule Collider is 0, that is wrong too. The collider should cover the height of the tree. However, a better way to do it to add mesh collider to your tree instead of capsulate collider.

On the mesh collider check the convex option. That will inform the mesh collider to take the most possible shape of that object.