Giter Club home page Giter Club logo

recast4j's Introduction

Build Status Repo Size Maven Central Languages Dependencies

Recast4j

Java Port of Recast and Detour navigation mesh toolset.

screenshot of a navmesh baked with the sample program

Recast

Recast is state of the art navigation mesh construction toolset for games.

Recast is...

  • 🤖 Automatic - throw any level geometry at it and you will get a robust navmesh out
  • 🏎️ Fast - swift turnaround times for level designers
  • 🧘 Flexible - easily customize the navmesh generation and runtime navigation systems to suit your specific game's needs.

Recast constructs a navmesh through a multi-step rasterization process:

  1. First Recast voxelizes the input triangle mesh by rasterizing the triangles into a multi-layer heightfield.
  2. Voxels in areas where the character would not be able to move are removed by applying simple voxel data filters.
  3. The walkable areas described by the voxel grid are then divided into sets of 2D polygonal regions.
  4. The navigation polygons are generated by triangulating and stiching together the generated 2d polygonal regions.

Detour

Recast is accompanied by Detour, a path-finding and spatial reasoning toolkit. You can use any navigation mesh with Detour, but of course the data generated with Recast fits perfectly.

Detour offers a simple static navmesh data representation which is suitable for many simple cases. It also provides a tiled navigation mesh representation, which allows you to stream of navigation data in and out as the player progresses through the world and regenerate sections of the navmesh data as the world changes.

More information about Recast and Detour

Java Version

How To Use

The API is kept as close to https://github.com/recastnavigation/recastnavigation as possible so most of the information and hints apply to recast4j too. You can find a lot of examples in tests e.g.

Java Version Enhancements

recast

  • out-of-the-box support for multi-threaded builds
  • support for rasterizing filled volumes: sphere, capsule and box

detour

  • finding random points constrained by a cricle

detour-tile-cache

  • more compact file format due to reduced data structures and better compression with LZ4

detour-extras

detour-dynamic

  • robust support for dynamic nav meshes combining pre-built voxels with dynamic objects which can be freely added and removed

Building from Source

All the modules can be built with a single gradle command:

./gradlew clean build shadow

Once the build is completed, the recast-demo application can be run as follows:

java -jar ./recast-demo/build/libs/recast-demo-1.5.8-SNAPSHOT-all.jar

Binaries

Releases

Recast4j releases are available in Maven Central Repository. Maven:

<dependency>
	<groupId>org.recast4j</groupId>
	<artifactId>recast</artifactId>
	<version>1.5.7</version>
</dependency>
<dependency>
	<groupId>org.recast4j</groupId>
	<artifactId>detour</artifactId>
	<version>1.5.7</version>
</dependency>
<dependency>
	<groupId>org.recast4j</groupId>
	<artifactId>detour-crowd</artifactId>
	<version>1.5.7</version>
</dependency>
<dependency>
	<groupId>org.recast4j</groupId>
	<artifactId>detour-tile-cache</artifactId>
	<version>1.5.7</version>
</dependency>
<dependency>
	<groupId>org.recast4j</groupId>
	<artifactId>detour-extras</artifactId>
	<version>1.5.7</version>
</dependency>
<dependency>
	<groupId>org.recast4j</groupId>
	<artifactId>detour-dynamic</artifactId>
	<version>1.5.7</version>
</dependency>

Gradle:

implementation 'org.recast4j:recast:1.5.7'
implementation 'org.recast4j:detour:1.5.7'
implementation 'org.recast4j:detour-crowd:1.5.7'
implementation 'org.recast4j:detour-tile-cache:1.5.7'
implementation 'org.recast4j:detour-extras:1.5.7'
implementation 'org.recast4j:detour-dynamic:1.5.7'

License

Recast & Detour is licensed under ZLib license, see License.txt for more information.

recast4j's People

Contributors

dependabot[bot] avatar leif81 avatar mitm001 avatar ppiastucki avatar sagarjgb avatar silentorb avatar wehoho avatar zcxv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

recast4j's Issues

InputGeom diff

Hi..does this project based on the lastest version of recast?I try to build the nav mesh from my obj file,i got this error:

java.lang.ArrayStoreException
at java.lang.System.arraycopy(Native Method)
at org.recast4j.detour.NavMesh.baseOffMeshLinks(NavMesh.java:920)
at org.recast4j.detour.NavMesh.addTile(NavMesh.java:460)
at org.recast4j.detour.NavMesh.(NavMesh.java:255)
at org.recast4j.detour.DemoTest.createNavMesh(DemoTest.java:30)

I found that the NavMeshDataCreateParams for nav building is different from the native c++ code..

// params.offMeshConVerts = m_geom->getOffMeshConnectionVerts();
// params.offMeshConRad = m_geom->getOffMeshConnectionRads();
// params.offMeshConDir = m_geom->getOffMeshConnectionDirs();
// params.offMeshConAreas = m_geom->getOffMeshConnectionAreas();
// params.offMeshConFlags = m_geom->getOffMeshConnectionFlags();
// params.offMeshConUserID = m_geom->getOffMeshConnectionId();
// params.offMeshConCount = m_geom->getOffMeshConnectionCount();

The structure of InputGeom Class doest not match the native code.. Maybe i do something wrong??

Li_Track.zip

Request

Hello,

This is merely a feature request.

I have done this in the version I use and am addicted to it. It would be nice to have the methods buildSingleThread and buildMultiThread in the RecastBuilder class have an option to be verbose and println or log estimated time to build RecastBuilderResult in real time. This allows me to estimate build times so I can do other things. In this example I know I am looking at 32 x 10 sec = aprox 320 seconds build time.

Something that prints out like this,
32tw x 32th = 1024
Added To Result 1 of 1024: TW 0 TH 0 Time 1043 ms
Added To Result 2 of 1024: TW 0 TH 1 Time 452 ms
[snip]
Returned File Time 12 s
Added To Result 33 of 1024: TW 1 TH 0 Time 332 ms
Added To Result 34 of 1024: TW 1 TH 1 Time 343 ms
[snip]
Returned result Time 10 s
[snip]

