// 阳光
DirectionalLight sun = new DirectionalLight();
sun.setName("sun");
sun.setDirection(new Vector3f(-1, -2, -3).normalizeLocal());
sun.setColor(ColorRGBA.White);
rootNode.addLight(sun);
// System.out.println(rootNode.getLocalLightList().get(1).getName()+"灯光");
// 定向光影子
DirectionalLightShadowRenderer dlsr = new DirectionalLightShadowRenderer(assetManager, 1024, 4);
dlsr.setLight(sun);// 设置定向光源
dlsr.setEdgeFilteringMode(EdgeFilteringMode.PCFPOISSON);
viewPort.addProcessor(dlsr);
I added this code but the shadow didn’t appear
How does SimpleApplication get loaded lights in BaseAppState
For example, I can use a SimpleApplication. GetRootNode().getChildren() to obtain model.
light how to obtain?