Closed AleksandarMIlenkovic closed 4 years ago
I wanted to ask how do you make costtable json for navmesh.
There is not CLI tool yet since I needed cost tables only once for Dive so far. However, you can do it like so: When you nav mesh is ready, load it via NavMeshLoader
into your application. After loading, use the following code to setup a new instance of CostTable
:
const costTable = new CostTable();
costTable.init( navMesh );
const json = costTable.toJSON();
I've then downloaded the resulting JSON and put it in my project directory.
Unfortunately, since NavMeshLoader
has some browser dependencies, it's problematic to implement this code as a node.js CLI tool.
BTW: Cool game^^.
Great, thanks!
HI, first of all to say, i love yuka, great library! Last year I was playing with it making a game from shooter example http://gamestudiohx.com/bata/som/entity/shooter/ , and since i saw dive and all new features, i wanted to implement navmesh and some other cool stuff you've added since... I wanted to ask how do you make costtable json for navmesh. Is there a tool for that or if you can give me some directions. Thanks