On a side note, thank you for your java conversion of recast. Your work is much appreciated.

Help

Is there a document can teach me how to use it? And i don't understand what are the reference id use for?Is build with postion of a dot?

NavMesh offset bug?

I have been fine tuning things when creating the NavMesh and have found what looks to be a bug. Not sure if its from my side or Recast. I have other NavMesh generation code that doesn't exhibit the same problem.

To explain:

  1. When a NavMesh is generated, it is being offset in the +Y position by the amount of m_cellHeight.

This means the NavMesh is always m_cellHeight above the geometry its derived from, so in order to make the Agents not appear to be floating in air, the underlying geometry has to be moved in the +Y direction by m_cellHeight after the NavMesh has been generated.

  1. The entire NavMesh is being offset from the underlying geometry in the -X and -Z directions by an amount based off m_agentRadius.

This is an m_agentRadius of 2.0f (exaggerated size to show problem), note the NavMesh is shifted 1.0f in the -X direction and 1.0f in the -Z direction.

https://imgur.com/a/1e79j

This is a top view showing -X and -Z shifts.

https://imgur.com/a/W1Non

I can move the geometry after creating the NavMesh to align things properly but wanted to know if you have noticed the NavMesh being offset from the underlying geometry when you create yours?

Note: Click image on imgur to enlarge.

API of Sliced PathFinding

Hey,
this is partially a request for help and maybe some suggestion to redesign the API.
For me, Sliced Pathfinding has two uses:

  1. Even the load onto multiple frames
  2. Do a Partial Search and re-calculate during the walk

Now I'm having a problem with Point 2 but it's also looking like that in the original Recast Source Code:
It's about this method: http://www.stevefsp.org/projects/rcndoc/prod/classdtNavMeshQuery.html#a01b18dcb5d25fc392b6030ae5d4f310e
In older Versions, finalizeSlicedFindPathPartial was having the "out" parameter existing, but that probably was a mistake and existing now is an input.

Now how am I supposed to pass existing though? In both implementations (the original and recast4j), updateSlicedFindPath doesn't expose the already found polygons, which would've been what one needs. I guess they are only stored in the query, but there is no getter for that either.

I know you want to stay as close to the recast api as possible, so maybe we have to take it upstream (if it's not a misunderstanding on my side).
Also it would be nice to have a test case for this/these two.

Unable to run the .jar in macOS

Hi,

I tried to run the demo but it is not working on macOS 10.15.7

 java -jar recast-demo-1.2.2-SNAPSHOT.jar                                                                                                        20:32:25
Exception in thread "main" java.lang.ExceptionInInitializerError
	at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1831)
	at org.recast4j.demo.RecastDemo.start(RecastDemo.java:220)
	at org.recast4j.demo.RecastDemo.main(RecastDemo.java:593)
Caused by: java.lang.IllegalStateException: GLFW windows may only be created on the main thread and that thread must be the first thread in the process. Please run the JVM with -XstartOnFirstThread. For offscreen rendering, make sure another window toolkit (e.g. AWT or JavaFX) is initialized before GLFW.
	at org.lwjgl.glfw.EventLoop$OffScreen.<clinit>(EventLoop.java:39)
	... 3 more

^ The above seems to be solved adding -XstartOnFirstThread

And then:

user@machine:/Users/user/Desktop/recast4j-parent-1.2.5/recast-demo/target: java -XstartOnFirstThread -jar recast-demo-1.2.2-SNAPSHOT.jar                                                                                  20:32:34
20:36:06.321 [main] DEBUG org.recast4j.demo.RecastDemo - Intel Inc.
20:36:06.323 [main] DEBUG org.recast4j.demo.RecastDemo - 2.1 INTEL-14.7.8
20:36:06.323 [main] DEBUG org.recast4j.demo.RecastDemo - Intel(R) Iris(TM) Plus Graphics 655
20:36:06.323 [main] DEBUG org.recast4j.demo.RecastDemo - 1.20
Exception in thread "main" java.lang.IllegalStateException
	at org.recast4j.demo.ui.NuklearGL.<init>(NuklearGL.java:184)
	at org.recast4j.demo.ui.NuklearUI.<init>(NuklearUI.java:89)
	at org.recast4j.demo.RecastDemo.start(RecastDemo.java:331)
	at org.recast4j.demo.RecastDemo.main(RecastDemo.java:593)

