I did not notice this bug until very recently but the NavMesh.SamplePosition returns a point only on the terrain. Not on objects like bridges. So even though the player and enemies can traverse the bridge, the player cannot stop on the bridge or click on it due to something. I spent a good long time trying to debug this and I am at a loss.
The NavMesh is baked to the bridge, but when hovering the mouse over the bridge, I get the cursor for none and cannot move the character and stop on the bridge. This problem also extends to platforms.
I tried changing the maxNavMeshProjectionDistance to something larger like 5 and I can stop on the bridge but then the player stops at a large offset from the position to directly above the terrain (or water in this case) and not on the mouse position.
From my debugging attempts, I believe the problem is at the NavMesh.SamplePosition()
I appreciate any help I can get on this. Thank you!