-
Notifications
You must be signed in to change notification settings - Fork 3.6k
NavigationPluginV2 addon #17035
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
base: master
Are you sure you want to change the base?
NavigationPluginV2 addon #17035
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Hello!
At this point we support all the V1 plugin functions + offMeshConnections. These are some enhacements beyond V1:
|
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
@ryantrem since the |
navMeshQuery: NavMeshQuery; | ||
tileCache?: TileCache; | ||
}>((resolve, _reject) => { | ||
GenerateNavMeshWithWorker(meshes, parameters, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like GenerateNavMeshWithWorker
can synchronously throw, but there is no try/catch with a call to _reject. I think that should be added if I'm reading the code correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not review the worker yet please.
// callback function to process the message from the worker | ||
workerOptions.worker.onmessage = (e) => { | ||
if ((e as any).data?.success === false) { | ||
throw new Error(`Unable to generate navMesh: ${e}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do these errors go? I assume they just show up as console errors, and the promise on the other side of this never resolves or rejects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not review the worker yet please.
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Reviewer - this PR has made changes to one or more package.json files. |
@deltakosh @ryantrem @CedricGuillemet The UMD build always fails. I believe we need to update some of the build scripts to properly handle the Thank you! |
My main outstanding questions are:
|
You can calll the create function or you instantiate the plugin for backwards compatibility (in PG). This is where the exported let
There are onyl two files where backwards compatility playes role: the plugin class and the crowd class |
Already working examples (I need to tide up the code a bit):
http://localhost:1338/#KVQP83#203 = navmesh generation stuff
http://localhost:1338/#KVQP83#209 = obstacles
http://localhost:1338/#KVQP83#213 = offmesh
http://localhost:1338/#KVQP83#245 = move along navmesh with WASD
http://localhost:1338/#KVQP83#244 = raycast