[C#] When using NavigationAgent2D and NavigationRegion2D, how can I set a different desired distance for the Y position?

Godot Version

4.2.1 Mono


The game is a 2D platformer game with gravity. Entities can move left and right or jump.
I’m using different NavigationRegions split up into different parts, and connect them together using NavigationLink2D, see attached screenshot.
My issue is that if my targer location is a little lower than the characters center (which is around their belly), the character will reach the desired location, but will be stuck wiggling back and forth because it cannot go lower. Is there a way to adjust this? I don’t want to COMPLETELY get rid of Y checking since that’s how I know when a character should jump.

(The bright green elements are collisions, the red capsule is my character representation, and the light green blocks are the NavigationRegion2Ds with their Links.)

A different desired distance for just one specific axis is not possible with the NavigationAgent. The distance checks are just normal checks what you do with the distance_to() functions of Vector2D/3D. They have no weighting for a specific axis.