Which is throwing at:
if (glGetShaderi(vert_shdr, GL_COMPILE_STATUS) != GL_TRUE) {

Do you know why?

PS: It never runs on a windows Virtualbox Windows 10 machine which shows as the graphic device:

23:32:14.486 [main] DEBUG org.recast4j.demo.RecastDemo - VMware, Inc.
23:32:14.486 [main] DEBUG org.recast4j.demo.RecastDemo - 2.1 Mesa mesa-17.3.9
23:32:14.486 [main] DEBUG org.recast4j.demo.RecastDemo - SVGA3D; build: RELEASE;
23:32:14.486 [main] DEBUG org.recast4j.demo.RecastDemo - 1.20

And then the same error for NuklearGL.java:184

Can't figure out how to correctly read the mesh information of a PolyMesh and PolyMeshDetail

This is more of a request for help rather than an issue, but I've been trying to read and output the non-triangulated mesh data to an obj.

What I have so far is this:

`for (int i = 0; i < polyMesh.nverts; i++) {
// not sure this is right
int xIndex = polyMesh.verts[i * 3];
int yIndex = polyMesh.verts[i * 3 + 1];
int zIndex = polyMesh.verts[i * 3 + 2];

            float x = polyMeshDetail.verts[xIndex];
            float y = polyMeshDetail.verts[yIndex];
            float z = polyMeshDetail.verts[zIndex];

            fw.write("v " + x + " " + y + " " + z + "\n");
        }

        for (int i = 0; i < polyMesh.npolys; i++) {
            int polygonIndex = i * 2 * polyMesh.nvp; // following their specs?
            int[] polygon = new int[polyMesh.nvp];

            // fill the polygon with the corresponding part in the polys array
            for (int indexOffset = 0; indexOffset < polyMesh.nvp; indexOffset++) {
                int polygonVertexIndex = polygonIndex + indexOffset;
                polygon[indexOffset] = polyMesh.polys[polygonVertexIndex];
            }

            fw.write("f ");
            for (int a = 0; a < polygon.length; a++) {
                int vertexIndex = polygon[a];
                if (vertexIndex == 65535) {
                    continue;
                }

                fw.write("" + (polygon[a] + 1));
                if (a < polygon.length - 1) {
                    fw.write(" ");
                }
            }
            fw.write("\n");
        }`

Any help on this would be appreciated!

Attached is a picture of what the rendered obj looks like. (It at least renders so my code is half correct.)
screenshot 2016-11-04 04 49 54

Fail NavMeshQuery after loading all_tiles_tilecache.bin

I exported the bin-file from recastnavigation (C ++), I use TileCacheReader to load the bin in the java-version, navmesh is loaded, but incorrectly, in a different way, unlike the C ++ example of RecastDemo.
I exported in java obj to bin using TileCacheWriter.

	boolean cCompatibility = true;
	InputGeom geom = new ObjImporter().load(RecastBuilder.class.getResourceAsStream("nav_test.obj"));
	TestTileLayerBuilder layerBuilder = new TestTileLayerBuilder(geom);
	List<byte[]> layers = layerBuilder.build(ByteOrder.LITTLE_ENDIAN, cCompatibility, 1);
	TileCache tc = getTileCache(geom, ByteOrder.LITTLE_ENDIAN, cCompatibility);
	for (byte[] data : layers) {
		long ref = tc.addTile(data, 0);
		tc.buildNavMeshTile(ref);
	}
	
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	writer.write(baos, tc, ByteOrder.LITTLE_ENDIAN, cCompatibility);
	
	try(OutputStream outputStream = new FileOutputStream("_temp.bin")) {
		baos.writeTo(outputStream);
	}

Then again I load bin TileCacheReader, the same problems. NavMeshQuery is incorrectly formed, I can not correctly get information on polygons.
Can you check the problem?

Error when running on ubuntu

Hi, I am facing this problem when trying to run a demo on Ubuntu 20.04:

java -jar recast-demo-1.5.3-SNAPSHOT-all.jar

  Exception in thread "main" java.lang.IllegalArgumentException 
      at java.base/java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1293)
      at java.base/java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1215)
      at java.base/java.util.concurrent.Executors.newFixedThreadPool(Executors.java:155)
      at org.recast4j.demo.builder.TileNavMeshBuilder.<init>(TileNavMeshBuilder.java:46)
      at org.recast4j.demo.RecastDemo.<init>(RecastDemo.java:96)
      at org.recast4j.demo.RecastDemo.main(RecastDemo.java:584)

Do you know how to fix this problem? Thank you in advance.

Errors when trying to compile and run the Recast Demo

