Replies: 4 comments 3 replies
-
Hmm... maybe I just forgot how to do this. Looks like I need to write a wrapper C++ function in NavMeshQuery.cpp. |
Beta Was this translation helpful? Give feedback.
-
This works: recast-navigation.idlinterface NavMeshQuery {
...
unsigned long initSlicedFindPath(unsigned long startRef, unsigned long endRef, [Const] float[] startPos, [Const] float[] endPos, [Const] dtQueryFilter filter, unsigned long options);
unsigned long updateSlicedFindPath(long maxIter, IntRef doneIters);
unsigned long finalizeSlicedFindPath(UnsignedIntArray path, IntRef pathCount, long maxPath);
unsigned long finalizeSlicedFindPathPartial(UnsignedIntArray existing, long existingSize, UnsignedIntArray path, IntRef pathCount, long maxPath);
...
} NavMeshQuery.cppdtStatus NavMeshQuery::initSlicedFindPath(dtPolyRef startRef, dtPolyRef endRef,
const float* startPos, const float* endPos,
const dtQueryFilter* filter, const unsigned int options) {
return m_navQuery->initSlicedFindPath(startRef, endRef, startPos, endPos, filter, options);
}
dtStatus NavMeshQuery::updateSlicedFindPath(const int maxIter, IntRef *doneIters) {
return m_navQuery->updateSlicedFindPath(maxIter, &doneIters->value);
}
dtStatus NavMeshQuery::finalizeSlicedFindPath(UnsignedIntArray *path, IntRef *pathCount, const int maxPath) {
return m_navQuery->finalizeSlicedFindPath(path->data, &pathCount->value, maxPath);
}
dtStatus NavMeshQuery::finalizeSlicedFindPathPartial(UnsignedIntArray *existing, const int existingSize,
UnsignedIntArray *path, IntRef *pathCount, const int maxPath) {
return m_navQuery->finalizeSlicedFindPathPartial(existing->data, existingSize, path->data, &pathCount->value, maxPath);
} NavMeshQuery.hdtStatus initSlicedFindPath(dtPolyRef startRef, dtPolyRef endRef,
const float* startPos, const float* endPos,
const dtQueryFilter* filter, const unsigned int options = 0);
dtStatus updateSlicedFindPath(const int maxIter, IntRef *doneIters);
dtStatus finalizeSlicedFindPath(UnsignedIntArray *path, IntRef *pathCount, const int maxPath);
dtStatus finalizeSlicedFindPathPartial(UnsignedIntArray *existing, const int existingSize,
UnsignedIntArray *path, IntRef *pathCount, const int maxPath); |
Beta Was this translation helpful? Give feedback.
-
Sorry - I haven't been as attentive to discussions because my pathfinding focuses have shifted - https://x.com/isaac_mason_/status/1957990076727849415 I'd be happy to accept a PR exposing this but probably won't get to it quickly myself. |
Beta Was this translation helpful? Give feedback.
-
Wow, looks awesome @isaac-mason . Will it support DetourCrowd and e.g. offMeshConnections? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I'd like to access these functions in class
dtNavMeshQuery
:initSlicedFindPath
updateSlicedFindPath
finalizeSlicedFindPath
finalizeSlicedFindPathPartial
so I can predict
requestMoveTarget
before it actually runs.Simply extending
recast-navigation.idl
and copy-pasting their definitions into your files doesn't work:Is there a "standard procedure" for migrating them?
Cheers,
Rob
Beta Was this translation helpful? Give feedback.
All reactions