From 87cfae6d7b8186fd679447001c115b9041e85ea1 Mon Sep 17 00:00:00 2001 From: Nehon Date: Sat, 25 Nov 2017 15:00:58 +0100 Subject: [PATCH] Fixed InstancedGeometry shadow mode --- .../com/jme3/scene/instancing/InstancedNode.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/scene/instancing/InstancedNode.java b/jme3-core/src/main/java/com/jme3/scene/instancing/InstancedNode.java index 42f8a7615..506f0f5de 100644 --- a/jme3-core/src/main/java/com/jme3/scene/instancing/InstancedNode.java +++ b/jme3-core/src/main/java/com/jme3/scene/instancing/InstancedNode.java @@ -31,21 +31,18 @@ */ package com.jme3.scene.instancing; +import com.jme3.export.JmeExporter; +import com.jme3.export.JmeImporter; +import com.jme3.material.MatParam; import com.jme3.material.Material; import com.jme3.renderer.RenderManager; import com.jme3.renderer.ViewPort; -import com.jme3.scene.Geometry; -import com.jme3.scene.GeometryGroupNode; -import com.jme3.scene.Mesh; -import com.jme3.scene.Node; -import com.jme3.scene.Spatial; -import com.jme3.scene.UserData; +import com.jme3.renderer.queue.RenderQueue; +import com.jme3.scene.*; import com.jme3.scene.control.Control; -import com.jme3.export.JmeExporter; -import com.jme3.export.JmeImporter; -import com.jme3.material.MatParam; import com.jme3.util.clone.Cloner; import com.jme3.util.clone.JmeCloneable; + import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -217,6 +214,7 @@ public class InstancedNode extends GeometryGroupNode { ig.setMesh(lookUp.mesh); ig.setUserData(UserData.JME_PHYSICSIGNORE, true); ig.setCullHint(CullHint.Never); + ig.setShadowMode(RenderQueue.ShadowMode.Inherit); instancesMap.put(lookUp.clone(), ig); attachChild(ig); }