Hi All, I'm new to jMonkey, and am trying to load a terrain I've created in MW3D. I got some code off the Monkey World forum, and have placed it in my game class. I get an error regarding the CullState class, and when I had a look at this class, I can't find the method used in the code I've picked up.
public static TerrainPage createHeightMapTerrain(AbstractHeightMap map,
int size, int blockSize, Vector3f scale, boolean clod) {
TerrainPage terrainPage = new TerrainPage("Terrain", blockSize,
size + 1, scale, map.getHeightMap(), clod);
CullState cs = DisplaySystem.getDisplaySystem().getRenderer().createCullState();
cs.setCullMode(CullState.CS_BACK);
cs.setEnabled(true);
terrainPage.setRenderState(cs);
return terrainPage;
}
it's the cs.setCullMode(CullState.CS_BACK); that's the problem, both the method and the variable CS_BACK is throwing up an error.
I'm new to Java in general, so if I've got terminology wrong I apologize, but it would be nice to get this code working to give me a sense of getting somewhere. Cheers :)
That's great, thanks. Problem is CullHint() still throws up an error, I wonder if things have been updated again? Also TerrainPage() method in the code is throwing up an error, but that's there fine in the TerrainPage class. I'm obviously doing something wrong here, maybe I have something set up wrong, although I have run some test games without a problem in the project. All classes are being imported ok…