Skip to main content

wow-navmesh

Python bindings (via nanobind) for Detour, the navmesh query engine from recastnavigation — scoped to pathfinding over the .mmap/.mmtile navmesh files generated by TrinityCore/AzerothCore for World of Warcraft 3.3.5a.

This wraps Detour's query engine (dtNavMesh / dtNavMeshQuery) only. It does not build navmeshes — that's Recast, and TrinityCore/AzerothCore's own mmap generator tools already produce the .mmap/.mmtile files this library reads.

Install

pip install wow-navmesh

Prebuilt wheels are published for 64-bit CPython 3.10–3.13 on Windows (x64) only. No compiler needed for a normal install. Linux and macOS are not supported.

Quickstart

import wow_navmesh as wn

nm = wn.NavMesh(r"C:\path\to\mmaps")
nm.load_map(0)  # 0 = Eastern Kingdoms

path = nm.find_path((x1, y1, z1), (x2, y2, z2))
for x, y, z in path:
    print(x, y, z)

NavMesh also works as a context manager, freeing the loaded map on exit:

with wn.NavMesh(r"C:\path\to\mmaps") as nm:
    nm.load_map(0)
    ...

Coordinates are (x, y, z) in WoW world-coordinate order everywhere in this API. The .mmap/.mmtile files store them as (y, z, x); the swap happens internally at the find_path() boundary, so callers never need to think about it.

API

  • NavMesh(mmaps_path: str) — bind to a directory of .mmap/.mmtile files.
  • .load_map(map_id: int) — load the navmesh for a map id, replacing any map currently loaded. Raises RuntimeError if the files are missing, truncated, or were built for a different dtPolyRef layout than this build targets (see below).
  • .free_map() — release the currently loaded map.
  • .find_path(start, end, max_points=256) -> list[(x, y, z)] — the straight path between two points, or [] if none was found. Raises RuntimeError if no map is loaded, ValueError if max_points <= 0.
  • .is_loaded, .map_id, .mmaps_path — read-only properties.

Full type stubs ship with the package (py.typed).

A note on DT_POLYREF64

TrinityCore/AzerothCore build their mmap generator with Detour's DT_POLYREF64 option enabled, which widens dtPolyRef from 32 to 64 bits. That changes the on-disk byte layout of every tile (dtLink, which embeds a dtPolyRef, changes size — and every section of a tile after it shifts as a result). Published wheels are built with DT_POLYREF64 on, matching TrinityCore/AzerothCore's own tools; load_map() checks each tile's layout against what it expects and raises a clear RuntimeError (naming the mismatch) rather than silently misreading a tile built the other way.

Building from source against a plain Detour navmesh (not TrinityCore/AzerothCore's)? Set WOW_NAVMESH_POLYREF64=OFF before installing:

$env:WOW_NAVMESH_POLYREF64 = "OFF"
pip install --no-binary wow-navmesh wow-navmesh

wow-navmesh only supports 64-bit Windows Python interpreters; 32-bit builds and non-Windows platforms are rejected at configure time.

Building from source

Requirements:

  • Windows, 64-bit CPython 3.10–3.13.
  • A C++ compiler with MSVC support — the Visual Studio Build Tools (or full Visual Studio) "Desktop development with C++" workload. CMake and Ninja are pulled in automatically by pip and don't need to be installed separately.
git clone --recursive https://github.com/srounet/wow-navmesh
cd wow-navmesh
pip install .

The --recursive clone (or a git submodule update --init --recursive afterwards) is required — Detour's sources are vendored as a git submodule under extern/recastnavigation/, pinned to upstream tag v1.6.0.

Run the tests with pip install pytest && pytest. A second tier of tests exercises find_path() against a real mmaps directory; point WOW_NAVMESH_TEST_MMAPS at one to enable it:

$env:WOW_NAVMESH_TEST_MMAPS = "C:\path\to\mmaps"
pytest

Known limitations

  • Only verified against TrinityCore/AzerothCore mmaps for WoW 3.3.5a. The mmap format may differ across core versions or forks; nothing here has been tested against those.
  • The nearest-poly search extents (50 units on each axis) and the internal path-buffer size (512 polygons) used by find_path() are currently fixed, not configurable.
  • License: TBD (recastnavigation/Detour itself is zlib-licensed; its notice is included under extern/recastnavigation/).

Acknowledgments

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wow_navmesh-0.1.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

wow_navmesh-0.1.0-cp313-cp313-win_amd64.whl (111.7 kB view details)

Uploaded CPython 3.13Windows x86-64

wow_navmesh-0.1.0-cp312-cp312-win_amd64.whl (111.7 kB view details)

Uploaded CPython 3.12Windows x86-64

wow_navmesh-0.1.0-cp311-cp311-win_amd64.whl (111.7 kB view details)

Uploaded CPython 3.11Windows x86-64

wow_navmesh-0.1.0-cp310-cp310-win_amd64.whl (111.4 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

Details for the file wow_navmesh-0.1.0.tar.gz.

File metadata

  • Download URL: wow_navmesh-0.1.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wow_navmesh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ce7153a811953e68f3b1e89438accef498d83aaabf28f32a2ea0bdce0e845254
MD5 ac830ff3f8b1388c0f08100ed9708ada
BLAKE2b-256 1440add6c2376a7cce732433ff9829ee6f368adf14e8fd29e2a19ef2de91941c

See more details on using hashes here.

Provenance

The following attestation bundles were made for wow_navmesh-0.1.0.tar.gz:

Publisher: release.yml on srounet/wow-navmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wow_navmesh-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: wow_navmesh-0.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 111.7 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wow_navmesh-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 bf2dadb4c7bbccbad42a6d56fd40d1b93eb00656a87168ee33f3ec374a25d52b
MD5 4a73c11ede4a628e4faded0c7257c5ab
BLAKE2b-256 43835a777d7cb356dab3bc79020845615dc4a98aac9d4a29a0f3add09c530a5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for wow_navmesh-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on srounet/wow-navmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wow_navmesh-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: wow_navmesh-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 111.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wow_navmesh-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1f3f334f68ac62c3217466df2d9ef766b91eec022c0a26be098b524129c224d8
MD5 b69940ce535ba65236643b9c19cb4209
BLAKE2b-256 8f472be72ad486ce94b14a92b207d90d10e8eed9756d72a8e64c1b7b15136273

See more details on using hashes here.

Provenance

The following attestation bundles were made for wow_navmesh-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on srounet/wow-navmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wow_navmesh-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: wow_navmesh-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 111.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wow_navmesh-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7f04b4d5677ca829205893d082bba4b35b6a09874eda9baa0f1b37932ab16e1f
MD5 e4afadb85c7f654bc91baa682ff96a51
BLAKE2b-256 bee801398e03021fd5a247369415f5239d17191e2a665502b53beb4144efb86a

See more details on using hashes here.

Provenance

The following attestation bundles were made for wow_navmesh-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on srounet/wow-navmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wow_navmesh-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: wow_navmesh-0.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 111.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for wow_navmesh-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3fe3a24ba7d7c579069e2c0d1bae3b76cef1d839b0facf80a31c740b849c1d06
MD5 740a2994110f6852b617eb2ac7016b0f
BLAKE2b-256 6c7df469c1b398ef0ab5103904aa3d1aee9bb4e2977896eee0c728a8457e7a32

See more details on using hashes here.

Provenance

The following attestation bundles were made for wow_navmesh-0.1.0-cp310-cp310-win_amd64.whl:

Publisher: release.yml on srounet/wow-navmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page