Replies: 6 comments
-
Could you share a codesandbox/repo with a reproduction of this issue? Happy to take a look 🙂 |
Beta Was this translation helpful? Give feedback.
-
https://github.com/fax1ty/recast-findpath-repro-bun To clarify: this also doesn't work with P.S. I don't know why, but |
Beta Was this translation helpful? Give feedback.
-
Hey @fax1ty, can you provide the code including the call to Without seeing that I'm guessing here - but assuming that you're using Loading the navmesh export from the repo, and calling const { point: start } = navMeshQuery.findClosestPoint({
x: 88.56768727667445,
y: 0.20000000298023224,
z: -102.46081100138719,
});
const { point: end } = navMeshQuery.findClosestPoint({
x: -74.65151041753724,
y: 0.20000000298023224,
z: 111.50702247544152,
});
const { path } = navMeshQuery.computePath(start, end); Also happy to take a look at your issue with |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Agents don't work either const {
point: to,
success,
status,
} = this.navigation.findClosestPoint(point);
if (!success) throw new Error(statusToReadableString(status));
const result = this.agent.requestMoveTarget(to);
console.log(result); // -> false this.agent = crowd.addAgent(this.actor.rigidbody.translation(), {}); const crowd = new Crowd(navigation, {
maxAgents: Number.MAX_SAFE_INTEGER,
maxAgentRadius: Number.MAX_SAFE_INTEGER,
}); UPD: It's ok with const crowd = new Crowd(navigation, {
maxAgents: 10000,
maxAgentRadius: 100,
}); |
Beta Was this translation helpful? Give feedback.
-
Hey, Note that increasing the query extents increases the overhead of the operation, so it's best to use a value just big enough for your use case. Similarly, specifying a large max number of agents will allocate extra memory for each agent. That's why setting max agents to such a large value was causing issues. As for your computePath question - if there's nothing in between the start and end points, then you'll only get two points. I can't help you without more information though. Without sharing a reproduction it's impossible to know whether you're running into issues with usage or with the library. If you haven't already, take a look through the examples 🙂 |
Beta Was this translation helpful? Give feedback.
-
vite-node:
bun:
Additional context
.findClosestPoint()
returnsconsole.log(RecastThree) returns
undefined
But
.findRandomPoint()
is working as expected. ReturnsAm I doing anything wrong?
Beta Was this translation helpful? Give feedback.
All reactions