You may not be finished with recast-demo, but I figure I will create an issue since it is in the master branch now. Below is the output when I try to run mvn clean install.

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building recast-demo 1.0.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ recast-demo ---
[INFO] Deleting C:\Users\jfe.CAMPUS\Documents\GitHub\recast4j\recast-demo\target
[INFO]
[INFO] --- maven-nativedependencies-plugin:0.0.7:copy (unpacknatives) @ recast-demo ---
[INFO] Saving natives in C:\Users\jfe.CAMPUS\Documents\GitHub\recast4j\recast-demo\target\natives
[INFO] G:org.lwjgl - A:lwjgl-tinyfd - C:natives-windows
[info] Copying natives from lwjgl-tinyfd-3.2.0-natives-windows.jar
[info] Copying native - META-INF/
[info] Copying native - META-INF/MANIFEST.MF
[info] Copying native - lwjgl_tinyfd.dll
[info] Copying native - lwjgl_tinyfd.dll.sha1
[info] Copying native - lwjgl_tinyfd32.dll
[info] Copying native - lwjgl_tinyfd32.dll.sha1
[info] Copying native - META-INF/versions/
[info] Copying native - META-INF/versions/9/
[info] Copying native - META-INF/versions/9/module-info.class
[info] Copying native - META-INF/INDEX.LIST
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ recast-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ recast-demo ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 30 source files to C:\Users\jfe.CAMPUS\Documents\GitHub\recast4j\recast-demo\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[103,55] cannot find symbol
symbol: method getCompactHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[105,71] cannot find symbol
symbol: method getCompactHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[108,55] cannot find symbol
symbol: method getCompactHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[110,74] cannot find symbol
symbol: method getCompactHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[112,55] cannot find symbol
symbol: method getCompactHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[114,73] cannot find symbol
symbol: method getCompactHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[116,55] cannot find symbol
symbol: method getSolidHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[119,64] cannot find symbol
symbol: method getSolidHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[122,55] cannot find symbol
symbol: method getSolidHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[125,67] cannot find symbol
symbol: method getSolidHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[128,55] cannot find symbol
symbol: method getContourSet()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[131,59] cannot find symbol
symbol: method getContourSet()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[134,55] cannot find symbol
symbol: method getContourSet()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[137,59] cannot find symbol
symbol: method getContourSet()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[138,56] cannot find symbol
symbol: method getContourSet()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[141,55] cannot find symbol
symbol: method getContourSet()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[144,56] cannot find symbol
symbol: method getContourSet()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[147,55] cannot find symbol
symbol: method getCompactHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[149,73] cannot find symbol
symbol: method getCompactHeightfield()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[151,32] cannot find symbol
symbol: method getContourSet()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[152,69] cannot find symbol
symbol: method getContourSet()
location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[119,30] decodePolyIdTile(long) is not public in org.recast4j.detour.NavMesh; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[125,18] getType() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[132,39] cannot find symbol
symbol: method isInClosedList(long)
location: variable query of type org.recast4j.detour.NavMeshQuery
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[138,49] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[171,22] getType() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[176,43] cannot find symbol
symbol: method isInClosedList(long)
location: variable query of type org.recast4j.detour.NavMeshQuery
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[179,61] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[191,55] DT_NULL_LINK is not public in org.recast4j.detour.NavMesh; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[191,78] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[191,91] next is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[192,29] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[192,42] edge is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[195,29] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[195,42] edge is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[245,18] getType() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[259,63] DT_NULL_LINK is not public in org.recast4j.detour.NavMesh; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[259,86] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[259,99] next is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[260,37] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[260,50] edge is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[395,28] bmin is not public in org.recast4j.recast.ContourSet; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[469,28] bmin is not public in org.recast4j.recast.ContourSet; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[517,42] RC_BORDER_VERTEX is not public in org.recast4j.recast.RecastConstants; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[533,28] bmin is not public in org.recast4j.recast.ContourSet; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[557,49] RC_AREA_BORDER is not public in org.recast4j.recast.RecastConstants; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[585,42] RC_BORDER_VERTEX is not public in org.recast4j.recast.RecastConstants; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[939,30] cannot find symbol
symbol: method getNodePool()
location: variable query of type org.recast4j.detour.NavMeshQuery
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[944,41] cannot find symbol
symbol: method getNodeMap()
location: variable pool of type org.recast4j.detour.NodePool
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[950,32] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[950,45] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[950,64] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[956,41] cannot find symbol
symbol: method getNodeMap()
location: variable pool of type org.recast4j.detour.NodePool
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[962,29] pidx is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[965,57] pidx is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[969,32] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[969,45] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[969,64] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[970,34] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[970,49] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[970,70] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[1012,17] getType() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/builder/SoloNavMeshBuilder.java:[54,28] constructor RecastConfig in class org.recast4j.recast.RecastConfig cannot be applied to given types;
required: org.recast4j.recast.RecastConstants.PartitionType,float,float,float,float,float,float,int,int,float,float,int,float,float,int,org.recast4j.recast.AreaModification
found: org.recast4j.recast.RecastConstants.PartitionType,float,float,float,float,float,float,int,int,float,float,int,float,float,int,org.recast4j.recast.AreaModification,boolean,boolean,boolean
reason: actual and formal argument lists differ in length
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[414,46] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[415,46] setArea(int) is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[417,46] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[418,53] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[419,53] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[421,53] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[423,53] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[90,44] cannot find symbol
symbol: method getIncludeFlags()
location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[154,51] cannot find symbol
symbol: method getIncludeFlags()
location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[157,51] cannot find symbol
symbol: method getIncludeFlags()
location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[160,51] cannot find symbol
symbol: method getIncludeFlags()
location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[163,51] cannot find symbol
symbol: method getIncludeFlags()
location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[166,17] cannot find symbol
symbol: method setIncludeFlags(int)
location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[INFO] 76 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.407 s
[INFO] Finished at: 2019-01-08T12:34:42-05:00
[INFO] Final Memory: 18M/304M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project recast-demo: Compilation failure: Compilation failure:
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[103,55] cannot find symbol
[ERROR] symbol: method getCompactHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[105,71] cannot find symbol
[ERROR] symbol: method getCompactHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[108,55] cannot find symbol
[ERROR] symbol: method getCompactHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[110,74] cannot find symbol
[ERROR] symbol: method getCompactHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[112,55] cannot find symbol
[ERROR] symbol: method getCompactHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[114,73] cannot find symbol
[ERROR] symbol: method getCompactHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[116,55] cannot find symbol
[ERROR] symbol: method getSolidHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[119,64] cannot find symbol
[ERROR] symbol: method getSolidHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[122,55] cannot find symbol
[ERROR] symbol: method getSolidHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[125,67] cannot find symbol
[ERROR] symbol: method getSolidHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[128,55] cannot find symbol
[ERROR] symbol: method getContourSet()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[131,59] cannot find symbol
[ERROR] symbol: method getContourSet()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[134,55] cannot find symbol
[ERROR] symbol: method getContourSet()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[137,59] cannot find symbol
[ERROR] symbol: method getContourSet()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[138,56] cannot find symbol
[ERROR] symbol: method getContourSet()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[141,55] cannot find symbol
[ERROR] symbol: method getContourSet()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[144,56] cannot find symbol
[ERROR] symbol: method getContourSet()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[147,55] cannot find symbol
[ERROR] symbol: method getCompactHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[149,73] cannot find symbol
[ERROR] symbol: method getCompactHeightfield()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[151,32] cannot find symbol
[ERROR] symbol: method getContourSet()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/NavMeshRenderer.java:[152,69] cannot find symbol
[ERROR] symbol: method getContourSet()
[ERROR] location: variable rcBuilderResult of type org.recast4j.recast.RecastBuilder.RecastBuilderResult
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[119,30] decodePolyIdTile(long) is not public in org.recast4j.detour.NavMesh; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[125,18] getType() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[132,39] cannot find symbol
[ERROR] symbol: method isInClosedList(long)
[ERROR] location: variable query of type org.recast4j.detour.NavMeshQuery
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[138,49] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[171,22] getType() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[176,43] cannot find symbol
[ERROR] symbol: method isInClosedList(long)
[ERROR] location: variable query of type org.recast4j.detour.NavMeshQuery
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[179,61] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[191,55] DT_NULL_LINK is not public in org.recast4j.detour.NavMesh; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[191,78] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[191,91] next is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[192,29] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[192,42] edge is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[195,29] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[195,42] edge is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[245,18] getType() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[259,63] DT_NULL_LINK is not public in org.recast4j.detour.NavMesh; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[259,86] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[259,99] next is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[260,37] links is not public in org.recast4j.detour.MeshTile; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[260,50] edge is not public in org.recast4j.detour.Link; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[395,28] bmin is not public in org.recast4j.recast.ContourSet; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[469,28] bmin is not public in org.recast4j.recast.ContourSet; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[517,42] RC_BORDER_VERTEX is not public in org.recast4j.recast.RecastConstants; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[533,28] bmin is not public in org.recast4j.recast.ContourSet; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[557,49] RC_AREA_BORDER is not public in org.recast4j.recast.RecastConstants; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[585,42] RC_BORDER_VERTEX is not public in org.recast4j.recast.RecastConstants; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[939,30] cannot find symbol
[ERROR] symbol: method getNodePool()
[ERROR] location: variable query of type org.recast4j.detour.NavMeshQuery
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[944,41] cannot find symbol
[ERROR] symbol: method getNodeMap()
[ERROR] location: variable pool of type org.recast4j.detour.NodePool
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[950,32] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[950,45] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[950,64] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[956,41] cannot find symbol
[ERROR] symbol: method getNodeMap()
[ERROR] location: variable pool of type org.recast4j.detour.NodePool
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[962,29] pidx is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[965,57] pidx is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[969,32] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[969,45] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[969,64] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[970,34] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[970,49] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[970,70] pos is not public in org.recast4j.detour.Node; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/draw/RecastDebugDraw.java:[1012,17] getType() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/builder/SoloNavMeshBuilder.java:[54,28] constructor RecastConfig in class org.recast4j.recast.RecastConfig cannot be applied to given types;
[ERROR] required: org.recast4j.recast.RecastConstants.PartitionType,float,float,float,float,float,float,int,int,float,float,int,float,float,int,org.recast4j.recast.AreaModification
[ERROR] found: org.recast4j.recast.RecastConstants.PartitionType,float,float,float,float,float,float,int,int,float,float,int,float,float,int,org.recast4j.recast.AreaModification,boolean,boolean,boolean
[ERROR] reason: actual and formal argument lists differ in length
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[414,46] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[415,46] setArea(int) is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[417,46] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[418,53] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[419,53] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[421,53] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/RecastDemo.java:[423,53] getArea() is not public in org.recast4j.detour.Poly; cannot be accessed from outside package
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[90,44] cannot find symbol
[ERROR] symbol: method getIncludeFlags()
[ERROR] location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[154,51] cannot find symbol
[ERROR] symbol: method getIncludeFlags()
[ERROR] location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[157,51] cannot find symbol
[ERROR] symbol: method getIncludeFlags()
[ERROR] location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[160,51] cannot find symbol
[ERROR] symbol: method getIncludeFlags()
[ERROR] location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[163,51] cannot find symbol
[ERROR] symbol: method getIncludeFlags()
[ERROR] location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] /C:/Users/jfe.CAMPUS/Documents/GitHub/recast4j/recast-demo/src/main/java/org/recast4j/demo/tool/TestNavmeshTool.java:[166,17] cannot find symbol
[ERROR] symbol: method setIncludeFlags(int)
[ERROR] location: variable m_filter of type org.recast4j.detour.DefaultQueryFilter
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

