Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Navigation Links #26

Open
0xh007 opened this issue Jul 3, 2024 · 1 comment
Open

Support for Navigation Links #26

0xh007 opened this issue Jul 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@0xh007
Copy link

0xh007 commented Jul 3, 2024

I'm curious if Oxidized Navigation supports the concept of navigation links. In my project, I have scenarios where agents need to traverse between disconnected navigation meshes. For example:

  • Two platforms with a gap in between, where the AI agent needs to jump across.
  • One platform directly overhead, where the AI agent needs to climb a ladder.

These scenarios require navigation links to enable agents to move between different areas. I know that both Godot and Unreal, which implement Recast, support this feature. However, I haven't seen anything in the Oxidized Navigation code or documentation that suggests how to achieve this.

Here is a reference to Godot's implementation of navigation links: Godot Navigation Links Documentation.

If this functionality is not currently implemented in Oxidized Navigation, what would a potential solution look like?

@TheGrimsey TheGrimsey added the enhancement New feature or request label Jul 3, 2024
@TheGrimsey
Copy link
Owner

They are not currently supported.

Navigation Links aren't a feature of Recast but something Unreal & Godot have appended to the nav-mesh data.

It makes sense for Oxidized Navigation to support them but I don't have an immediate solution for implementing them.

The following is me spitballing an implementation, it's not a guaranteed one.

It would be possible to add links as EdgeConnections with a u8 of 'metadata' to tell if the connection is a Link (1 bit) + a link type (the 7 remaining bits). You'd get 128 "link types" that you could handle as you see fit.

Or a separate EdgeConnection variant for links and then store the links separately in NavMeshTile. Then you could fit much more metadata and save the link entities for when you are moving.

Limiting factors:

  • Async nature means you can't access the Link entities while pathfinding.
  • Efficient cache usage is important for pathfinding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants