Is possible have a navmesh only if i click on top of it

Hi guys, I’m looking for a solution to this problem:
I have an object (player) with navmesh agent component and I set everything to allow navmesh to work, in the scene I have the floor and a cube, I want if I click behind the cube the player goes around it even if going up the cube and going down it’s the fastest way, but if I click on the top of the cube the player should go up.

I’m use navmesh 2d so my problem may can be different but i know is not a defoult feuture of untiy so if you give me a solution for 3d i try do adpte it for 2d.

Well it depends a lot on how you detect that you clicked on something, Im not sure how you expect a player to go “up” , if you wan the player to go under the cube when its up, there needs to be sufficient space, and it may not feel that there is… theres too much open here

I solved it by putting a higher cost on a different area