Search code examples
javajava-8jmonkeyengine

How can I resolve my build error?


I can build the project on Windows 8.1. When trying with Ubuntu I get this error message

Description Resource Path Location Type
The method interpolateLocal(Vector2f, Vector2f, float) is undefined for the type Vector2f NavMesh.java /spaceworld/src/jme3tools/navmesh line 230 Java Problem

The offending code is not mine.

if (d1 < d2){                           
  intersectionPoint.interpolateLocal(wall.getPointA(), wall.getPointB(), distBlend);
  newWayPoint = new Vector3f(intersectionPoint.x, 0, intersectionPoint.y);
}else{
  intersectionPoint.interpolateLocal(wall.getPointB(), wall.getPointA(), distBlend);
  newWayPoint = new Vector3f(intersectionPoint.x, 0, intersectionPoint.y);
}

I've included cai-nmgen-0.1.2.jar and the jme3 jars just like I did on windows to make it work. Why won't it build?


Solution

  • According to Vector3f and interpolate vs. interpolateLocal blog post, it seems there have been some break changes on this method between version 3.0.10 and 3.1 of jme3 library.

    So you'd better check the version you're using on Windows 8.1 and figure out if the older dependency (or some other package transitive dependency) is somehow in the build path.

    Also try on your Ubuntu your code with version jme3 library version 3.0.x