Hello everybody, I am a newbie in this field and for the first time I am experiencing the following kind of problem. I just have a “simple” environment built by myself. Each object of this environment has a mesh collider. My player is a simple capsule for the moment and I make it move using the call rigidbody.MovePosition(). Unfortunately it happens something weird which you can see in the video right below.So the questions are: 1) how can I solve the fact that my player can pass through objects even if they have a mesh collider? 2) after my player has passed through those objects he keeps moving alone, like pushed by a non-existing "force" or anyway with a linear movement. What is it caused by? Thanks in advance!
A MeshCollider is quite the processing-heavy component. It is not ideal for the environment you have built. In your environment most objects can just as well (and even better) function with a rectangular collider (which in Unity is a BoxCollider). Also the speed of your character is determining whether the collision is happening. Test it: decrease the moving speed of your character substantially and you will see he is much less likely to go through things.
But if your game-/scene-design can afford it, I definitely recommend to use BoxColliders on all objects and a capsule collider for your character. You will see the difference quite clear.