getPolyHeight(long ref, float[] pos)

I found that when using a large crowd that moves along the edge of the navigation mesh, that a spatial can be pushed off the mesh when it enters a triangle that is very small or where there are two triangles that share a single vertex and the angle between them forms a "V" where the space inside the "V" is off mesh.

It looks like this happens because the velocity of the spatial along with the distance left inside the navigation mesh triangle to travel is to small for a course correction to occur because the spatials following it are blocking its path. This eventually leads to it being left no place to go except off mesh which causes it to throw the exception in getPolyHeight(long ref, float[] pos).

This may never happen in game because unless you are moving an army of spatials there would not be enough spatials following to cause a problem.

Is it possible that when this exception happens, rather than throwing an exception, try to warp the spatial back onto the mesh at the nearest valid position and replan the path?

After the crowd passes it would have an open path.

I hope the explanation is clear.

package private2

I just updated to 1.0.7 by creating a new library and just adding the maven jars.

Heres whats still package private.

For dumpActiveAgents in RecastSoloMeshTest: ag.targetState, ag.nvel

In DetourCommon: vDist() method.

Finally: RecastConstants.RC_CONTOUR_TESS_WALL_EDGES

TileCache offmesh conenctions.

Hi Piotr,

Starting to learn the tile cache stuff and while reading I see this,
TileCacheMeshProcess.java#L25

but recast has this where we set the poly flags and offmesh connections.
Sample_TempObstacles.cpp#L192

when reading NavMesh addTile() I see how connect the links for offmesh connections,
NavMesh.java#L478

but in TileCache addTile(), I dont see how you are fixing up the links?
TileCache.java#L208

I seem to be missing how this works.

What is the process here for setting area types, flags, and offmesh connections with Recast4j tile cache?

NavMeshDataCreateParams/Recast/RecastConstants public parameters

This could be considered a question or a newbie mistake on my part.

When using NavMeshDataCreateParams I have to declare these public in order to use them in a non-maven project in Netbeans. Note: I use recast4j as a library.

public int[] detailMeshes;			///< The height detail sub-mesh data. [Size: 4 * #polyCount]
public float[] detailVerts;		///< The detail mesh vertices. [Size: 3 * #detailVertsCount] [Unit: wu]
public int detailVertsCount;		///< The number of vertices in the detail mesh.
public int[] detailTris;			///< The detail mesh triangles. [Size: 4 * #detailTriCount]
public int detailTriCount;			///< The number of triangles in the detail mesh.

I personally need access to these variables because I save the parameters to file so I do not have to build the NavMesh from scratch.

When using Recast, I have to declare this method as public also,

   public static int[] markWalkableTriangles(Context ctx, float walkableSlopeAngle, float[] verts, int[] tris, int nt, AreaModification areaMod) {}

When using RecastConstants, this has to be declared public,

  public static int RC_MESH_NULL_IDX = 0xffff;

If I am making a mistake please let me know.

Robert

the leng always 0

private Poly[] readPolys(var buf:ByteBuffer, var header:MeshHeader) {
        var polys:Array= new Poly[header.polyCount];
        for (var i:int= 0; i < polys.length; i++) {
            polys[i] = new Poly(i);
            polys[i].firstLink = buf.getInt();
            for (var j:int= 0; j < polys[i].verts.length; j++) {
                polys[i].verts[j] = buf.getShort() & 0xFFFF;
            }
            for (var j:int= 0; j < polys[i].neis.length; j++) {
                polys[i].neis[j] = buf.getShort() & 0xFFFF;
            }
            polys[i].flags = buf.getShort() & 0xFFFF;
            polys[i].vertCount = buf.get() & 0xFF;
            polys[i].areaAndtype = buf.get() & 0xFF;
        }
        return polys;
    }

