Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] The pet transport saga continues ...

[DiscordArchive] The pet transport saga continues ...

[DiscordArchive] The pet transport saga continues ...

rektbyfaith
Administrator
0
01-12-2025, 11:20 AM
#1
Archived author: Piggymorph • Posted: 2025-01-12T11:20:10.486000+00:00
Original source

The pet transport saga continues ...
I think I managed to take into account transport offsets, and I managed to extract the model for game objects and create a navmesh for them.
Depending on whether the targets are on a transport or not, I set the navmesh accordingly.

However, my code seems to fail inside PathGenerator::BuildPolyPath(), right at the beginning where I assume it tries to find the polygons for start/end?
``` dtPolyRef startPoly = GetPolyByLocation(startPoint, &distToStartPoly);
dtPolyRef endPoly = GetPolyByLocation(endPoint, &distToEndPoly);
```
the distances are FLOAT_MAX

I tried to see if my mesh is wrong by using cMangos's recastdemomod but as far as I can see my mesh and cmangos' extracted navmesh *look the same* (see image for demo)
What's interestind is that in the tool you can do "Set Random Start/Set Random End" and visualise the pathfinding, which actually works with TC mmaps on zones!
However, for transport navmeshes (both for TC and cMangos!!!), "Set Random Start" works, but "Set Random End" does nothing, so you can't get 2 points on which to calculate pathfinding (really similar to my issue)
Set Random Start calls m_navQuery->findRandomPoint and Set Random End calls m_navQuery->findRandomPointAroundCircle

I was wondering if any guru has some insight as to how to debug this further cause I am a bit lost on it :-?
[Image: image.png?ex=690c846a&is=690b32ea&hm=280...d51186181&]
rektbyfaith
01-12-2025, 11:20 AM #1

Archived author: Piggymorph • Posted: 2025-01-12T11:20:10.486000+00:00
Original source

The pet transport saga continues ...
I think I managed to take into account transport offsets, and I managed to extract the model for game objects and create a navmesh for them.
Depending on whether the targets are on a transport or not, I set the navmesh accordingly.

However, my code seems to fail inside PathGenerator::BuildPolyPath(), right at the beginning where I assume it tries to find the polygons for start/end?
``` dtPolyRef startPoly = GetPolyByLocation(startPoint, &distToStartPoly);
dtPolyRef endPoly = GetPolyByLocation(endPoint, &distToEndPoly);
```
the distances are FLOAT_MAX

I tried to see if my mesh is wrong by using cMangos's recastdemomod but as far as I can see my mesh and cmangos' extracted navmesh *look the same* (see image for demo)
What's interestind is that in the tool you can do "Set Random Start/Set Random End" and visualise the pathfinding, which actually works with TC mmaps on zones!
However, for transport navmeshes (both for TC and cMangos!!!), "Set Random Start" works, but "Set Random End" does nothing, so you can't get 2 points on which to calculate pathfinding (really similar to my issue)
Set Random Start calls m_navQuery->findRandomPoint and Set Random End calls m_navQuery->findRandomPointAroundCircle

I was wondering if any guru has some insight as to how to debug this further cause I am a bit lost on it :-?
[Image: image.png?ex=690c846a&is=690b32ea&hm=280...d51186181&]

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)