How to make Navmeshagent look where its going


I have a nav mesh agent of a tank that moves around where ever you click.

Now I have it set up right now to look at where you click. This works great for small areas but when you click across the map, it faces that destination as it moves, regardless of obstacles in its vision.

Is there any way I can just get it to face the direction its moving while it goes to its destination?

ex: If I click behind a rock, it has to drive around the rock, turning right then left then left again to reach the point I clicked. Currently it just stares at the destination through the rock, I want it to look in the direction (“facing forward”) its moving as it goes to the destination

I guess you need this :