#Agent Jitters - NavigationLink3D NavigationAgent3D

1 messages · Page 1 of 1 (latest)

oblique cave
#

I have two NavigationRegion3D with a NavigationLink3D between them, I find that if I only have the NavigationAgent3D ask for the next node when within 1m of their current, then they path fine, but they are slow to respond to the player changing position.

If I have them constantly get a new path (also undesirable) then they path to the player well...but jitter with this Nav Link step, any thoughts on how to approach this or something I might have misconfigured?

#

Regions and Nav Link

deep zealot
dry scarab
#

Navlinks are virtual connections to connect navmesh polygons over arbitrary distances that can not be otherwise connected. You need to handle their agent use with a script takeover, else everytime you change the path your agent will pick the closest actual navmesh polygon, because a navlink is not a navmesh. That navlink in the video should just be a very normal navmesh surface instead of a navlink.

oblique cave
#

I see, thanks both, I'll look into that and report back 🙂

oblique cave
#

Thanks I got it working, the code is a horrible mess of a course I was doing interlaced with trying to get the nav link to work, but I see the principle.

I did notice a slight annoyance was that the waypoint_reached signal doesn't seem to emit when it reaches the target position I set for the agent of the other end of the link, so I wasn't able to use that, instead I had to do with a specfic function to check the distance to the target after setting a boolean to indicate we were "nav link travelling", and when close enough, get the "next path position"

  if (distance < 1):
    next_position = navigation_agent_3d.get_next_path_position()
    traveling_link = false;

But thanks for the help 🙂

dry scarab
#

You need to suspend your "normal" agent path behavior anyway while moving between navlink positions, else the agent will update like crazy not being in path desired distance. So having to take care of these things in your own scripts is expected.