I am trying to incorporate the TestIsland code into a GameState (for testing purposes). (Note, The TestIsland example works correctly).
I've copied and pasted the TestIsland code directly into another file called Island. A Class that extends GameState creates the Island object and attaches its node.
In the GameState class I call the following
public void update(float itp){
super.update(itp);
rootNode.updateGeometricState(itp,true);
island.update(itp);
}
public void render(float itp){
super.render(itp);
display.getRenderer().draw(rootNode);
island.render(itp);
}
Now from the Island class
public void update(float interpolation) {
skybox.getLocalTranslation().set(cam.getLocation());
skybox.updateGeometricState(0.0f, true);
Vector3f transVec = new Vector3f(cam.getLocation().x,
waterEffectRenderPass.getWaterHeight(), cam.getLocation().z);
setTextureCoords(0, transVec.x, -transVec.z, textureScale);
setVertexCoords(transVec.x, transVec.y, transVec.z);
pManager.updatePasses(interpolation);
}
public void render(float interpolation){
pManager.renderPasses(display.getRenderer());
}
Once this is loaded up, I get this really weird water/skybox reflection that seems to be blocking the geometries.
Any ideas of what I might need to do in order to correct this?
