#How can I make "centered navigation".

27 messages · Page 1 of 1 (latest)

tropic egret
#

Hello. In the first image, the navigation takes him to the edge as she finds it "efficient", however, if she went like in image 2, he would straighten up and go through the obstacle. because the ant is able to turn depending on the direction to the target. How can i do this? Any ideas?

#

How can I make "centered navigation".

shadow apex
tropic egret
#

left - with
right - without

shadow apex
tropic egret
#

And so I would like it to go between the obstacles in the middle, and not from the edge of any obstacle, depending on how close they are to the goal (as I understand it)

#

I have an idea to write my own navigation, but it will not be very funny if it turns out that I could somehow "configure" this navigation for such actions

tropic egret
#

Actually there is another idea. Make the collisions square so the ant slides, not polygonal. But I'm a masochist, for the sake of beauty I'm ready for anything.

shadow apex
#

Place a navlink between every obstacle 😂. Would be even more painful. I am sorry, but I don’t really know how to continue from here. Of course you can make the obstacles spaced further apart but you maybe don’t want to do that. My knowledge ends here

latent thunder
#

When I want the behaviour you're talking about, I use waypoints. For example, to get an agent to go down the centre of a straight corridor, place a waypoint in the middle of the doorway at each end. I only really work in 3D, so I have not tried this in 2D, but in theory it should be pretty much the same. Of course, this technique is not suitable for all scenarios. For example, it is not so good for some types of procedurally generated environments.

tropic egret
tropic egret
#

@latent thunder xD

#

Problem solved

shadow apex
shadow apex
# tropic egret

Oh haven’t checked out 4.1 yet, cause I’m on a holiday. Looks really useful, thanks!

stone yarrow
#

ohh this is actually something i was looking for
thanks!

latent thunder
last fern
#

This pathfinding functionality exists in both Godot 4.0 and 3.5, the only thing that is newer is that the property is exposed on the NavigationAgent node.

#

It was always available as the old "optimized=true" boolean value of the get_simple_path() function in Godot 3.5 that switches between the corridiorfunnel and edgecentered path postprocessing. This is the NavigationServer.map_get_path() function in newer versions.