public ColorRGBA getGroundColor() {
return groundColor;
}
public void worldInitialized() {
CameraNode camNode = world.getPlayer().getCameraNode();
Camera c = camNode.getCamera();
float width = Math.abs(c.getFrustumRight() - c.getFrustumLeft());
float height = Math.abs(c.getFrustumTop() - c.getFrustumBottom());
float distance = c.getFrustumFar();
float scale = distance / c.getFrustumNear();
distance = distance * (255f / 256f);
width *= scale;
height *= scale;
geom = new Geometry("SkyPlane", new Quad(width, height));
geom.setLocalRotation(Quaternion.DIRECTION_Z.opposite());
geom.setLocalTranslation(c.getDirection().mult(-distance).add(new Vector3f(-width / 2, height / 2, 0)));
geom.setMaterial(mat);
camNode.attachChild(geom);
}