- add green material to NavMesh by default

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8988 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 58c2287352
commit eee8f765ff
  1. 6
      sdk/jme3-navmesh-gen/src/com/jme3/gde/nmgen/wizard/NewNavMeshWizardAction.java

@ -8,6 +8,8 @@ import com.jme3.bounding.BoundingBox;
import com.jme3.gde.core.sceneexplorer.nodes.actions.AbstractNewSpatialWizardAction;
import com.jme3.gde.core.sceneexplorer.nodes.actions.NewSpatialAction;
import com.jme3.gde.nmgen.NavMeshGenerator;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.scene.Geometry;
import com.jme3.scene.Mesh;
import com.jme3.scene.Node;
@ -73,6 +75,10 @@ public final class NewNavMeshWizardAction extends AbstractNewSpatialWizardAction
Mesh optiMesh = generator.optimize(mesh);
final Geometry navMesh = new Geometry("NavMesh");
Material material = new Material(pm, "Common/MatDefs/Misc/Unshaded.j3md");
material.getAdditionalRenderState().setWireframe(true);
material.setColor("Color", ColorRGBA.Green);
navMesh.setMaterial(material);
navMesh.setMesh(optiMesh);
navMesh.setCullHint(CullHint.Always);
navMesh.setModelBound(new BoundingBox());

Loading…
Cancel
Save