isaac-mason / recast-navigation-js

JavaScript navigation mesh construction, path-finding, and spatial reasoning toolkit. WebAssembly port of Recast Navigation.
https://recast-navigation-js.isaacmason.com
MIT License
273 stars 25 forks source link

use requestMoveTarget but the agent don't move #414

Closed fangliangv587 closed 4 months ago

fangliangv587 commented 4 months ago

the version is 0.33.0,i use vite + vue3 + threejs version166,when i use the requestMoveTarget api ,and return true,find the agent rotate but not move ,i dont know why。otherwise,when i use the teleport api,the agent can move dst point,why the requestMoveTarget doesn't work?

isaac-mason commented 4 months ago

Hi @fangliangv587,

I don't have much to go off here to help you. If you can provide a codesandbox or repo demonstrating your issue I'm happy to take a look 🙂

fangliangv587 commented 4 months ago

Hi @fangliangv587,

I don't have much to go off here to help you. If you can provide a codesandbox or repo demonstrating your issue I'm happy to take a look 🙂

i change the office demo 【navmesh-website】to vue,the main code in App.vue ,run the code you will find the performance above。thank you very much。 the code is in nav-test-master.zip or [https://gitee.com/fangliangv587/nav-test]

fangliangv587 commented 4 months ago

i solve it.the code 'crowd.update(delta);' delta is undefine. i am sorry. thank you any more .

isaac-mason commented 4 months ago

Sorry I didn't get a chance to look at this, but glad to hear you solved your issue @fangliangv587! 🙂

isaac-mason commented 4 months ago

It sounds like undefined was being treated as zero, so detour would determine the desired movement direction, but then multiply it by 0. That would explain why agents rotated but didn't move.