ArrayIndexOutOfBoundsException while building mesh

Hello,
I'm trying to generate a nav mesh from a working OBJ. However, I'm facing an issue that I can't really define as a bug but I can't trace it back properly.

So, I'm providing the following code:

`
InputGeomProvider geometry = new SimpleInputGeomProvider(adt.getShapeMesh().getPoints().toArray(null), indices);
System.out.println(indices[1] * 3);

                RecastConfig cfg = new RecastConfig(RecastConstants.PartitionType.WATERSHED,
                        RecastParameters.getCellSize(), RecastParameters.getCellHeight(), RecastParameters.getWorldUnitWalkableHeight(),
                        RecastParameters.getWalkableRadius(), RecastParameters.getWalkableClimb(), RecastParameters.getWalkableSlopeAngle(),
                        RecastParameters.getMinRegionSize(), RecastParameters.getMergeRegionSize(), RecastParameters.getMaxEdgeLen(),
                        RecastParameters.getMaxSimplificationError(), RecastParameters.getTileVoxelSize(), RecastParameters.getDetailSampleDist(),
                        RecastParameters.getDetailSampleMaxError(), RecastParameters.getTileWidth(), new AreaModification(0x1, 0x07));                    
                RecastBuilderConfig bcfg = new RecastBuilderConfig(cfg, geometry.getMeshBoundsMin(), geometry.getMeshBoundsMax());
                RecastBuilder rcBuilder = new RecastBuilder();
                
                RecastBuilder.RecastBuilderResult rcResult = rcBuilder.build(geometry, bcfg);`

Which fails on the last line because of this function:

public ChunkyTriMesh(float[] verts, int[] tris, int ntris, int trisPerChunk)

I nailed down the issue to be this line:

if (verts[v] < it.bmin[0]) {

Because v is exceeding the verts length (310977 while the verts length is 310977). Tracing back the code, I find out that V is defined as:

int v = tris[t + j] * 3;

So, looking back to my code, I find out that t is 0 and j is 1. So, the value of tris[1] is taken and multiplied by 3. The content of this array cell is 1. 1*3 is not, in any case, 310977.

Any clue or idea why I get those weird v values ?

Recast.markWalkableTriangles,

I have found a problem with recast that I cannot seem to figure out how to overcome. I am passing multiple meshes to the Recast.markWalkableTriangles method from a list.

Heres where I found the problem, in Recast.markWalkableTriangles,

https://github.com/ppiastucki/recast4j/blob/cbeaf92ad1b40f23c1b47d5c102f658bcfcac857/recast/src/main/java/org/recast4j/recast/Recast.java#L69

This is calling,

https://github.com/ppiastucki/recast4j/blob/cbeaf92ad1b40f23c1b47d5c102f658bcfcac857/recast/src/main/java/org/recast4j/recast/Recast.java#L77

The problem is that these variables are not the same as those being passed to it from markWalkableTriangles.

int v0, int v1, int v2

They are still set to the previous meshes parameters.

I cant see how this can be. The calling method shows the correct parameters, but then its fragged in the actual method.

Tilecache add obstacle error

Hello, I tried to add an area attribute to tilecacheobject in tilecache, and then I reported an error. This is my test case.
Exception in thread "main" java.lang.RuntimeException: Buffer too small
at org.recast4j.detour.tilecache.TileCacheBuilder.buildTileCacheRegions(TileCacheBuilder.java:162)
at org.recast4j.detour.tilecache.TileCache.buildNavMeshTile(TileCache.java:523)
at org.recast4j.detour.tilecache.TileCache.update(TileCache.java:456)
at TestAddObstacle.testAddObstacle(TestAddObstacle.java:133)
at TestAddObstacle.main(TestAddObstacle.java:105)

java.zip
This test case needs to modify the source code.
Please answer for me. Thank you!

Simplifications and potential bug

Hi, I was reading a lot of the library, because I ported it to use JOML instead of float[3]s.
I discovered multiple places like

if(a < b) return -1;
else if(a > b) return +1;
return 0;

This could be simplified with Integer.compare(a,b) or Float.compare(a,b) (depending on the type).

The bug I discovered is that in RecastContour.getCornerHeight() a boolean is passed, that probably originally was a reference. In Java, it just gets passed, and never set to true. (IntelliSense told me)

clearUnwalkableTriangles should be public.

invCellSize of ProximityGrid is not correct

hi, why invCellSize of ProximityGrid is offerred as constructor arg, instead of calcing using:
this.m_invCellSize = 1.0f/this.m_cellSize;
https://github.com/ppiastucki/recast4j/blob/master/detourcrowd/src/main/java/org/recast4j/detour/crowd/ProximityGrid.java#L73

There will be serious problem when Crowd create m_grid using maxAgentRadius * 3 as invCellSize if agent radius is big, which cause ProximityGrid::addItem running into a really heavy time-consuming loop
https://github.com/ppiastucki/recast4j/blob/master/detourcrowd/src/main/java/org/recast4j/detour/crowd/Crowd.java#L282
https://github.com/ppiastucki/recast4j/blob/master/detourcrowd/src/main/java/org/recast4j/detour/crowd/ProximityGrid.java#L96

WOW

I don't want to bother you on a personal email but I have to say this.

I just ran a test with 1125 simultaneous NPC's moving from distances ranging from 200 world units((1 WU = 1 meter) to 750 wu (i.e so far they are dots at best) to targets within same area, with terrain varying from flat to mountainous, from narrow bottleneck (as in 225 agents down to 1 agent wide) to wide open, even box canyons, up straight and 180 degree cutback narrow stairs, inside and outside targets and only lost 3fps. Which slowly climbed back to no fps loss, on a core i3 with onboard graphics.

That's just scary.

You can close this at anytime. Just wanted to say you have done an amazing job here.

Thank you.

Build Tiling NavMesh with Off Mesh Link throw error

off-mesh link error

Add a Off-Mesh Link then click build will throw error.

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2 at org.recast4j.detour.NavMesh.connectExtOffMeshLinks(NavMesh.java:700) at org.recast4j.detour.NavMesh.addTile(NavMesh.java:470) at org.recast4j.demo.builder.TileNavMeshBuilder.lambda$buildNavMesh$0(TileNavMeshBuilder.java:94) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.recast4j.demo.builder.TileNavMeshBuilder.buildNavMesh(TileNavMeshBuilder.java:94) at org.recast4j.demo.builder.TileNavMeshBuilder.build(TileNavMeshBuilder.java:60) at org.recast4j.demo.RecastDemo.start(RecastDemo.java:255) at org.recast4j.demo.RecastDemo.main(RecastDemo.java:585)

Request for info

Hello,
I would like to use this lib to create some navmesh that could be used by the detour module afterwards. However, I find very little info about the input file structure I should give to recast to generate the navmesh. Is there somewhere the info on what are the steps and the structure of the files ?
Thank you,
Warkdev

Exceptions when on invalid (filtered) polygons

Hey,
Clarification: I don't know if this is entirely our fault or if Detour Crowd should be handling this kind of issue somehow.

  1. When requestMoveTarget to a place which has a valid polygon, but is unwalkable for that agent because of Filter restrictions, the following NPE is thrown (We prevent this now, by including the filter into our polyRef calculation):
java.lang.NullPointerException
	at org.recast4j.detour.DetourCommon.vCopy(DetourCommon.java:101)
	at org.recast4j.detour.crowd.Crowd.checkPathValidity(Crowd.java:826)
	at org.recast4j.detour.crowd.Crowd.update(Crowd.java:875)

The checkPathValidity is why I'm reporting these issues, I suspect DetourCrowd wanted to handle that.

  1. When adding an Agent to a Crowd but at a position which is unwalkable because of Filter restrictions:
Caused by: java.lang.NullPointerException
	at org.recast4j.detour.DetourCommon.vCopy(DetourCommon.java:101)
	at org.recast4j.detour.crowd.PathCorridor.reset(PathCorridor.java:201)
	at org.recast4j.detour.crowd.Crowd.addAgent(Crowd.java:389)

Thanks in Advance :)

