Vector3.Lerp GameObject keeps walking through obstacles.

I have a system where an object would go to the location of the player using Vector3.Lerp. If the object is faced with an obstacle, it is supposed to stop there. But instead, it keeps walking through it. I tried all the collision detection modes. still the same.How to get around this.?
Here is my collider setup:Imgur: The magic of the Internet

Do you mean that you’re setting transform.position with the result of Vector3.Lerp(…)? If so then there is no collision detection involved. You are literally telling Unity “put this object in this position”.

You need to use Rigidbody movement if you want collisions to be respected. You would probably also need to check for when a collision has been detected and stop the interpolation being continued in future frames, otherwise you might get some odd results.

Ok. Rigidbody movement sounds like the solution. One more thing. Can I use NavMesh instead? I heard NavMesh can have a large performance hit on mobile platforms. If multiple(5 to 10) gameobjects are trying to get to the location of the moving player using navmesh , would that have a huge performance hit on mobile devices?

You would be in the best position to tell us.

Remember, “mobile device” goes all the way from an el cheapo Android kids tablet up to the smokinest hottest $2000+ iPhone or Android. Huge difference in performance.