Modify penalty non walkable areas

Once the grid is generated and correctly recognizes the walkable and non-walkable areas, there are situations where the character crosses the non-walkable areas (I understand this is because the cost of crossing them is lower than the cost of going around). Is there any way to modify the penalty of these areas to avoid crossing them?

Hi

If the nodes are unwalkable, then the path cannot cross them, no matter what.

However, the movement script that you are using may smooth the movement so much that it walks over them anyway. If you are using the AIPath movement script, try reducing the Pick Next Waypoint Distance.