Open greyheron opened 5 years ago
I did a bit more troubleshooting on this, and comparing it with navmesh example, the only thing I noticed is that my project was including the following line in khafile.js:
project.addLibrary("C:/Development/Armory/armsdk/lib/haxerecast");
I had set Navigation to "Auto" in Armory Project > Modules, same than the example mentioned above, the only way to skip the error was to manually set it to "Disabled". `
I haven't been able to test the build but it seems to build successfully.
I tested it and I can confirm that navigation as expected doesn't work. Having the same problem with navmesh example when doing C target, not sure if it is misconfiguration on my side or a genuine issue.
Sorry it's an issue in armory, thanks for bringing that up. Fix coming.
Was a fix to this problem published? I am finding the exact same thing right now, trying to publish.
@AdrianLeeMagill I don't think so. What I have done for the time being is work around it by not using and implementing my own navigation however the NavAgent trait can be used as long as you pass them an array of Vec4 with the nodes of a given path.
@greyheron Thanks for the heads up. I am currently working on a work around as well but would like this problem fixed as I am going public with my game soon. As soon as it starts making money, I would like to support this project, but can't do it until I can publish my work.
I don't know much about how the hashlink/cpp part of the engine works, but I figured that maybe with an approach similar to how Haxebullet does it at least it would compile again. So this is what I did: https://github.com/N8n5h/haxerecast/tree/fix-c-compiling
Right now is not complete, as the findPath
function is causing problems that I'm not sure how to solve:
__cpp__
doesn't work throwing a compiling error, probably because of the macros used to process the webidl. Also I don't have the setup to compile to C targets so I can't test if this would work after compiling the project.
@luboslenco is this the correct approach, or something else should be done for haxerecast for C targets?
@N8n5h Thanks. I think there may have been an update that took care of the problem. I uninstalled both Blender and Armory3d then reinstalled Blender, adding Armory3d as an add on and it seems to be publishing to HTML5 without errors, though I have not had the chance to test the results yet. I will post an update on this thread to let everyone know how it goes when I get the chance to work on it again.
@AdrianLeeMagill
I think there may have been an update that took care of the problem
Yes, in the latest version of Armory the current exposed functionality of recast navigation should work fine with html5 and Krom targets. The problem is with C targets, that's what my attempt of solving it was for.
When trying to build/publish a project in either Android C or Windows C the build fails with the following error:
..\armsdk\lib\haxerecast\Sources/haxerecast/Recast.hx:28: characters 3-13 : Type not found : HaxeRecast ..\armsdk\lib\haxerecast\Sources/haxerecast/Recast.hx:37: characters 3-13 : Type not found : HaxeRecast ..\armsdk\lib\haxerecast\Sources/haxerecast/Recast.hx:54: characters 3-13 : Type not found : HaxeRecast