Comment on Crowd

This is not a problem but just some observations. If you know of some settings that change this behavior please let me know.

I have written my own crowd now and added its own getters and setters. I did this because I couldn't figure out how to make Crowd take a straight path from the start position to the next corner in the corridor in a realistic manner.

Crowd will start the agent in the general direction of the corner and narrow down the distance to the corner each iteration. This leads to weird things when the path moves from an open area to a narrow path like a stair or door. The agent will bounce around the entrance, narrowing the distance to the next corner each iteration so it looks like the agent is searching for a path rather than just moving it to the next corner. calcSmoothSteerDirection() at times will not make sense because of this behavior. The combination of the two will at times lead to the agent making a wide turn when is should of just moved right to the corner it was targeting.

is it this a bug?

/// Determines if two axis-aligned bounding boxes overlap.
    /// @param[in] amin Minimum bounds of box A. [(x, y, z)]
    /// @param[in] amax Maximum bounds of box A. [(x, y, z)]
    /// @param[in] bmin Minimum bounds of box B. [(x, y, z)]
    /// @param[in] bmax Maximum bounds of box B. [(x, y, z)]
    /// @return True if the two AABB's overlap.
    /// @see dtOverlapBounds
    static boolean overlapQuantBounds(int amin[], int amax[], int bmin[], int bmax[]) {
        boolean overlap = true;
        overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap;
        overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap;
        overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap;
        return overlap;
    }

    /// Determines if two axis-aligned bounding boxes overlap.
    /// @param[in] amin Minimum bounds of box A. [(x, y, z)]
    /// @param[in] amax Maximum bounds of box A. [(x, y, z)]
    /// @param[in] bmin Minimum bounds of box B. [(x, y, z)]
    /// @param[in] bmax Maximum bounds of box B. [(x, y, z)]
    /// @return True if the two AABB's overlap.
    /// @see dtOverlapQuantBounds
    static boolean overlapBounds(float[] amin, float[] amax, float[] bmin, float[] bmax) {
        boolean overlap = true;
        overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap;
        overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap;
        overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap;
        return overlap;
    }

detour.crowd package private

A considerable amount of detour.crowd is package private. Is this a transitional step for the package or intended final behavior?

Edit- Explaination:
I am using recast4j as a library so there is no way to actually keep the detour.crowd package part of it because of everything being package private. Unless I am doing this wrong.

My use is that I have a class that works similar to the AbstractCrowdTest.java in that it creates the Crowd but has its own update loop that ties into the game engines update loop. This is what powers the Crowd by calling the Crowd update loop every frame.

The Crowd controls all npc movement as its supposed to and I just use the returned npos[] data to move the nodes around that the models are attached to. The node gets the information because I extend the CrowdAgentParams class in a behavior control that gets attached to the node. When the control is attached to the node, it sets all the CrowdAgentParams based off the actual model so all I do is pass the npc node to the Crowd thereafter when it needs to move. Whenever an agent gets added to the crowd I just store its idx in the userData object that CrowdAgentParams offers for future reference.

None of this is possible unless I move the detour.crowd package into the game project and write my classes inside the crowd folder or start changing variables, which will be a mess if I update things from your future releases.

If I am going about using Crowd wrong, please let me know.

DetourCommon.vLerp(DetourCommon.java:56) java.lang.NullPointerException

x:73284 y:22948

java.lang.NullPointerException: null
at org.recast4j.detour.DetourCommon.vLerp(DetourCommon.java:56) ~[detour-1.5.3-SNAPSHOT.jar:1.5.3-SNAPSHOT]
at org.recast4j.detour.NavMesh.closestPointOnDetailEdges(NavMesh.java:1028) ~[detour-1.5.3-SNAPSHOT.jar:1.5.3-SNAPSHOT]
at org.recast4j.detour.NavMesh.closestPointOnPoly(NavMesh.java:1120) ~[detour-1.5.3-SNAPSHOT.jar:1.5.3-SNAPSHOT]
at org.recast4j.detour.NavMeshQuery.closestPointOnPoly(NavMeshQuery.java:408) ~[detour-1.5.3-SNAPSHOT.jar:1.5.3-SNAPSHOT]
at org.recast4j.detour.FindNearestPolyQuery.process(FindNearestPolyQuery.java:25) ~[detour-1.5.3-SNAPSHOT.jar:1.5.3-SNAPSHOT]
at org.recast4j.detour.NavMeshQuery.queryPolygonsInTile(NavMeshQuery.java:570) ~[detour-1.5.3-SNAPSHOT.jar:1.5.3-SNAPSHOT]
at org.recast4j.detour.NavMeshQuery.lambda$queryPolygons$0(NavMeshQuery.java:632) ~[detour-1.5.3-SNAPSHOT.jar:1.5.3-SNAPSHOT]
at java.util.ArrayList.forEach(ArrayList.java:1259) ~[na:1.8.0_261]
at org.recast4j.detour.NavMeshQuery.queryPolygons(NavMeshQuery.java:632) ~[detour-1.5.3-SNAPSHOT.jar:1.5.3-SNAPSHOT]
aol_nav_5.bin.zip

at org.recast4j.detour.NavMeshQuery.findNearestPoly(NavMeshQuery.java:526) ~[detour-1.5.3-SNAPSHOT.jar:1.5.3-SNAPSHOT]

TileCacheBuilder.canRemoveVertex ArrayIndexOutOfBoundsException

Hi all, thank you for maintaining such a wonderful repo!

I'm trying to make a tiled navmesh; my code follows nearly identically the dungeon example code. However, my game worlds are dynamically generated and I noticed that the more complicated the game world, the more likely it was that this error would be thrown (it sometimes works just fine - and I can confirm that when this error doesn't get thrown, i can visualize a valid navmesh, so I think i have the pipeline set up properly).

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4
at org.recast4j.detour.tilecache.TileCacheBuilder.canRemoveVertex(TileCacheBuilder.java:1242)
at org.recast4j.detour.tilecache.TileCacheBuilder.buildTileCachePolyMesh(TileCacheBuilder.java:1612)
at org.recast4j.detour.tilecache.TileCache.buildNavMeshTile(TileCache.java:517)

Is it possible that TileCacheBuilder:1210
int[] edges = new int[maxEdges]; should be int[] edges = new int[maxEdges * 3];?

can not findNearestPoly bug

the dungeon.obj

res= move.query.findNearestPoly(new float[]{1, 10, 19}, new float[]{1.0f, 1.0f, 1.0f},new QueryFilter());
System.out.println(res.getNearestRef());
get 0?

Difference when generating NavMesh with Recast4j & c++ versions

Hello,
I'm trying to understand differences in navmesh creation between c++ and recast4j versions.

When I'm using the same geometry input, the c++ version is creating (and displaying) a navmesh object which is less than 1Mb. Using Recast4j, once I save it:

  • I cannot read it with RecastDemo (it's just not loaded)
  • The filesize is 29Mb

I'm using the same settings in both cases, so I'm wondering what do I miss in the building process.
Thank you,
Warkdev

NullpointerException in Crowd#addAgent

java.lang.NullPointerException
	at org.recast4j.detour.DetourCommon.vCopy(DetourCommon.java:99)
	at org.recast4j.detour.crowd.PathCorridor.reset(PathCorridor.java:204)
	at org.recast4j.detour.crowd.Crowd.addAgent(Crowd.java:530)

Recast works around this like this
I don't know if that's possible in recast4j, but probably desireable to throw an IllegalArgumentException with "Unable to find poly ref" or something then

PolyMeshDetail offset

Not a bug report Piotr, just adding to a comment you made in the code for RecastMeshDetail.

https://github.com/ppiastucki/recast4j/blob/21c494f0d9c9f3b086700078f143cf945166a09b/recast/src/main/java/org/recast4j/recast/RecastMeshDetail.java#L1157

I found this thread about it, wasn't sure if you had seen it.

https://groups.google.com/forum/#!searchin/recastnavigation/detail$20mesh$20offset%7Csort:date/recastnavigation/UQFN6BGCcV0/-1Ny4koOBpkJ

Took us awhile to figure out where this offset was coming from ourselves since we didn't have the intimacy you gained from porting Recast.

Tilecache add obstacle error

image
I use tilecache to add a lot of obstacles, but this error will appear, and then tilecache can't add or remove obstacles again. I hope you can answer my questions.thank you!

Overlapping region errors thrown instead of logged

Recast4j throws an error any time there are overlapping regions. This prevents completion of the Recast4j process, making it difficult to debug overlapping regions because there is no way to get to data visualization to inspect where overlapping regions are.

In Recast C++ the same code only logs an error. I changed the same line in Recast4j to a println and the rest of the Recast4j process worked fine even with the overlapping regions.

The C++ version (RecastRegion.cpp):

// If overlapping regions were found during merging, split those regions.
if (overlaps.size() > 0)
{
    ctx->log(RC_LOG_ERROR, "rcBuildRegions: %d overlapping regions.", overlaps.size());
}

The Recast4j version (RecastRegion.java):

// If overlapping regions were found during merging, split those regions.
if (overlaps.size() > 0) {
    throw new RuntimeException("rcBuildRegions: " + overlaps.size() + " overlapping regions.");
}

I would have provided an optional PR but don't know what method of logging would be preferable. println is fine for my needs but not the most universal solution. I see logback is being used in the Recast4j demo module, though it's not in the main modules and its nice that the recast and detour modules have no external production dependencies.

Maybe there's a better solution than logging? Maybe returning an error object, C-Style?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.